Selaa lähdekoodia

Merge branch 'master' into feat/db

Gabriel Horner 2 vuotta sitten
vanhempi
sitoutus
5d723cd221

+ 4 - 4
ios/App/App.xcodeproj/project.pbxproj

@@ -519,7 +519,7 @@
 				INFOPLIST_FILE = App/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				MARKETING_VERSION = 0.9.19;
+				MARKETING_VERSION = 0.9.20;
 				OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
 				PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq;
 				PRODUCT_NAME = "$(TARGET_NAME)";
@@ -546,7 +546,7 @@
 				INFOPLIST_FILE = App/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				MARKETING_VERSION = 0.9.19;
+				MARKETING_VERSION = 0.9.20;
 				PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
@@ -571,7 +571,7 @@
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
-				MARKETING_VERSION = 0.9.19;
+				MARKETING_VERSION = 0.9.20;
 				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
 				MTL_FAST_MATH = YES;
 				PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq.ShareViewController;
@@ -598,7 +598,7 @@
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
-				MARKETING_VERSION = 0.9.19;
+				MARKETING_VERSION = 0.9.20;
 				MTL_FAST_MATH = YES;
 				PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq.ShareViewController;
 				PRODUCT_NAME = "$(TARGET_NAME)";

+ 9 - 5
src/main/frontend/components/shortcut2.cljs

@@ -284,7 +284,8 @@
 
       [:div.shortcuts-keys-wrap
        [:span.keyboard-shortcut.flex.flex-wrap.mr-2.space-x-2
-        (for [x current-binding]
+        (for [x current-binding
+              :when (string? x)]
           [:code.tracking-wider
            (-> x (string/trim) (string/lower-case) (shortcut-utils/decorate-binding))
            [:a.x {:on-click (fn [] (set-current-binding!
@@ -428,7 +429,9 @@
                           disabled? (or (false? user-binding)
                                         (false? (first binding)))
                           unset? (and (not disabled?)
-                                      (= user-binding []))]]
+                                      (or (= user-binding [])
+                                          (and (= binding [])
+                                               (nil? user-binding))))]]
 
                 (when (or (nil? (seq filters))
                           (when (contains? filters :Custom) custom?)
@@ -453,11 +456,11 @@
 
                      [:a.action-wrap
                       {:class    (util/classnames [{:disabled disabled?}])
-                       :on-click (when-not disabled?
+                       :on-click (when (and id (not disabled?))
                                    #(open-customize-shortcut-dialog! id))}
 
                       (cond
-                        (or user-binding (false? user-binding))
+                        (or unset? user-binding (false? user-binding))
                         [:code.dark:bg-green-800.bg-green-300
                          (if unset?
                            (t :keymap/unset)
@@ -473,4 +476,5 @@
                         (for [x binding]
                           [:code.tracking-wide
                            {:key (str x)}
-                           (dh/binding-for-display id x)]))]]))))])])]]))
+                           (dh/binding-for-display id x)]))
+                      ]]))))])])]]))

+ 14 - 14
src/main/frontend/modules/shortcut/config.cljs

@@ -181,7 +181,7 @@
    :cards/recall                            {:binding "t"
                                              :fn      srs/recall}
 
-   :editor/escape-editing                   {:binding false
+   :editor/escape-editing                   {:binding []
                                              :fn      (fn [_ _]
                                                         (editor-handler/escape-editing))}
 
@@ -338,7 +338,7 @@
    :editor/zoom-out                         {:binding (if mac? "mod+," "alt+left")
                                              :fn      editor-handler/zoom-out!}
 
-   :editor/toggle-undo-redo-mode            {:binding false
+   :editor/toggle-undo-redo-mode            {:binding []
                                              :fn      undo-redo/toggle-undo-redo-mode!}
 
    :editor/toggle-number-list               {:binding "t n"
@@ -406,8 +406,8 @@
                                                          (state/pub-event! [:modal/command-palette]))}
 
    :graph/export-as-html                    {:fn      #(export-handler/download-repo-as-html!
-                                                        (state/get-current-repo))
-                                             :binding false}
+                                                         (state/get-current-repo))
+                                             :binding []}
 
    :graph/open                              {:fn      #(do
                                                          (editor-handler/escape-editing)
@@ -417,10 +417,10 @@
    :graph/remove                            {:fn      #(do
                                                          (editor-handler/escape-editing)
                                                          (state/set-state! :ui/open-select :graph-remove))
-                                             :binding false}
+                                             :binding []}
 
    :graph/add                               {:fn      (fn [] (route-handler/redirect! {:to :repo-add}))
-                                             :binding false}
+                                             :binding []}
 
    :graph/db-add                            {:fn #(state/pub-event! [:graph/new-db-graph])
                                              ;; TODO: Remove this once feature is released
@@ -428,12 +428,12 @@
                                              :binding false}
 
    :graph/save                              {:fn      #(state/pub-event! [:graph/save])
-                                             :binding false}
+                                             :binding []}
 
    :graph/re-index                          {:fn      (fn []
                                                         (p/let [multiple-windows? (ipc/ipc "graphHasMultipleWindows" (state/get-current-repo))]
                                                           (state/pub-event! [:graph/ask-for-re-index (atom multiple-windows?) nil])))
-                                             :binding false}
+                                             :binding []}
 
    :command/run                             {:binding  "mod+shift+1"
                                              :inactive (not (util/electron?))
@@ -510,7 +510,7 @@
                                              :inactive (not (util/electron?))
                                              :fn       page-handler/copy-current-file}
 
