|
@@ -1,7 +1,9 @@
|
|
|
(ns mobile.components.ui-silk
|
|
(ns mobile.components.ui-silk
|
|
|
"Mobile top header and bottom tabs"
|
|
"Mobile top header and bottom tabs"
|
|
|
(:require [frontend.handler.editor :as editor-handler]
|
|
(:require [frontend.handler.editor :as editor-handler]
|
|
|
|
|
+ [frontend.state :as state]
|
|
|
[frontend.util :as util]
|
|
[frontend.util :as util]
|
|
|
|
|
+ [logseq.shui.hooks :as hooks]
|
|
|
[logseq.shui.ui :as shui]
|
|
[logseq.shui.ui :as shui]
|
|
|
[mobile.state :as mobile-state]
|
|
[mobile.state :as mobile-state]
|
|
|
[rum.core :as rum]))
|
|
[rum.core :as rum]))
|
|
@@ -34,25 +36,30 @@
|
|
|
{:class (when (= current-tab "home") "active")
|
|
{:class (when (= current-tab "home") "active")
|
|
|
:data-tab "home"}
|
|
:data-tab "home"}
|
|
|
(shui/button {:variant :icon}
|
|
(shui/button {:variant :icon}
|
|
|
- (shui/tabler-icon "home" {:size 24}))
|
|
|
|
|
|
|
+ (shui/tabler-icon "home" {:size 24}))
|
|
|
[:small "Journals"]]
|
|
[:small "Journals"]]
|
|
|
[:span.as-item
|
|
[:span.as-item
|
|
|
{:class (when (= current-tab "search") "active")
|
|
{:class (when (= current-tab "search") "active")
|
|
|
:data-tab "search"}
|
|
:data-tab "search"}
|
|
|
(shui/button {:variant :icon}
|
|
(shui/button {:variant :icon}
|
|
|
- (shui/tabler-icon "search" {:size 24}))
|
|
|
|
|
|
|
+ (shui/tabler-icon "search" {:size 24}))
|
|
|
[:small "Search"]]
|
|
[:small "Search"]]
|
|
|
[:span.as-item
|
|
[:span.as-item
|
|
|
(shui/button
|
|
(shui/button
|
|
|
- {:variant :icon
|
|
|
|
|
- :on-click (fn [^js e]
|
|
|
|
|
- (util/stop e)
|
|
|
|
|
- (editor-handler/show-quick-add))}
|
|
|
|
|
- (shui/tabler-icon "plus" {:size 24}))
|
|
|
|
|
|
|
+ (merge
|
|
|
|
|
+ {:variant :icon}
|
|
|
|
|
+ (hooks/use-long-press
|
|
|
|
|
+ {:on-click (fn [^js e]
|
|
|
|
|
+ (util/stop e)
|
|
|
|
|
+ (editor-handler/show-quick-add))
|
|
|
|
|
+ :on-long-press (fn [_e]
|
|
|
|
|
+ (state/pub-event! [:mobile/start-audio-record]))
|
|
|
|
|
+ :delay 500}))
|
|
|
|
|
+ (shui/tabler-icon "plus" {:size 24}))
|
|
|
[:small "Quick add"]]
|
|
[:small "Quick add"]]
|
|
|
[:span.as-item
|
|
[:span.as-item
|
|
|
{:class (when (= current-tab "settings") "active")
|
|
{:class (when (= current-tab "settings") "active")
|
|
|
:data-tab "settings"}
|
|
:data-tab "settings"}
|
|
|
(shui/button {:variant :icon}
|
|
(shui/button {:variant :icon}
|
|
|
- (shui/tabler-icon "settings" {:size 24}))
|
|
|
|
|
|
|
+ (shui/tabler-icon "settings" {:size 24}))
|
|
|
[:small "Settings"]]]))
|
|
[:small "Settings"]]]))
|