Skip to content

Commit

Permalink
fix header icons display when :custom-default-page non-nils
Browse files Browse the repository at this point in the history
  • Loading branch information
llcc authored and tiensonqin committed Jun 15, 2022
1 parent 3cac7d8 commit 7bab446
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/frontend/components/header.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,11 @@
(not (mobile-util/native-platform?))
(not config/publishing?))
left-menu (left-menu-button {:on-click (fn []
(open-fn)
(state/set-left-sidebar-open!
(not (:ui/left-sidebar-open? @state/state))))})]
(open-fn)
(state/set-left-sidebar-open!
(not (:ui/left-sidebar-open? @state/state))))})
custom-home-page? (and (state/custom-home-page?)
(= (state/sub-default-home-page) (state/get-current-page)))]
[:div.cp__header#head
{:class (util/classnames [{:electron-mac electron-mac?
:native-ios (mobile-util/native-ios?)
Expand All @@ -254,7 +256,7 @@
(state/pub-event! [:go/search]))}
(ui/icon "search" {:style {:fontSize ui/icon-size}})]))])
(when (mobile-util/native-platform?)
(if (state/home?)
(if (or (state/home?) custom-home-page?)
left-menu
(ui/with-shortcut :go/backward "bottom"
[:button.it.navigation.nav-left.button.icon
Expand All @@ -269,7 +271,8 @@
(when plugin-handler/lsp-enabled?
(plugins/hook-ui-items :toolbar))

(when (not= (state/get-current-route) :home)
(when (and (not= (state/get-current-route) :home)
(not custom-home-page?))
(home-button))

(when (util/electron?)
Expand Down

0 comments on commit 7bab446

Please sign in to comment.