|
@@ -15,6 +15,7 @@
|
|
|
[frontend.components.plugins :as plugin]
|
|
[frontend.components.plugins :as plugin]
|
|
|
[frontend.components.search :as component-search]
|
|
[frontend.components.search :as component-search]
|
|
|
[frontend.components.shell :as shell]
|
|
[frontend.components.shell :as shell]
|
|
|
|
|
+ [frontend.components.command-palette :as command-palette]
|
|
|
[frontend.config :as config]
|
|
[frontend.config :as config]
|
|
|
[frontend.context.i18n :refer [t]]
|
|
[frontend.context.i18n :refer [t]]
|
|
|
[frontend.db :as db]
|
|
[frontend.db :as db]
|
|
@@ -42,6 +43,7 @@
|
|
|
[frontend.handler.user :as user-handler]
|
|
[frontend.handler.user :as user-handler]
|
|
|
[frontend.handler.shell :as shell-handler]
|
|
[frontend.handler.shell :as shell-handler]
|
|
|
[frontend.handler.web.nfs :as nfs-handler]
|
|
[frontend.handler.web.nfs :as nfs-handler]
|
|
|
|
|
+ [frontend.handler.command-palette :as cp]
|
|
|
[frontend.mobile.core :as mobile]
|
|
[frontend.mobile.core :as mobile]
|
|
|
[frontend.mobile.util :as mobile-util]
|
|
[frontend.mobile.util :as mobile-util]
|
|
|
[frontend.mobile.graph-picker :as graph-picker]
|
|
[frontend.mobile.graph-picker :as graph-picker]
|
|
@@ -708,6 +710,12 @@
|
|
|
opts))
|
|
opts))
|
|
|
{:center? true :close-btn? false :close-backdrop? false}))
|
|
{:center? true :close-btn? false :close-backdrop? false}))
|
|
|
|
|
|
|
|
|
|
+(defmethod handle :modal/command-palette [_]
|
|
|
|
|
+ (state/set-modal!
|
|
|
|
|
+ #(command-palette/command-palette {:commands (cp/get-commands)})
|
|
|
|
|
+ {:fullscreen? false
|
|
|
|
|
+ :close-btn? false}))
|
|
|
|
|
+
|
|
|
(defmethod handle :journal/insert-template [[_ page-name]]
|
|
(defmethod handle :journal/insert-template [[_ page-name]]
|
|
|
(let [page-name (util/page-name-sanity-lc page-name)]
|
|
(let [page-name (util/page-name-sanity-lc page-name)]
|
|
|
(when-let [page (db/pull [:block/name page-name])]
|
|
(when-let [page (db/pull [:block/name page-name])]
|