瀏覽代碼

feat: always show hamburger button for mobile

Peng Xiao 2 年之前
父節點
當前提交
28bf20672a
共有 2 個文件被更改,包括 10 次插入6 次删除
  1. 6 6
      src/main/frontend/components/header.cljs
  2. 4 0
      src/main/frontend/state.cljs

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

@@ -215,12 +215,12 @@
                               (state/pub-event! [:go/search]))}
               (ui/icon "search" {:size ui/icon-size})]))])
       (when (mobile-util/native-platform?)
-        (if (or (state/home?) custom-home-page?)
-          left-menu
-          (ui/with-shortcut :go/backward "bottom"
-            [:button.it.navigation.nav-left.button.icon.opacity-70
-             {:title "Go back" :on-click #(js/window.history.back)}
-             (ui/icon "chevron-left" {:size 26})])))]
+        [left-menu
+         (when-not (or (state/home?) custom-home-page? (state/whiteboard-dashboard?))
+           (ui/with-shortcut :go/backward "bottom"
+             [:button.it.navigation.nav-left.button.icon.opacity-70
+              {:title "Go back" :on-click #(js/window.history.back)}
+              (ui/icon "chevron-left" {:size 26})]))])]
 
      [:div.r.flex.drag-region
       (when (and current-repo

+ 4 - 0
src/main/frontend/state.cljs

@@ -710,6 +710,10 @@ Similar to re-frame subscriptions"
   []
   (= :home (get-current-route)))
 
+(defn whiteboard-dashboard?
+  []
+  (= :whiteboards (get-current-route)))
+
 (defn setups-picker?
   []
   (= :repo-add (get-current-route)))