mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 08:09:14 -05:00
🐛 Fix version history control exit is not intuitive
This commit is contained in:
parent
8ae326ed06
commit
ad552eaf68
1 changed files with 10 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.context :as muc]
|
[app.main.ui.context :as muc]
|
||||||
|
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||||
[app.main.ui.ds.foundations.assets.icon :refer [icon*]]
|
[app.main.ui.ds.foundations.assets.icon :refer [icon*]]
|
||||||
[app.main.ui.ds.layout.tab-switcher :refer [tab-switcher*]]
|
[app.main.ui.ds.layout.tab-switcher :refer [tab-switcher*]]
|
||||||
[app.main.ui.hooks.resize :refer [use-resize-hook]]
|
[app.main.ui.hooks.resize :refer [use-resize-hook]]
|
||||||
|
@ -205,6 +206,9 @@
|
||||||
(fn [section]
|
(fn [section]
|
||||||
(reset! current-section* section)))
|
(reset! current-section* section)))
|
||||||
|
|
||||||
|
on-close-history
|
||||||
|
(mf/use-fn #(st/emit! (dw/remove-layout-flag :document-history)))
|
||||||
|
|
||||||
handle-expand
|
handle-expand
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
(mf/deps size)
|
(mf/deps size)
|
||||||
|
@ -255,7 +259,12 @@
|
||||||
{:tabs #js [#js {:label (tr "workspace.versions.tab.history") :id "history" :content versions-tab}
|
{:tabs #js [#js {:label (tr "workspace.versions.tab.history") :id "history" :content versions-tab}
|
||||||
#js {:label (tr "workspace.versions.tab.actions") :id "actions" :content history-tab}]
|
#js {:label (tr "workspace.versions.tab.actions") :id "actions" :content history-tab}]
|
||||||
:default-selected "history"
|
:default-selected "history"
|
||||||
:class (stl/css :left-sidebar-tabs)}]
|
:class (stl/css :left-sidebar-tabs)
|
||||||
|
:action-button-position "end"
|
||||||
|
:action-button (mf/html [:> icon-button* {:variant "ghost"
|
||||||
|
:aria-label (tr "labels.close")
|
||||||
|
:on-click on-close-history
|
||||||
|
:icon "close"}])}]
|
||||||
|
|
||||||
:else
|
:else
|
||||||
[:> options-toolbox props])]]]))
|
[:> options-toolbox props])]]]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue