From 587a2936e68009a598254ac626311b02ad747645 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 15 Aug 2024 18:26:37 +0200 Subject: [PATCH] Add simple UI --- .../app/main/ui/workspace/tokens/sidebar.cljs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs index 7cab3ea9a..a1995f5a2 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs @@ -144,6 +144,29 @@ {:empty (sort-by :token-key empty) :filled (sort-by :token-key filled)})) +(mf/defc token-sets + [_props] + (let [selected-token-set-id (mf/deref refs/workspace-selected-token-set-id) + token-sets (mf/deref refs/workspace-token-sets)] + (js/console.log "token-sets" token-sets) + [:div + {:style {:display "flex" + :flex-direction "column" + :gap "10px"}} + + "Token Sets" + [:div + {:style {:display "flex" :gap "10px"}} + [:button "Create"] + [:button "Delete"]] + [:ul + {:style {:list-style "disk" + :margin-left "20px"}} + (for [[_ {:keys [id name]}] token-sets] + [:li {:style {:font-weight (when (= selected-token-set-id id) "bold")}} + name])] + [:hr]])) + (mf/defc tokens-explorer [_props] (let [objects (mf/deref refs/workspace-page-objects) @@ -156,6 +179,7 @@ token-groups (mf/with-memo [tokens] (sorted-token-groups tokens))] [:article + [:& token-sets] [:& token-context-menu] [:div.assets-bar (for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups)