Просмотр исходного кода

enhance(editor): rename quick-capture config keys

Andelf 3 лет назад
Родитель
Сommit
3cbaf1abed
2 измененных файлов с 7 добавлено и 4 удалено
  1. 2 2
      src/main/electron/listener.cljs
  2. 5 2
      templates/config.edn

+ 2 - 2
src/main/electron/listener.cljs

@@ -158,10 +158,10 @@
                      (fn [args]
                        (let [{:keys [url title content page append]} (bean/->clj args)
                              insert-today? (get-in (state/get-config)
-                                                   [:quick-capture-options :insert-today]
+                                                   [:quick-capture-options :insert-today?]
                                                    false)
                              redirect-page? (get-in (state/get-config)
-                                                   [:quick-capture-options :redirect-page]
+                                                   [:quick-capture-options :redirect-page?]
                                                    false)
                              today-page (when (state/enable-journals?)
                                           (string/lower-case (date/today)))

+ 5 - 2
templates/config.edn

@@ -254,7 +254,7 @@
  ;; ignore #+keyword: for parsing page references in orgmode
  ;; :ignored-page-references-keywords #{"author" "startup"}
 
- ;; Quick capture templates on mobile for recieving contents from other apps.
+ ;; Quick capture templates for recieving contents from other apps.
  ;; Each template contains three elements {time}, {text} and {url}, which can be auto-expanded
  ;; by received contents from other apps. Note: the {} cannot be omitted.
  ;; - {time}: capture time
@@ -266,6 +266,9 @@
  ;; {:text "[[quick capture]] **{time}**: {text} from {url}"
  ;;  :media "[[quick capture]] **{time}**: {url}"}
 
+ ;; Quick capture options
+ ;; :quick-capture-options {:insert-today? false :redirect-page? false}
+
  ;; File sync options
  ;; Ignore these files when syncing, regexp is supported.
  ;; :file-sync/ignore-files []
@@ -284,7 +287,7 @@
  ;; Decide the way to escape the special characters in the page title.
  ;; Warning:
  ;;   This is a dangerous operation. If you want to change the setting,
- ;;   should access the setting `Filename format` and follow the instructions. 
+ ;;   should access the setting `Filename format` and follow the instructions.
  ;;   Or you have to rename all the affected files manually then re-index on all
  ;;   clients after the files are synced. Wrong handling may cause page titles
  ;;   containing special characters to be messy.