|
|
@@ -768,8 +768,7 @@
|
|
|
pos [(+ left (:left rect) -20) (+ top (:top rect) 20)]]
|
|
|
(let [pid (case action
|
|
|
:commands
|
|
|
- (shui/popup-show!
|
|
|
- pos
|
|
|
+ (shui/popup-show! pos
|
|
|
(commands id format)
|
|
|
{:id :editor.commands/commands
|
|
|
:align :start
|
|
|
@@ -782,6 +781,16 @@
|
|
|
:data-editor-popup-ref "commands"}
|
|
|
:force-popover? true})
|
|
|
|
|
|
+ :block-commands
|
|
|
+ (shui/popup-show! pos
|
|
|
+ (block-commands id format)
|
|
|
+ {:id :editor.commands/block-commands
|
|
|
+ :align :start
|
|
|
+ :content-props {:onOpenAutoFocus #(.preventDefault %)
|
|
|
+ :onCloseAutoFocus #(.preventDefault %)
|
|
|
+ :data-editor-popup-ref "commands"}
|
|
|
+ :force-popover? true})
|
|
|
+
|
|
|
:datepicker
|
|
|
(shui/popup-show!
|
|
|
pos (datetime-comp/date-picker id format nil)
|
|
|
@@ -847,7 +856,7 @@
|
|
|
(= action :commands-classic)
|
|
|
(animated-modal "commands" (commands id format) true)
|
|
|
|
|
|
- (= action :block-commands)
|
|
|
+ (= action :block-commands-classic)
|
|
|
(animated-modal "block-commands" (block-commands id format) true)
|
|
|
|
|
|
(contains? #{:page-search :page-search-hashtag} action)
|
|
|
@@ -865,21 +874,6 @@
|
|
|
(= :property-value-search action)
|
|
|
(animated-modal "property-value-search" (property-value-search id) true)
|
|
|
|
|
|
- ;; date-picker in editing-mode
|
|
|
- (= :datepicker-classic action)
|
|
|
- (animated-modal "date-picker" (datetime-comp/date-picker id format nil) false)
|
|
|
-
|
|
|
- (= :select-code-block-mode-classic action)
|
|
|
- (animated-modal "select-code-block-mode" (code-block-mode-picker id format) true)
|
|
|
-
|
|
|
- (= :input-classic action)
|
|
|
- (animated-modal "input" (input id
|
|
|
- (fn [command m]
|
|
|
- (editor-handler/handle-command-input command id format m))
|
|
|
- (fn []
|
|
|
- (editor-handler/handle-command-input-close id)))
|
|
|
- true)
|
|
|
-
|
|
|
(= :zotero action)
|
|
|
(animated-modal "zotero-search" (zotero/zotero-search id) false)
|
|
|
|