-   :editor/copy-page-url                    {:binding  false
+   :editor/copy-page-url                    {:binding  []
                                              :inactive (not (util/electron?))
                                              :fn       #(page-handler/copy-page-url)}
 
@@ -532,7 +532,7 @@
                                              :inactive (not (config/plugin-config-enabled?))
                                              :fn       plugin-config-handler/open-replace-plugins-modal}
 
-   :ui/clear-all-notifications              {:binding false
+   :ui/clear-all-notifications              {:binding []
                                              :fn      :frontend.handler.notification/clear-all!}
 
    :editor/toggle-open-blocks               {:binding "t o"
@@ -545,19 +545,19 @@
                                              :inactive (not (util/electron?))
                                              :fn       commit/show-commit-modal!}
 
-   :dev/show-block-data                     {:binding  false
+   :dev/show-block-data                     {:binding  []
                                              :inactive (not (state/developer-mode?))
                                              :fn       :frontend.handler.common.developer/show-block-data}
 
-   :dev/show-block-ast                      {:binding  false
+   :dev/show-block-ast                      {:binding  []
                                              :inactive (not (state/developer-mode?))
                                              :fn       :frontend.handler.common.developer/show-block-ast}
 
-   :dev/show-page-data                      {:binding  false
+   :dev/show-page-data                      {:binding  []
                                              :inactive (not (state/developer-mode?))
                                              :fn       :frontend.handler.common.developer/show-page-data}
 
-   :dev/show-page-ast                       {:binding  false
+   :dev/show-page-ast                       {:binding  []
                                              :inactive (not (state/developer-mode?))
                                              :fn       :frontend.handler.common.developer/show-page-ast}})
 

+ 20 - 1
src/resources/dicts/nb-no.edn

@@ -791,4 +791,23 @@
  :right-side-bar/pane-expand "Ekspander"
  :right-side-bar/pane-expand-all "Ekspander alle"
  :right-side-bar/pane-more "Mer"
- :right-side-bar/pane-open-as-page "Åpne som side"}
+ :right-side-bar/pane-open-as-page "Åpne som side"
+ :reset "Nullstill"
+ :command.window/close "Lukk vindu"
+ :file-sync/connectivity-testing-failed "Test av nettverksforbindelse feilet. Vennligst sjekk dine nettverksinnstillinger. Test URLer: "
+ :keymap/all "Alle"
+ :keymap/conflicts-for-label "Tastaturkonflikt for"
+ :keymap/custom "Tilpasset"
+ :keymap/customize-for-label "Tilpass snarveier"
+ :keymap/disabled "Deaktivert"
+ :keymap/keystroke-filter "Tastetrykk filter"
+ :keymap/keystroke-record-desc "Trykk en sekvens av taster for å filtrere snarveier"
+ :keymap/keystroke-record-setup-label "Trykk en sekvens av taster for å sette en snarvei"
+ :keymap/restore-to-default "Tilbakestill til systemstandard"
+ :keymap/search "Søk"
+ :keymap/total "Totale snarveier"
+ :keymap/unset "Avstill"
+ :settings-page/auto-chmod "Automatisk endre filtillatelser"
+ :settings-page/auto-chmod-desc "Deaktiver for å tillate redigering av flere brukere med tillatelser gitt av gruppemedlemskap."
+ :settings-page/tab-keymap "Tastatur"
+ :whiteboard/toggle-pen-mode "Veksle pen-modus"}