🐛 Fix tooltip on toggle visibility and toggle lock buttons

This commit is contained in:
Eva 2023-08-29 08:15:38 +02:00 committed by Andrey Antukh
parent 661e4a001a
commit dc813732c3
2 changed files with 8 additions and 0 deletions

View file

@ -22,6 +22,7 @@
[app.main.ui.icons :as i]
[app.main.ui.workspace.sidebar.layer-name :refer [layer-name]]
[app.util.dom :as dom]
[app.util.i18n :refer [tr]]
[app.util.keyboard :as kbd]
[app.util.timers :as ts]
[beicon.core :as rx]
@ -269,10 +270,16 @@
(css :selected) (:blocked item))}
[:button {:class (dom/classnames (css :toggle-element) true
(css :selected) (:hidden item))
:title (if (:hidden item)
(tr "workspace.shape.menu.show")
(tr "workspace.shape.menu.hide"))
:on-click toggle-visibility}
(if (:hidden item) i/hide-refactor i/shown-refactor)]
[:button {:class (dom/classnames (css :block-element) true
(css :selected) (:blocked item))
:title (if (:blocked item)
(tr "workspace.shape.menu.unlock")
(tr "workspace.shape.menu.lock"))
:on-click toggle-blocking}
(if (:blocked item) i/lock-refactor i/unlock-refactor)]]]]
(when (and (:shapes item) expanded?)