mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 14:56:13 +02:00
✨ Enhance the behaviour of the artboards list on view mode
This commit is contained in:
parent
1797c702a7
commit
105cb6fa13
5 changed files with 22 additions and 5 deletions
|
@ -230,6 +230,8 @@
|
|||
:section section}]
|
||||
|
||||
[:div.viewer-content
|
||||
[:div.thumbnail-close {:on-click #(st/emit! dv/close-thumbnails-panel)
|
||||
:class (dom/classnames :invisible (not (:show-thumbnails local false)))}]
|
||||
[:& thumbnails-panel {:frames frames
|
||||
:show? (:show-thumbnails local false)
|
||||
:page page
|
||||
|
|
|
@ -172,6 +172,10 @@
|
|||
(let [go-to-dashboard
|
||||
(st/emitf (dv/go-to-dashboard))
|
||||
|
||||
go-to-handoff
|
||||
(fn []
|
||||
(st/emit! dv/close-thumbnails-panel (dv/go-to-section :handoff)))
|
||||
|
||||
navigate
|
||||
(fn [section]
|
||||
(st/emit! (dv/go-to-section section)))]
|
||||
|
@ -203,7 +207,7 @@
|
|||
(and (= (:type permissions) :share-link)
|
||||
(contains? (:flags permissions) :section-handoff)))
|
||||
[:button.mode-zone-button.tooltip.tooltip-bottom
|
||||
{:on-click #(navigate :handoff)
|
||||
{:on-click go-to-handoff
|
||||
:class (dom/classnames :active (= section :handoff))
|
||||
:alt (tr "viewer.header.handoff-section" (sc/get-tooltip :open-handoff))}
|
||||
i/code])]
|
||||
|
|
|
@ -104,14 +104,13 @@
|
|||
{:class (dom/classnames :expanded @expanded?
|
||||
:invisible (not show?))
|
||||
|
||||
:ref container
|
||||
}
|
||||
:ref container}
|
||||
|
||||
[:& thumbnails-summary {:on-toggle-expand #(swap! expanded? not)
|
||||
:on-close on-close
|
||||
:total (count frames)}]
|
||||
[:& thumbnails-content {:expanded? @expanded?
|
||||
:total (count frames)}
|
||||
:total (count frames)}
|
||||
(for [[i frame] (d/enumerate frames)]
|
||||
[:& thumbnail-item {:index i
|
||||
:frame frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue