Prechádzať zdrojové kódy

fix: set default file format to nil

Tienson Qin 2 rokov pred
rodič
commit
91d70535ee

+ 2 - 1
src/main/frontend/fs/sync.cljs

@@ -494,7 +494,8 @@
         reserved-paths (filter f paths)]
     (when (seq reserved-paths)
       (let [paths (if path-string? reserved-paths (map -relative-path reserved-paths))]
-        (state/pub-event! [:ui/notify-outdated-filename-format paths])
+        (when (seq paths)
+          (state/pub-event! [:ui/notify-outdated-filename-format paths]))
         (prn "Skipped uploading those file paths with reserved chars: " paths)))
     (vec (remove f paths))))
 

+ 1 - 1
src/main/frontend/handler/events.cljs

@@ -364,7 +364,7 @@
   (repo-handler/graph-ready! repo)
   (when (and (util/electron?)
              (not (config/demo-graph?))
-             (= :legacy (state/get-filename-format)))
+             (= :legacy (state/get-filename-format repo)))
     (state/pub-event! [:ui/notify-outdated-filename-format []])))
 
 (defmethod handle :notification/show [[_ {:keys [content status clear?]}]]

+ 2 - 5
src/main/frontend/state.cljs

@@ -69,7 +69,7 @@
 
      ;; ui
      :ui/viewport                           {}
-     
+
      ;; left sidebar
      :ui/navigation-item-collapsed?         {}
 
@@ -307,10 +307,7 @@
 (def default-config
   "Default config for a repo-specific, user config"
   {:feature/enable-search-remove-accents? true
-   :default-arweave-gateway "https://arweave.net"
-
-   ;; For flushing the settings of old versions. Don't bump this value.
-   :file/name-format :legacy})
+   :default-arweave-gateway "https://arweave.net"})
 
 ;; State that most user config is dependent on
 (declare get-current-repo sub set-state!)

+ 0 - 3
templates/config.edn

@@ -295,8 +295,5 @@
  ;;   :file/name-format :triple-lowbar
  ;;     ;use triple underscore `___` for slash `/` in page title
  ;;     ;use Percent-encoding for other invalid characters
- ;;   :file/name-format :legacy
- ;;     ;use Percent-encoding for slash and other invalid characters
- ;;     ;parse `.` in file name as slash `/` in page title
  :file/name-format :triple-lowbar
  }