mirror of
https://github.com/penpot/penpot.git
synced 2025-01-07 15:39:42 -05:00
Move out of legacy
This commit is contained in:
parent
43e5e78053
commit
c6770f43c7
2 changed files with 7 additions and 9 deletions
|
@ -465,13 +465,10 @@
|
||||||
(def workspace-token-themes
|
(def workspace-token-themes
|
||||||
(l/derived #(or (some-> % ctob/get-themes) []) tokens-lib))
|
(l/derived #(or (some-> % ctob/get-themes) []) tokens-lib))
|
||||||
|
|
||||||
(dm/legacy
|
(def workspace-selected-token-set-id
|
||||||
(def workspace-selected-token-set-id
|
(l/derived wtts/get-selected-token-set-id st/state))
|
||||||
(l/derived
|
|
||||||
wtts/get-selected-token-set-id
|
|
||||||
st/state
|
|
||||||
=))
|
|
||||||
|
|
||||||
|
(dm/legacy
|
||||||
(def workspace-active-theme-ids
|
(def workspace-active-theme-ids
|
||||||
(l/derived wtts/get-active-theme-ids st/state))
|
(l/derived wtts/get-active-theme-ids st/state))
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
(ns app.main.ui.workspace.tokens.token-set
|
(ns app.main.ui.workspace.tokens.token-set
|
||||||
(:require
|
(:require
|
||||||
[app.common.data :refer [ordered-map]]
|
[app.common.data :refer [ordered-map]]
|
||||||
|
[app.common.data.macros :as dm]
|
||||||
|
[app.common.types.tokens-lib :as ctob]
|
||||||
[app.main.ui.workspace.tokens.token :as wtt]
|
[app.main.ui.workspace.tokens.token :as wtt]
|
||||||
[clojure.set :as set]
|
[clojure.set :as set]))
|
||||||
[app.common.types.tokens-lib :as ctob]))
|
|
||||||
|
|
||||||
(defn get-workspace-tokens-lib [state]
|
(defn get-workspace-tokens-lib [state]
|
||||||
(get-in state [:workspace-data :tokens-lib]))
|
(get-in state [:workspace-data :tokens-lib]))
|
||||||
|
@ -167,7 +168,7 @@
|
||||||
;; === Set selection
|
;; === Set selection
|
||||||
|
|
||||||
(defn get-selected-token-set-id [state]
|
(defn get-selected-token-set-id [state]
|
||||||
(or (get-in state [:workspace-local :selected-token-set-id])
|
(or (dm/legacy (get-in state [:workspace-local :selected-token-set-id]))
|
||||||
(some-> (get-workspace-tokens-lib state)
|
(some-> (get-workspace-tokens-lib state)
|
||||||
(ctob/get-sets)
|
(ctob/get-sets)
|
||||||
(first)
|
(first)
|
||||||
|
|
Loading…
Reference in a new issue