mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 15:09:41 +00:00
enhance(mobile): clickable link item for the left sidebar item
This commit is contained in:
@@ -135,16 +135,17 @@
|
||||
;; TODO: move to standalone component
|
||||
[:a.link-item.group
|
||||
(cond->
|
||||
{:on-click
|
||||
{(if (util/mobile?)
|
||||
:on-pointer-up :on-click)
|
||||
(fn [e]
|
||||
(if (gobj/get e "shiftKey")
|
||||
(open-in-sidebar)
|
||||
(route-handler/redirect-to-page! (:block/uuid page) {:click-from-recent? recent?})))
|
||||
:on-context-menu (fn [^js e]
|
||||
(shui/popup-show! e (x-menu-content)
|
||||
{:as-dropdown? true
|
||||
:content-props {:on-click (fn [] (shui/popup-hide!))
|
||||
:class "w-60"}})
|
||||
{:as-dropdown? true
|
||||
:content-props {:on-click (fn [] (shui/popup-hide!))
|
||||
:class "w-60"}})
|
||||
(util/stop e))}
|
||||
(ldb/object? page)
|
||||
(assoc :title (block-handler/block-unique-title page)))
|
||||
|
||||
@@ -81,6 +81,10 @@ ul {
|
||||
}
|
||||
}
|
||||
|
||||
a, button {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.bg-background {
|
||||
@apply bg-gray-01;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,9 @@
|
||||
[:div.w-full.app-silk-popup-content-inner.p-2
|
||||
[:div.left-sidebar-inner
|
||||
[:div.sidebar-contents-container.mt-8
|
||||
{:on-click (fn [^js e]
|
||||
(when (some-> (.-target e) (.closest ".link-item"))
|
||||
(mobile-state/toggle-left-sidebar!)))}
|
||||
{:on-pointer-down
|
||||
(fn [^js e]
|
||||
(when (some-> (.-target e) (.closest ".link-item"))
|
||||
(mobile-state/toggle-left-sidebar!)))}
|
||||
(container/sidebar-favorites)
|
||||
(container/sidebar-recent-pages)]]]))))))
|
||||
|
||||
Reference in New Issue
Block a user