mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
✨ Some visual fixes
This commit is contained in:
parent
8d634a79c8
commit
0b8b766b62
3 changed files with 22 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
.zoom-widget {
|
.zoom-widget {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: $color-gray-10;
|
color: $color-gray-10;
|
||||||
|
@ -16,8 +17,10 @@
|
||||||
|
|
||||||
.dropdown {
|
.dropdown {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 12;
|
right: 0;
|
||||||
|
top: 25px;
|
||||||
width: 210px;
|
width: 210px;
|
||||||
|
z-index: 12;
|
||||||
|
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
border-radius: $br-small;
|
border-radius: $br-small;
|
||||||
|
|
|
@ -219,6 +219,12 @@
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(update-in state [:viewer-local :show-thumbnails] not))))
|
(update-in state [:viewer-local :show-thumbnails] not))))
|
||||||
|
|
||||||
|
(def close-thumbnails-panel
|
||||||
|
(ptk/reify ::close-thumbnails-panel
|
||||||
|
ptk/UpdateEvent
|
||||||
|
(update [_ state]
|
||||||
|
(assoc-in state [:viewer-local :show-thumbnails] false))))
|
||||||
|
|
||||||
(def select-prev-frame
|
(def select-prev-frame
|
||||||
(ptk/reify ::select-prev-frame
|
(ptk/reify ::select-prev-frame
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
|
|
|
@ -84,15 +84,23 @@
|
||||||
|
|
||||||
show-dropdown? (mf/use-state false)
|
show-dropdown? (mf/use-state false)
|
||||||
|
|
||||||
|
open-dropdown
|
||||||
|
(fn []
|
||||||
|
(reset! show-dropdown? true)
|
||||||
|
(st/emit! dv/close-thumbnails-panel))
|
||||||
|
|
||||||
|
close-dropdown
|
||||||
|
(fn []
|
||||||
|
(reset! show-dropdown? false))
|
||||||
|
|
||||||
navigate-to
|
navigate-to
|
||||||
(fn [page-id]
|
(fn [page-id]
|
||||||
(st/emit! (dv/go-to-page page-id))
|
(st/emit! (dv/go-to-page page-id))
|
||||||
(reset! show-dropdown? false))
|
(reset! show-dropdown? false))]
|
||||||
]
|
|
||||||
|
|
||||||
[:div.sitemap-zone {:alt (tr "viewer.header.sitemap")}
|
[:div.sitemap-zone {:alt (tr "viewer.header.sitemap")}
|
||||||
[:div.breadcrumb
|
[:div.breadcrumb
|
||||||
{:on-click #(swap! show-dropdown? not)}
|
{:on-click open-dropdown}
|
||||||
[:span.project-name project-name]
|
[:span.project-name project-name]
|
||||||
[:span "/"]
|
[:span "/"]
|
||||||
[:span.file-name file-name]
|
[:span.file-name file-name]
|
||||||
|
@ -101,7 +109,7 @@
|
||||||
[:span.icon i/arrow-down]
|
[:span.icon i/arrow-down]
|
||||||
|
|
||||||
[:& dropdown {:show @show-dropdown?
|
[:& dropdown {:show @show-dropdown?
|
||||||
:on-close #(swap! show-dropdown? not)}
|
:on-close close-dropdown}
|
||||||
[:ul.dropdown
|
[:ul.dropdown
|
||||||
(for [id (get-in file [:data :pages])]
|
(for [id (get-in file [:data :pages])]
|
||||||
[:li {:id (str id)
|
[:li {:id (str id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue