mirror of
https://github.com/penpot/penpot.git
synced 2025-07-14 23:38:46 +02:00
Removing storage from colors dashboard
This commit is contained in:
parent
6a38675602
commit
95604f84ab
1 changed files with 3 additions and 22 deletions
|
@ -80,7 +80,7 @@
|
||||||
{:on-double-click edit}
|
{:on-double-click edit}
|
||||||
(:name coll)]
|
(:name coll)]
|
||||||
[:span.dashboard-title-field
|
[:span.dashboard-title-field
|
||||||
(:name coll "Storage")]))]
|
(:name coll)]))]
|
||||||
(when (and own? coll)
|
(when (and own? coll)
|
||||||
[:div.edition
|
[:div.edition
|
||||||
(if edit?
|
(if edit?
|
||||||
|
@ -121,30 +121,14 @@
|
||||||
(if (:edit @local)
|
(if (:edit @local)
|
||||||
[:div
|
[:div
|
||||||
[:input.element-title
|
[:input.element-title
|
||||||
{:value (if (:name @local) (:name @local) (if coll name "Storage"))
|
{:value (if (:name @local) (:name @local) name)
|
||||||
:on-change on-input-change
|
:on-change on-input-change
|
||||||
:on-key-down on-input-keyup}]
|
:on-key-down on-input-keyup}]
|
||||||
[:span.close {:on-click on-cancel} i/close]]
|
[:span.close {:on-click on-cancel} i/close]]
|
||||||
[:span.element-title
|
[:span.element-title name])
|
||||||
(if coll name "Storage")])
|
|
||||||
[:span.element-subtitle
|
[:span.element-subtitle
|
||||||
(tr "ds.num-elements" (t/c colors))]])))
|
(tr "ds.num-elements" (t/c colors))]])))
|
||||||
|
|
||||||
(def ^:private storage-num-colors-ref
|
|
||||||
(-> (comp (l/in [:colors-collections nil :colors])
|
|
||||||
(l/lens count))
|
|
||||||
(l/derive st/state)))
|
|
||||||
|
|
||||||
(mx/defc nav-item-storage
|
|
||||||
{:mixins [mx/static mx/reactive]}
|
|
||||||
[selected?]
|
|
||||||
(let [num-colors (mx/react storage-num-colors-ref)
|
|
||||||
on-click #(st/emit! (dc/select-collection :own nil))]
|
|
||||||
[:li {:on-click on-click :class (when selected? "current")}
|
|
||||||
[:span.element-title "Storage"]
|
|
||||||
[:span.element-subtitle
|
|
||||||
(tr "ds.num-elements" (t/c num-colors))]]))
|
|
||||||
|
|
||||||
(mx/defc nav-section
|
(mx/defc nav-section
|
||||||
{:mixins [mx/static]}
|
{:mixins [mx/static]}
|
||||||
[type selected colls]
|
[type selected colls]
|
||||||
|
@ -161,8 +145,6 @@
|
||||||
[:a.btn-primary
|
[:a.btn-primary
|
||||||
{:on-click #(st/emit! (dc/create-collection))}
|
{:on-click #(st/emit! (dc/create-collection))}
|
||||||
"+ New library"]])
|
"+ New library"]])
|
||||||
(when own?
|
|
||||||
(nav-item-storage (nil? selected)))
|
|
||||||
(for [coll colls
|
(for [coll colls
|
||||||
:let [selected? (= (:id coll) selected)
|
:let [selected? (= (:id coll) selected)
|
||||||
key (str (:id coll))]]
|
key (str (:id coll))]]
|
||||||
|
@ -220,7 +202,6 @@
|
||||||
(on-select id))]
|
(on-select id))]
|
||||||
[:ul.move-list
|
[:ul.move-list
|
||||||
[:li.title title]
|
[:li.title title]
|
||||||
[:li [:a {:href "#" :on-click #(on-select % nil)} "Storage"]]
|
|
||||||
(for [coll colls
|
(for [coll colls
|
||||||
:let [id (:id coll)
|
:let [id (:id coll)
|
||||||
name (:name coll)]]
|
name (:name coll)]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue