mirror of
https://github.com/penpot/penpot.git
synced 2025-05-20 05:46:11 +02:00
✨ Hide options for drafts project in dashboard
This commit is contained in:
parent
e20f557bd6
commit
10db35eab4
3 changed files with 30 additions and 20 deletions
|
@ -11,6 +11,9 @@
|
||||||
- Use space + mouse drag to pan, instead of only space [Taiga #1800](https://tree.taiga.io/project/penpot/us/1800).
|
- Use space + mouse drag to pan, instead of only space [Taiga #1800](https://tree.taiga.io/project/penpot/us/1800).
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
|
- Prevent deleting or moving the drafts project [Taiga #1935](https://tree.taiga.io/project/penpot/issue/1935).
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
### :boom: Breaking changes
|
### :boom: Breaking changes
|
||||||
### :heart: Community contributions by (Thank you!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
|
|
|
@ -66,26 +66,29 @@
|
||||||
(swap! local assoc :edition false))}]
|
(swap! local assoc :edition false))}]
|
||||||
[:div.dashboard-title
|
[:div.dashboard-title
|
||||||
[:h1 {:on-double-click on-edit}
|
[:h1 {:on-double-click on-edit}
|
||||||
(:name project)]
|
(:name project)]]))
|
||||||
[:& project-menu {:project project
|
|
||||||
:show? (:menu-open @local)
|
[:& project-menu {:project project
|
||||||
:left (- (:x (:menu-pos @local)) 180)
|
:show? (:menu-open @local)
|
||||||
:top (:y (:menu-pos @local))
|
:left (- (:x (:menu-pos @local)) 180)
|
||||||
:on-edit on-edit
|
:top (:y (:menu-pos @local))
|
||||||
:on-menu-close on-menu-close
|
:on-edit on-edit
|
||||||
:on-import on-import}]]))
|
:on-menu-close on-menu-close
|
||||||
|
:on-import on-import}]
|
||||||
|
|
||||||
[:div.dashboard-header-actions
|
[:div.dashboard-header-actions
|
||||||
[:a.btn-secondary.btn-small {:on-click on-create-clicked}
|
[:a.btn-secondary.btn-small {:on-click on-create-clicked}
|
||||||
(tr "dashboard.new-file")]
|
(tr "dashboard.new-file")]
|
||||||
|
|
||||||
[:div.icon.pin-icon.tooltip.tooltip-bottom
|
(when-not (:is-default project)
|
||||||
{:class (when (:is-pinned project) "active")
|
[:div.icon.pin-icon.tooltip.tooltip-bottom
|
||||||
:on-click toggle-pin :alt (tr "dashboard.pin-unpin")}
|
{:class (when (:is-pinned project) "active")
|
||||||
(if (:is-pinned project)
|
:on-click toggle-pin :alt (tr "dashboard.pin-unpin")}
|
||||||
i/pin-fill
|
(if (:is-pinned project)
|
||||||
i/pin)]
|
i/pin-fill
|
||||||
|
i/pin)])
|
||||||
|
|
||||||
[:div.icon.tooltip.tooltip-bottom
|
[:div.icon.tooltip.tooltip-bottom-left
|
||||||
{:on-click on-menu-click :alt (tr "dashboard.options")}
|
{:on-click on-menu-click :alt (tr "dashboard.options")}
|
||||||
i/actions]]]))
|
i/actions]]]))
|
||||||
|
|
||||||
|
|
|
@ -99,14 +99,18 @@
|
||||||
:left left
|
:left left
|
||||||
:options [(when-not (:is-default project)
|
:options [(when-not (:is-default project)
|
||||||
[(tr "labels.rename") on-edit])
|
[(tr "labels.rename") on-edit])
|
||||||
[(tr "dashboard.duplicate") on-duplicate]
|
(when-not (:is-default project)
|
||||||
[(tr "dashboard.pin-unpin") toggle-pin]
|
[(tr "dashboard.duplicate") on-duplicate])
|
||||||
(when (seq teams)
|
(when-not (:is-default project)
|
||||||
|
[(tr "dashboard.pin-unpin") toggle-pin])
|
||||||
|
(when (and (seq teams) (not (:is-default project)))
|
||||||
[(tr "dashboard.move-to") nil
|
[(tr "dashboard.move-to") nil
|
||||||
(for [team teams]
|
(for [team teams]
|
||||||
[(:name team) (on-move (:id team))])])
|
[(:name team) (on-move (:id team))])])
|
||||||
(when (some? on-import)
|
(when (some? on-import)
|
||||||
[(tr "dashboard.import") on-import-files])
|
[(tr "dashboard.import") on-import-files])
|
||||||
[:separator]
|
(when-not (:is-default project)
|
||||||
[(tr "labels.delete") on-delete]]}]]))
|
[:separator])
|
||||||
|
(when-not (:is-default project)
|
||||||
|
[(tr "labels.delete") on-delete])]}]]))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue