mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
enhance(mobile): improve actions sheet style
This commit is contained in:
@@ -163,6 +163,36 @@ ul {
|
|||||||
.cp__emoji-icon-picker {
|
.cp__emoji-icon-picker {
|
||||||
@apply w-full;
|
@apply w-full;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.as-action-sheet {
|
||||||
|
.app-silk-popup-content-inner {
|
||||||
|
> h2 {
|
||||||
|
@apply text-center pb-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-link {
|
||||||
|
@apply border-b -mx-2 py-3;
|
||||||
|
|
||||||
|
.text-lg {
|
||||||
|
@apply inline-block w-full text-center text-xl;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui__icon {
|
||||||
|
@apply hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
@apply border-t;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
@apply -mb-4;
|
||||||
|
|
||||||
|
padding-bottom: calc(env(safe-area-inset-bottom) + 6px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.blocks-container {
|
.blocks-container {
|
||||||
|
|||||||
@@ -130,5 +130,6 @@
|
|||||||
[:span.text-lg.flex.gap-2.items-center
|
[:span.text-lg.flex.gap-2.items-center
|
||||||
(shui/tabler-icon "bug" {:class "opacity-70" :size 22})
|
(shui/tabler-icon "bug" {:class "opacity-70" :size 22})
|
||||||
"Report bug"])])
|
"Report bug"])])
|
||||||
{:title "Actions"}))}
|
{:title "Actions"
|
||||||
|
:type :action-sheet}))}
|
||||||
(shui/tabler-icon "dots" {:size 23}))]))))
|
(shui/tabler-icon "dots" {:size 23}))]))))
|
||||||
|
|||||||
@@ -55,6 +55,12 @@
|
|||||||
(mobile-ui/open-popup!
|
(mobile-ui/open-popup!
|
||||||
(fn []
|
(fn []
|
||||||
[:div.-mx-2
|
[:div.-mx-2
|
||||||
|
(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 22})
|
||||||
|
"Copy"])
|
||||||
|
|
||||||
(ui/menu-link
|
(ui/menu-link
|
||||||
{:on-click #(-> (shui/dialog-confirm!
|
{:on-click #(-> (shui/dialog-confirm!
|
||||||
(str "⚠️ Are you sure you want to delete this "
|
(str "⚠️ Are you sure you want to delete this "
|
||||||
@@ -72,14 +78,9 @@
|
|||||||
(notification/show! msg :warning))})))))}
|
(notification/show! msg :warning))})))))}
|
||||||
[:span.text-lg.flex.gap-2.items-center.text-red-700
|
[:span.text-lg.flex.gap-2.items-center.text-red-700
|
||||||
(shui/tabler-icon "trash" {:class "opacity-80" :size 22})
|
(shui/tabler-icon "trash" {:class "opacity-80" :size 22})
|
||||||
"Delete"])
|
"Delete"])])
|
||||||
|
{:title "Actions"
|
||||||
(ui/menu-link
|
:type :action-sheet}))}
|
||||||
{:on-click #(mobile-ui/close-popup!)}
|
|
||||||
[:span.text-lg.flex.gap-2.items-center
|
|
||||||
(shui/tabler-icon "copy" {:class "opacity-80" :size 22})
|
|
||||||
"Copy"])])
|
|
||||||
{:title "Actions"}))}
|
|
||||||
(shui/tabler-icon "dots-vertical" {:size 18 :stroke 2})]]
|
(shui/tabler-icon "dots-vertical" {:size 18 :stroke 2})]]
|
||||||
|
|
||||||
;; block page content
|
;; block page content
|
||||||
|
|||||||
@@ -81,17 +81,17 @@
|
|||||||
(state/clear-edit!)
|
(state/clear-edit!)
|
||||||
(state/pub-event! [:mobile/keyboard-will-hide])))}
|
(state/pub-event! [:mobile/keyboard-will-hide])))}
|
||||||
(:modal-props opts))
|
(:modal-props opts))
|
||||||
(silkhq/bottom-sheet-portal
|
(silkhq/bottom-sheet-portal
|
||||||
(silkhq/bottom-sheet-view
|
(silkhq/bottom-sheet-view
|
||||||
{:class "app-silk-popup-sheet-view"
|
{:class (str "app-silk-popup-sheet-view as-" (name (or (:type opts) "default")))
|
||||||
:onTravelEnd (fn []
|
:onTravelEnd (fn []
|
||||||
(when (= :ls-quick-add (:id opts))
|
(when (= :ls-quick-add (:id opts))
|
||||||
(js/setTimeout #(editor-handler/quick-add-open-last-block!) 50)))}
|
(js/setTimeout #(editor-handler/quick-add-open-last-block!) 50)))}
|
||||||
(silkhq/bottom-sheet-backdrop)
|
(silkhq/bottom-sheet-backdrop)
|
||||||
(silkhq/bottom-sheet-content
|
(silkhq/bottom-sheet-content
|
||||||
{:class "flex flex-col items-center p-2"}
|
{:class "flex flex-col items-center p-2"}
|
||||||
(silkhq/bottom-sheet-handle)
|
(silkhq/bottom-sheet-handle)
|
||||||
[:div.w-full.app-silk-popup-content-inner.p-2
|
[:div.w-full.app-silk-popup-content-inner.p-2
|
||||||
(when-let [title (:title opts)]
|
(when-let [title (:title opts)]
|
||||||
[:h2.py-2.opacity-40 title])
|
[:h2.py-2.opacity-40 title])
|
||||||
(if (fn? content-fn) (content-fn) content-fn)]))))))
|
(if (fn? content-fn) (content-fn) content-fn)]))))))
|
||||||
|
|||||||
Reference in New Issue
Block a user