enhance(ui): improve layout and tooltip handling in header and shortcut components

This commit is contained in:
charlie
2025-03-04 14:23:02 +08:00
parent 7e5d8ed686
commit b44147b1c9
2 changed files with 4 additions and 3 deletions

View File

@@ -354,7 +354,7 @@
(mobile-util/native-platform?)
(util/scroll-to-top true))))
:style {:fontSize 50}}
[:div.l.flex.drag-region
[:div.l.flex.items-center.drag-region
[left-menu
(if (mobile-util/native-platform?)
;; back button for mobile

View File

@@ -908,8 +908,9 @@
(rum/defc with-shortcut < rum/reactive
< {:key-fn (fn [key pos] (str "shortcut-" key pos))}
[shortcut-key position content]
(let [tooltip? (state/sub :ui/shortcut-tooltip?)]
(if tooltip?
(let [shortcut-tooltip? (state/sub :ui/shortcut-tooltip?)
enabled-tooltip? (state/enable-tooltip?)]
(if (and enabled-tooltip? shortcut-tooltip?)
(tippy
{:html [:div.text-sm.font-medium (keyboard-shortcut-from-config shortcut-key)]
:interactive true