mirror of
https://github.com/penpot/penpot.git
synced 2025-05-15 19:46:37 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
3fd429c72a
30 changed files with 420 additions and 174 deletions
|
@ -84,7 +84,7 @@
|
|||
:controls :inline-actions
|
||||
:type :inline
|
||||
:level level
|
||||
:accept {:label (tr "Refresh")
|
||||
:accept {:label (tr "labels.refresh")
|
||||
:callback force-reload!}
|
||||
:tag :notification))
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
[app.main.data.common :as dcm]
|
||||
[app.main.data.event :as ev]
|
||||
[app.main.data.fonts :as df]
|
||||
[app.main.data.helpers :as dsh]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.websocket :as dws]
|
||||
[app.main.features :as features]
|
||||
|
@ -248,15 +249,18 @@
|
|||
(ptk/reify ::create-project
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [unames (cfh/get-used-names (get state :projects))
|
||||
(let [team-id (:current-team-id state)
|
||||
projects (dsh/lookup-team-projects state team-id)
|
||||
unames (cfh/get-used-names projects)
|
||||
base-name (tr "dashboard.new-project-prefix")
|
||||
name (cfh/generate-unique-name base-name unames :immediate-suffix? true)
|
||||
team-id (:current-team-id state)
|
||||
params {:name name
|
||||
:team-id team-id}
|
||||
name (cfh/generate-unique-name base-name unames :immediate-suffix? true)
|
||||
team-id (:current-team-id state)
|
||||
params {:name name
|
||||
:team-id team-id}
|
||||
{:keys [on-success on-error]
|
||||
:or {on-success identity
|
||||
on-error rx/throw}} (meta params)]
|
||||
on-error rx/throw}}
|
||||
(meta params)]
|
||||
(->> (rp/cmd! :create-project params)
|
||||
(rx/tap on-success)
|
||||
(rx/map project-created)
|
||||
|
@ -465,10 +469,11 @@
|
|||
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(assoc-in [:files id] file)
|
||||
(assoc-in [:recent-files id] file)
|
||||
(update-in [:projects project-id :count] inc)))))
|
||||
(let [file (dissoc file :data)]
|
||||
(-> state
|
||||
(assoc-in [:files id] file)
|
||||
(assoc-in [:recent-files id] file)
|
||||
(update-in [:projects project-id :count] inc))))))
|
||||
|
||||
(defn create-file
|
||||
[{:keys [project-id name] :as params}]
|
||||
|
@ -482,8 +487,11 @@
|
|||
(watch [it state _]
|
||||
(let [{:keys [on-success on-error]
|
||||
:or {on-success identity
|
||||
on-error rx/throw}} (meta params)
|
||||
unames (cfh/get-used-names (get state :files))
|
||||
on-error rx/throw}}
|
||||
(meta params)
|
||||
|
||||
files (dsh/lookup-team-files state)
|
||||
unames (cfh/get-used-names files)
|
||||
base-name (tr "dashboard.new-file-prefix")
|
||||
name (or name
|
||||
(cfh/generate-unique-name base-name unames :immediate-suffix? true))
|
||||
|
@ -597,10 +605,10 @@
|
|||
pparams (:path-params route)
|
||||
in-project? (contains? pparams :project-id)
|
||||
name (if in-project?
|
||||
(let [files (get state :files)
|
||||
(let [files (dsh/lookup-team-files state team-id)
|
||||
unames (cfh/get-used-names files)]
|
||||
(cfh/generate-unique-name (tr "dashboard.new-file-prefix") unames :immediate-suffix? true))
|
||||
(let [projects (get state :projects)
|
||||
(let [projects (dsh/lookup-team-projects state team-id)
|
||||
unames (cfh/get-used-names projects)]
|
||||
(cfh/generate-unique-name (tr "dashboard.new-project-prefix") unames :immediate-suffix? true)))
|
||||
params (if in-project?
|
||||
|
|
|
@ -168,3 +168,21 @@
|
|||
[state]
|
||||
(when-let [{:keys [x y width height]} (get-in state [:workspace-local :vbox])]
|
||||
(gpt/point (+ x (/ width 2)) (+ y (/ height 2)))))
|
||||
|
||||
(defn lookup-team-files
|
||||
([state]
|
||||
(lookup-team-files state (:current-team-id state)))
|
||||
([state team-id]
|
||||
(->> state
|
||||
:files
|
||||
(filter #(= team-id (:team-id (val %))))
|
||||
(into {}))))
|
||||
|
||||
(defn lookup-team-projects
|
||||
([state]
|
||||
(lookup-team-projects (:current-team-id state)))
|
||||
([state team-id]
|
||||
(->> state
|
||||
:projects
|
||||
(filter #(= team-id (:team-id (val %))))
|
||||
(into {}))))
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.logging :as log]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.types.team :as ctt]
|
||||
|
@ -118,8 +119,10 @@
|
|||
(let [team-id (:current-team-id state)
|
||||
teams (get state :teams)
|
||||
team (get teams team-id)]
|
||||
(rx/of (set-current-team team)
|
||||
(fetch-members))))))
|
||||
(if (not team)
|
||||
(rx/throw (ex/error :type :authentication))
|
||||
(rx/of (set-current-team team)
|
||||
(fetch-members)))))))
|
||||
|
||||
(defn initialize-team
|
||||
[team-id]
|
||||
|
|
|
@ -319,8 +319,6 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(dissoc :files)
|
||||
(dissoc :workspace-ready)
|
||||
(assoc :recent-colors (:recent-colors storage/user))
|
||||
(assoc :recent-fonts (:recent-fonts storage/user))
|
||||
(assoc :current-file-id file-id)
|
||||
|
@ -395,12 +393,9 @@
|
|||
(dissoc
|
||||
:current-file-id
|
||||
:workspace-editor-state
|
||||
:files
|
||||
:workspace-media-objects
|
||||
:workspace-persistence
|
||||
:workspace-presence
|
||||
:workspace-tokens
|
||||
:workspace-ready
|
||||
:workspace-undo)
|
||||
(update :workspace-global dissoc :read-only?)
|
||||
(assoc-in [:workspace-global :options-mode] :design)))
|
||||
|
@ -428,18 +423,18 @@
|
|||
(defmethod ptk/resolve ::reload-current-file [_ _] (reload-current-file))
|
||||
|
||||
(defn initialize-page
|
||||
[page-id]
|
||||
(assert (uuid? page-id) "expected valid uuid for `page-id`")
|
||||
[file-id page-id]
|
||||
(assert (uuid? file-id) "expected valid uuid for `file-id`")
|
||||
|
||||
(ptk/reify ::initialize-page
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(if-let [{:keys [id] :as page} (dsh/lookup-page state page-id)]
|
||||
(if-let [page (dsh/lookup-page state file-id page-id)]
|
||||
;; we maintain a cache of page state for user convenience with the exception of the
|
||||
;; selection; when user abandon the current page, the selection is lost
|
||||
(let [local (dm/get-in state [:workspace-cache id] default-workspace-local)]
|
||||
(let [local (dm/get-in state [:workspace-cache [file-id page-id]] default-workspace-local)]
|
||||
(-> state
|
||||
(assoc :current-page-id id)
|
||||
(assoc :current-page-id page-id)
|
||||
(assoc :workspace-local (assoc local :selected (d/ordered-set)))
|
||||
(assoc :workspace-trimmed-page (dm/select-keys page [:id :name]))
|
||||
|
||||
|
@ -451,24 +446,25 @@
|
|||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(if (dsh/lookup-page state page-id)
|
||||
(let [file-id (:current-file-id state)]
|
||||
(rx/of (preload-data-uris page-id)
|
||||
(dwth/watch-state-changes file-id page-id)
|
||||
(dwl/watch-component-changes)))
|
||||
(rx/of (dcm/go-to-workspace))))))
|
||||
(if (dsh/lookup-page state file-id page-id)
|
||||
(rx/of (preload-data-uris page-id)
|
||||
(dwth/watch-state-changes file-id page-id)
|
||||
(dwl/watch-component-changes))
|
||||
(rx/of (dcm/go-to-workspace :file-id file-id ::rt/replace true))))))
|
||||
|
||||
(defn finalize-page
|
||||
[page-id]
|
||||
[file-id page-id]
|
||||
(assert (uuid? file-id) "expected valid uuid for `file-id`")
|
||||
(assert (uuid? page-id) "expected valid uuid for `page-id`")
|
||||
|
||||
(ptk/reify ::finalize-page
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [local (-> (:workspace-local state)
|
||||
(dissoc :edition :edit-path :selected))
|
||||
exit? (not= :workspace (dm/get-in state [:route :data :name]))
|
||||
exit? (not= :workspace (rt/lookup-name state))
|
||||
state (-> state
|
||||
(update :workspace-cache assoc page-id local)
|
||||
(update :workspace-cache assoc [file-id page-id] local)
|
||||
(dissoc :current-page-id
|
||||
:workspace-local
|
||||
:workspace-trimmed-page
|
||||
|
|
|
@ -741,12 +741,12 @@
|
|||
redirect-to-page
|
||||
(fn [page-id shape-id]
|
||||
(rx/merge
|
||||
(rx/of (dcm/go-to-workspace :page-id page-id))
|
||||
(->> stream
|
||||
(rx/filter (ptk/type? ::initialize-page))
|
||||
(rx/filter (ptk/type? ::dw/initialize-page))
|
||||
(rx/take 1)
|
||||
(rx/observe-on :async)
|
||||
(rx/mapcat (fn [_] (select-and-zoom shape-id))))))]
|
||||
(rx/mapcat (fn [_] (select-and-zoom shape-id))))
|
||||
(rx/of (dcm/go-to-workspace :page-id page-id))))]
|
||||
|
||||
(when-let [component (dm/get-in data [:components id])]
|
||||
(let [page-id (:main-instance-page component)
|
||||
|
|
|
@ -120,6 +120,11 @@
|
|||
([id params & {:as options}]
|
||||
(navigate id params options)))
|
||||
|
||||
(defn lookup-name
|
||||
[state]
|
||||
(dm/get-in state [:route :data :name]))
|
||||
|
||||
;; FIXME: rename to lookup-params
|
||||
(defn get-params
|
||||
[state]
|
||||
(dm/get-in state [:route :params :query]))
|
||||
|
|
|
@ -127,7 +127,6 @@
|
|||
{::mf/props :obj
|
||||
::mf/private true}
|
||||
[{:keys [team-id children]}]
|
||||
|
||||
(mf/with-effect [team-id]
|
||||
(st/emit! (dtm/initialize-team team-id))
|
||||
(fn []
|
||||
|
|
|
@ -237,9 +237,14 @@
|
|||
(str/last-index-of (subs node-text 0 offset) "@")
|
||||
|
||||
mention-text
|
||||
(subs node-text current-at-symbol)]
|
||||
(subs node-text current-at-symbol)
|
||||
|
||||
(if (re-matches #"@\w*" mention-text)
|
||||
at-symbol-inside-word?
|
||||
(and (> current-at-symbol 0)
|
||||
(str/word? (str/slice node-text (- current-at-symbol 1) current-at-symbol)))]
|
||||
|
||||
(if (and (not at-symbol-inside-word?)
|
||||
(re-matches #"@\w*" mention-text))
|
||||
(do
|
||||
(reset! cur-mention mention-text)
|
||||
(rx/push! mentions-s {:type :display-mentions})
|
||||
|
@ -305,6 +310,17 @@
|
|||
(when (fn? on-change)
|
||||
(on-change (parse-nodes node))))))))
|
||||
|
||||
handle-insert-at-symbol
|
||||
(mf/use-fn
|
||||
(fn []
|
||||
(let [node (mf/ref-val local-ref) [span-node] (current-text-node node)]
|
||||
(when span-node
|
||||
(let [node-text (dom/get-text span-node)
|
||||
at-symbol (if (blank-content? node-text) "@" " @")]
|
||||
|
||||
(dom/set-html! span-node (str/concat node-text at-symbol))
|
||||
(wapi/set-cursor-after! span-node))))))
|
||||
|
||||
handle-key-down
|
||||
(mf/use-fn
|
||||
(mf/deps on-esc on-ctrl-enter handle-select handle-input)
|
||||
|
@ -386,6 +402,8 @@
|
|||
(case type
|
||||
:insert-mention
|
||||
(handle-insert-mention data)
|
||||
:insert-at-symbol
|
||||
(handle-insert-at-symbol)
|
||||
|
||||
nil))))))
|
||||
|
||||
|
@ -521,15 +539,25 @@
|
|||
{::mf/props :obj
|
||||
::mf/private true}
|
||||
[]
|
||||
(let [mentions-s (mf/use-ctx mentions-context)
|
||||
(let [mentions-s (mf/use-ctx mentions-context)
|
||||
display-mentions* (mf/use-state false)
|
||||
|
||||
handle-mouse-down
|
||||
handle-pointer-down
|
||||
(mf/use-fn
|
||||
(mf/deps @display-mentions*)
|
||||
(fn [event]
|
||||
(dom/prevent-default event)
|
||||
(dom/stop-propagation event)
|
||||
(rx/push! mentions-s {:type :display-mentions})))]
|
||||
(if @display-mentions*
|
||||
(rx/push! mentions-s {:type :hide-mentions})
|
||||
(rx/push! mentions-s {:type :insert-at-symbol}))))
|
||||
|
||||
handle-key-down
|
||||
(mf/use-fn
|
||||
(mf/deps @display-mentions*)
|
||||
(fn [event]
|
||||
(when (or (kbd/enter? event) (kbd/space? event))
|
||||
(handle-pointer-down event))))]
|
||||
|
||||
(mf/use-effect
|
||||
(fn []
|
||||
|
@ -545,8 +573,9 @@
|
|||
|
||||
[:> icon-button*
|
||||
{:variant "ghost"
|
||||
:aria-label (tr "labels.options")
|
||||
:on-pointer-down handle-mouse-down
|
||||
:aria-label (tr "labels.mention")
|
||||
:on-pointer-down handle-pointer-down
|
||||
:on-key-down handle-key-down
|
||||
:icon-class (stl/css-case :open-mentions-button true
|
||||
:is-toggled @display-mentions*)
|
||||
:icon "at"}]))
|
||||
|
|
|
@ -255,7 +255,6 @@
|
|||
}
|
||||
|
||||
.open-mentions-button {
|
||||
cursor: pointer;
|
||||
stroke: none;
|
||||
fill: var(--color-foreground-secondary);
|
||||
|
||||
|
|
|
@ -149,7 +149,6 @@
|
|||
[:input {:type "text"
|
||||
:value (:token created "")
|
||||
:class (stl/css :custom-input-token)
|
||||
:placeholder (tr "modals.create-access-token.token")
|
||||
:read-only true}]
|
||||
[:button {:title (tr "modals.create-access-token.copy-token")
|
||||
:class (stl/css :copy-btn)
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.main.data.common :as dcm]
|
||||
[app.main.data.helpers :as dsh]
|
||||
[app.main.data.persistence :as dps]
|
||||
[app.main.data.plugins :as dpl]
|
||||
[app.main.data.workspace :as dw]
|
||||
|
@ -43,13 +42,6 @@
|
|||
[okulary.core :as l]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(defn- make-workspace-ready-ref
|
||||
[file-id]
|
||||
(l/derived (fn [state]
|
||||
(and (= file-id (:workspace-ready state))
|
||||
(some? (dsh/lookup-file-data state file-id))))
|
||||
st/state))
|
||||
|
||||
(mf/defc workspace-content*
|
||||
{::mf/private true}
|
||||
[{:keys [file layout page wglobal]}]
|
||||
|
@ -138,22 +130,18 @@
|
|||
key (events/listen globals/window "blur" focus-out)]
|
||||
(partial events/unlistenByKey key)))
|
||||
|
||||
(mf/with-effect [page-id]
|
||||
(if (some? page-id)
|
||||
(st/emit! (dw/initialize-page page-id))
|
||||
(st/emit! (dcm/go-to-workspace ::rt/replace true)))
|
||||
|
||||
(mf/with-effect [file page-id]
|
||||
(st/emit! (dw/initialize-page (:id file) page-id))
|
||||
(fn []
|
||||
(when (some? page-id)
|
||||
(st/emit! (dw/finalize-page page-id)))))
|
||||
(when page-id
|
||||
(st/emit! (dw/finalize-page (:id file) page-id)))))
|
||||
|
||||
(if (some? page)
|
||||
[:> workspace-content* {:file file
|
||||
:page page
|
||||
:wglobal wglobal
|
||||
:layout layout}]
|
||||
[:& workspace-loader*])))
|
||||
|
||||
[:> workspace-loader*])))
|
||||
|
||||
(def ^:private ref:file-without-data
|
||||
(l/derived (fn [file]
|
||||
|
@ -181,10 +169,6 @@
|
|||
read-only? (mf/deref refs/workspace-read-only?)
|
||||
read-only? (or read-only? (not (:can-edit permissions)))
|
||||
|
||||
ready* (mf/with-memo [file-id]
|
||||
(make-workspace-ready-ref file-id))
|
||||
ready? (mf/deref ready*)
|
||||
|
||||
design-tokens? (features/use-feature "design-tokens/v1")
|
||||
|
||||
background-color (:background-color wglobal)]
|
||||
|
@ -207,6 +191,10 @@
|
|||
(st/emit! ::dps/force-persist
|
||||
(dw/finalize-workspace file-id))))
|
||||
|
||||
(mf/with-effect [file page-id]
|
||||
(when-not page-id
|
||||
(st/emit! (dcm/go-to-workspace :file-id file-id ::rt/replace true))))
|
||||
|
||||
[:> (mf/provider ctx/current-project-id) {:value project-id}
|
||||
[:> (mf/provider ctx/current-file-id) {:value file-id}
|
||||
[:> (mf/provider ctx/current-page-id) {:value page-id}
|
||||
|
@ -219,9 +207,10 @@
|
|||
:touch-action "none"}}
|
||||
[:> context-menu*]
|
||||
|
||||
(if ^boolean ready?
|
||||
[:> workspace-page* {:page-id page-id
|
||||
:file file
|
||||
:wglobal wglobal
|
||||
:layout layout}]
|
||||
(if (some? file)
|
||||
[:> workspace-page*
|
||||
{:page-id page-id
|
||||
:file file
|
||||
:wglobal wglobal
|
||||
:layout layout}]
|
||||
[:> workspace-loader*])]]]]]]]))
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
[app.common.types.file :as ctf]
|
||||
[app.common.types.typographies-list :as ctyl]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cf]
|
||||
[app.main.data.dashboard :as dd]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.notifications :as ntf]
|
||||
|
@ -176,15 +175,7 @@
|
|||
(defn- empty-library?
|
||||
"Check if currentt library summary has elements or not"
|
||||
[summary]
|
||||
(let [colors (or (-> summary :colors :count) 0)
|
||||
components (or (-> summary :components :count) 0)
|
||||
media (or (-> summary :media :count) 0)
|
||||
typographies (or (-> summary :typographies :count) 0)]
|
||||
|
||||
(and (zero? colors)
|
||||
(zero? components)
|
||||
(zero? media)
|
||||
(zero? typographies))))
|
||||
(boolean (:is-empty summary)))
|
||||
|
||||
(mf/defc libraries-tab*
|
||||
{::mf/props :obj
|
||||
|
@ -362,7 +353,7 @@
|
|||
(nil? shared-libraries)
|
||||
(tr "workspace.libraries.loading")
|
||||
|
||||
(and (str/empty? search-term) (cf/external-feature-flag "templates-03" "test"))
|
||||
(str/empty? search-term)
|
||||
[:*
|
||||
[:div {:class (stl/css :sample-libraries-info)}
|
||||
(tr "workspace.libraries.empty.no-libraries")
|
||||
|
@ -377,19 +368,6 @@
|
|||
{:library library
|
||||
:importing importing*}])]]
|
||||
|
||||
(str/empty? search-term)
|
||||
[:*
|
||||
[:span {:class (stl/css :empty-state-icon)}
|
||||
library-icon]
|
||||
(tr "workspace.libraries.no-shared-libraries-available")
|
||||
(when (cf/external-feature-flag "templates-01" "test")
|
||||
[:div {:class (stl/css :templates-info)}
|
||||
(tr "workspace.libraries.more-templates")
|
||||
[:a {:target "_blank"
|
||||
:class (stl/css :templates-info-link)
|
||||
:href "https://penpot.app/libraries-templates"}
|
||||
(tr "workspace.libraries.more-templates-link")]])]
|
||||
|
||||
:else
|
||||
(tr "workspace.libraries.no-matches-for" search-term))]))]]))
|
||||
|
||||
|
|
|
@ -326,16 +326,6 @@
|
|||
padding: $s-0 $s-16;
|
||||
}
|
||||
|
||||
.templates-info {
|
||||
color: var(--color-accent-primary);
|
||||
}
|
||||
|
||||
.templates-info-link {
|
||||
color: var(--color-accent-primary);
|
||||
text-decoration: underline;
|
||||
font-weight: $fw400;
|
||||
}
|
||||
|
||||
.sample-libraries-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.config :as cf]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.workspace :as dw]
|
||||
[app.main.data.workspace.assets :as dwa]
|
||||
|
@ -92,12 +91,6 @@
|
|||
reverse-sort? (= :desc ordering)
|
||||
num-libs (count (mf/deref refs/libraries))
|
||||
|
||||
show-templates-04-test1?
|
||||
(and (cf/external-feature-flag "templates-04" "test1") (zero? num-libs))
|
||||
|
||||
show-templates-04-test2?
|
||||
(and (cf/external-feature-flag "templates-04" "test2") (zero? num-libs))
|
||||
|
||||
toggle-ordering
|
||||
(mf/use-fn
|
||||
(mf/deps ordering)
|
||||
|
@ -166,18 +159,12 @@
|
|||
[:article {:class (stl/css :assets-bar)}
|
||||
[:div {:class (stl/css :assets-header)}
|
||||
(when-not ^boolean read-only?
|
||||
(cond
|
||||
show-templates-04-test1?
|
||||
[:button {:class (stl/css :libraries-button)
|
||||
:on-click show-libraries-dialog
|
||||
:data-testid "libraries"}
|
||||
(tr "workspace.assets.add-library")]
|
||||
show-templates-04-test2?
|
||||
(if (= num-libs 1)
|
||||
[:button {:class (stl/css :add-library-button)
|
||||
:on-click show-libraries-dialog
|
||||
:data-testid "libraries"}
|
||||
(tr "workspace.assets.add-library")]
|
||||
:else
|
||||
|
||||
[:button {:class (stl/css :libraries-button)
|
||||
:on-click show-libraries-dialog
|
||||
:data-testid "libraries"}
|
||||
|
|
|
@ -534,7 +534,7 @@
|
|||
:on-ungroup on-ungroup
|
||||
:on-context-menu on-context-menu
|
||||
:selected-full selected-full
|
||||
:local ^boolean is-local}])
|
||||
:is-local ^boolean is-local}])
|
||||
|
||||
[:& cmm/assets-context-menu
|
||||
{:on-close on-close-menu
|
||||
|
|
|
@ -77,12 +77,12 @@
|
|||
[:& radio-button {:icon i/boolean-intersection
|
||||
:value "intersection"
|
||||
:disabled disabled-bool-btns
|
||||
:title (str (tr "intersection") " (" (sc/get-tooltip :bool-intersection) ")")
|
||||
:title (str (tr "workspace.shape.menu.intersection") " (" (sc/get-tooltip :bool-intersection) ")")
|
||||
:id "bool-opt-intersection"}]
|
||||
[:& radio-button {:icon i/boolean-exclude
|
||||
:value "exclude"
|
||||
:disabled disabled-bool-btns
|
||||
:title (str (tr "exclude") " (" (sc/get-tooltip :bool-exclude) ")")
|
||||
:title (str (tr "workspace.shape.menu.exclude") " (" (sc/get-tooltip :bool-exclude) ")")
|
||||
:id "bool-opt-exclude"}]]]
|
||||
|
||||
[:button
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
(dom/prevent-default e)
|
||||
(dom/stop-propagation e)
|
||||
(st/emit! (wdt/toggle-token-theme-active? group name)))}
|
||||
[:& switch {:name (tr "workspace.token.theme" name)
|
||||
[:& switch {:name (tr "workspace.token.theme-name" name)
|
||||
:on-change (constantly nil)
|
||||
:selected? selected?}]]
|
||||
[:> text* {:as "span" :typography "body-medium" :class (stl/css :theme-name)} name]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue