Browse Source

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

charlie 7 months ago
parent
commit
b44147b1c9
2 changed files with 4 additions and 3 deletions
  1. 1 1
      src/main/frontend/components/header.cljs
  2. 3 2
      src/main/frontend/ui.cljs

+ 1 - 1
src/main/frontend/components/header.cljs

@@ -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

+ 3 - 2
src/main/frontend/ui.cljs

@@ -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