mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 12:38:33 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
f65f7d68e6
22 changed files with 88 additions and 54 deletions
|
@ -404,6 +404,10 @@
|
|||
(defn retrieve-comment-threads
|
||||
[file-id]
|
||||
(ptk/reify ::retrieve-comment-threads
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(dissoc state :comment-threads))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [share-id (-> state :viewer-local :share-id)]
|
||||
|
|
|
@ -425,7 +425,9 @@
|
|||
[]
|
||||
(let [mentions-s (mf/use-ctx mentions-context)
|
||||
profile (mf/deref refs/profile)
|
||||
profiles (mf/deref refs/profiles)
|
||||
|
||||
team (mf/deref refs/team)
|
||||
members (:members team)
|
||||
|
||||
state*
|
||||
(mf/use-state
|
||||
|
@ -437,10 +439,8 @@
|
|||
(deref state*)
|
||||
|
||||
mentions-users
|
||||
(mf/with-memo [mention-filter]
|
||||
|
||||
|
||||
(->> (vals profiles)
|
||||
(mf/with-memo [mention-filter members]
|
||||
(->> members
|
||||
(filter (fn [{:keys [id fullname email]}]
|
||||
(and
|
||||
(not= id (:id profile))
|
||||
|
@ -461,9 +461,12 @@
|
|||
(dom/stop-propagation event)
|
||||
(let [id (-> (dom/get-current-target event)
|
||||
(dom/get-data "user-id")
|
||||
(uuid/uuid))]
|
||||
(uuid/uuid))
|
||||
|
||||
user (d/seek #(= (:id %) id) members)]
|
||||
|
||||
(rx/push! mentions-s {:type :insert-mention
|
||||
:data {:user (get profiles id)}}))))]
|
||||
:data {:user user}}))))]
|
||||
|
||||
(mf/with-effect [mentions-users selected]
|
||||
(let [sub
|
||||
|
|
|
@ -8,19 +8,27 @@
|
|||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.config :as cf]
|
||||
[app.main.data.event :as ev]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.dashboard.import :as udi]
|
||||
[app.main.ui.ds.product.empty-placeholder :refer [empty-placeholder*]]
|
||||
[app.main.ui.ds.product.loader :refer [loader*]]
|
||||
[app.main.ui.icons :as i]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
[potok.v2.core :as ptk]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc empty-placeholder-projects*
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [on-create on-finish-import project-id] :as props}]
|
||||
(let [file-input (mf/use-ref nil)
|
||||
on-add-library (mf/use-fn #(dom/open-new-window "https://penpot.app/penpothub/libraries-templates"))
|
||||
on-add-library (mf/use-fn
|
||||
(fn [_]
|
||||
(st/emit! (ptk/event ::ev/event {::ev/name "explore-libraries-click"
|
||||
::ev/origin "dashboard"
|
||||
:section "empty-placeholder-projects"}))
|
||||
(dom/open-new-window "https://penpot.app/penpothub/libraries-templates")))
|
||||
on-import-files (mf/use-fn #(dom/click (mf/ref-val file-input)))]
|
||||
|
||||
[:div {:class (stl/css :empty-project-container)}
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
label]]
|
||||
[:> icon* {:icon-id i/arrow
|
||||
:class (stl/css :arrow)
|
||||
:size "s"
|
||||
:size "m"
|
||||
:aria-hidden true}]]
|
||||
(when open
|
||||
[:> options-dropdown* {:on-click on-option-click
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue