Skip to content

Commit

Permalink
feat: always show hamburger button for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 authored and tiensonqin committed Dec 14, 2022
1 parent cc3abd5 commit 28bf206
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/frontend/components/header.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/main/frontend/state.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 28bf206

Please sign in to comment.