mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 08:11:30 -05: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).
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Prevent deleting or moving the drafts project [Taiga #1935](https://tree.taiga.io/project/penpot/issue/1935).
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
### :boom: Breaking changes
|
||||
### :heart: Community contributions by (Thank you!)
|
||||
|
|
|
@ -66,26 +66,29 @@
|
|||
(swap! local assoc :edition false))}]
|
||||
[:div.dashboard-title
|
||||
[:h1 {:on-double-click on-edit}
|
||||
(:name project)]
|
||||
[:& project-menu {:project project
|
||||
:show? (:menu-open @local)
|
||||
:left (- (:x (:menu-pos @local)) 180)
|
||||
:top (:y (:menu-pos @local))
|
||||
:on-edit on-edit
|
||||
:on-menu-close on-menu-close
|
||||
:on-import on-import}]]))
|
||||
(:name project)]]))
|
||||
|
||||
[:& project-menu {:project project
|
||||
:show? (:menu-open @local)
|
||||
:left (- (:x (:menu-pos @local)) 180)
|
||||
:top (:y (:menu-pos @local))
|
||||
:on-edit on-edit
|
||||
:on-menu-close on-menu-close
|
||||
:on-import on-import}]
|
||||
|
||||
[:div.dashboard-header-actions
|
||||
[:a.btn-secondary.btn-small {:on-click on-create-clicked}
|
||||
(tr "dashboard.new-file")]
|
||||
|
||||
[:div.icon.pin-icon.tooltip.tooltip-bottom
|
||||
{:class (when (:is-pinned project) "active")
|
||||
:on-click toggle-pin :alt (tr "dashboard.pin-unpin")}
|
||||
(if (:is-pinned project)
|
||||
i/pin-fill
|
||||
i/pin)]
|
||||
(when-not (:is-default project)
|
||||
[:div.icon.pin-icon.tooltip.tooltip-bottom
|
||||
{:class (when (:is-pinned project) "active")
|
||||
:on-click toggle-pin :alt (tr "dashboard.pin-unpin")}
|
||||
(if (:is-pinned project)
|
||||
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")}
|
||||
i/actions]]]))
|
||||
|
||||
|
|
|
@ -99,14 +99,18 @@
|
|||
:left left
|
||||
:options [(when-not (:is-default project)
|
||||
[(tr "labels.rename") on-edit])
|
||||
[(tr "dashboard.duplicate") on-duplicate]
|
||||
[(tr "dashboard.pin-unpin") toggle-pin]
|
||||
(when (seq teams)
|
||||
(when-not (:is-default project)
|
||||
[(tr "dashboard.duplicate") on-duplicate])
|
||||
(when-not (:is-default project)
|
||||
[(tr "dashboard.pin-unpin") toggle-pin])
|
||||
(when (and (seq teams) (not (:is-default project)))
|
||||
[(tr "dashboard.move-to") nil
|
||||
(for [team teams]
|
||||
[(:name team) (on-move (:id team))])])
|
||||
(when (some? on-import)
|
||||
[(tr "dashboard.import") on-import-files])
|
||||
[:separator]
|
||||
[(tr "labels.delete") on-delete]]}]]))
|
||||
(when-not (:is-default project)
|
||||
[:separator])
|
||||
(when-not (:is-default project)
|
||||
[(tr "labels.delete") on-delete])]}]]))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue