mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 05:04:24 +00:00
enhance(mobile): improve settings options
This commit is contained in:
@@ -223,11 +223,24 @@
|
||||
|
||||
(= tab "settings")
|
||||
(assoc
|
||||
:right-render [:<>
|
||||
(shui/button {:variant :icon :size :sm}
|
||||
(shui/tabler-icon "plus" {:size 23}))
|
||||
(shui/button {:variant :icon :size :sm}
|
||||
(shui/tabler-icon "dots" {:size 23}))])))
|
||||
:right-render
|
||||
[:<>
|
||||
(shui/button
|
||||
{:variant :icon :size :sm
|
||||
:on-click (fn []
|
||||
(ui-component/open-popup!
|
||||
(fn []
|
||||
[:div.-mx-2
|
||||
(ui/menu-link {:on-click #(user-handler/logout)}
|
||||
[:span.text-lg.flex.gap-2.items-center.text-red-700
|
||||
(shui/tabler-icon "logout" {:class "opacity-80" :size 22})
|
||||
"Logout"])
|
||||
(ui/menu-link {:on-click #(js/window.open "https://github.com/logseq/db-test/issues")}
|
||||
[:span.text-lg.flex.gap-2.items-center
|
||||
(shui/tabler-icon "bug" {:class "opacity-70" :size 22})
|
||||
"Report bug"])])
|
||||
{:title "Actions"}))}
|
||||
(shui/tabler-icon "dots" {:size 23}))])))
|
||||
|
||||
;; app tabs
|
||||
(ui-silk/app-silk-tabs)
|
||||
|
||||
@@ -70,17 +70,16 @@
|
||||
{:error-handler
|
||||
(fn [{:keys [msg]}]
|
||||
(notification/show! msg :warning))})))))}
|
||||
[:span.text-lg.flex.gap-2.items-center
|
||||
(shui/tabler-icon "trash" {:class "opacity-80" :size 18})
|
||||
[:span.text-lg.flex.gap-2.items-center.text-red-700
|
||||
(shui/tabler-icon "trash" {:class "opacity-80" :size 22})
|
||||
"Delete"])
|
||||
|
||||
(ui/menu-link
|
||||
{:on-click #(mobile-ui/close-popup!)}
|
||||
[:span.text-lg.flex.gap-2.items-center
|
||||
(shui/tabler-icon "copy" {:class "opacity-80" :size 18})
|
||||
(shui/tabler-icon "copy" {:class "opacity-80" :size 22})
|
||||
"Copy"])])
|
||||
{:title "Actions"
|
||||
:modal-props {:initialBreakpoint 0.3}}))}
|
||||
{:title "Actions"}))}
|
||||
(shui/tabler-icon "dots-vertical" {:size 18 :stroke 2})]]
|
||||
|
||||
;; block page content
|
||||
|
||||
@@ -26,32 +26,8 @@
|
||||
|
||||
(rum/defc page < rum/reactive
|
||||
[]
|
||||
(let [login? (and (state/sub :auth/id-token) (user-handler/logged-in?))]
|
||||
;(let [buttons (->> [(when login?
|
||||
; {:text "Logout" :role "logout"})
|
||||
; {:text "Report bug" :role "report-bug"}]
|
||||
; (remove nil?))]
|
||||
; (ion/buttons {:slot "end"}
|
||||
; (ion/button
|
||||
; {:size "small"
|
||||
; :fill "clear"
|
||||
; :on-click (fn [_e]
|
||||
; (ui-component/open-modal! "Settings"
|
||||
; {:type :action-sheet
|
||||
; :buttons buttons
|
||||
; :inputs []
|
||||
; :on-action (fn [e]
|
||||
; (when-let [role (:role e)]
|
||||
; (case role
|
||||
; "logout"
|
||||
; (user-handler/logout)
|
||||
; "report-bug"
|
||||
; (js/window.open "https://github.com/logseq/db-test/issues" "_blank")
|
||||
; nil)))
|
||||
; :modal-props {:class "graph-switcher"}}))}
|
||||
; [:span.text-muted-foreground {:slot "icon-only"}
|
||||
; (ion/tabler-icon "dots" {:size 20})])))
|
||||
|
||||
(let [login? (and (state/sub :auth/id-token)
|
||||
(user-handler/logged-in?))]
|
||||
[:div.app-index-settings
|
||||
(user-profile login?)
|
||||
[:div.mt-8
|
||||
|
||||
Reference in New Issue
Block a user