fix(mobile): close left sidebar when create a new page

pull/3198/head
Tienson Qin 2021-11-30 11:10:58 +08:00
parent 6e796aea5d
commit 0990b3a988
2 changed files with 7 additions and 1 deletions

View File

@ -13,6 +13,9 @@
"backgroundColor": "#002b36"
}
},
"ios": {
"scheme": "Logseq"
},
"server": {
"url": "http://192.168.1.59:3001",
"cleartext": true

View File

@ -281,7 +281,10 @@
[:nav.px-2.space-y-1 {:aria-label "Sidebar"
:class "new-page"}
(when-not config/publishing?
[:a.item.group.flex.items-center.px-2.py-2.text-sm.font-medium.rounded-md {:on-click #(state/pub-event! [:go/search])}
[:a.item.group.flex.items-center.px-2.py-2.text-sm.font-medium.rounded-md
{:on-click (fn []
(state/toggle-left-sidebar!)
(state/pub-event! [:go/search]))}
(ui/icon "circle-plus mr-3" {:style {:font-size 20}})
[:span.flex-1 "New page"]])]]]))))