Browse Source

Merge branch 'master' into feat/web-bi-client

charlie 1 năm trước cách đây
mục cha
commit
30eb126a8d
48 tập tin đã thay đổi với 258 bổ sung165 xóa
  1. 2 1
      Dockerfile
  2. 2 2
      android/app/build.gradle
  3. 4 1
      docs/contributing-to-translations.md
  4. 1 2
      docs/dev-practices.md
  5. 4 4
      ios/App/App.xcodeproj/project.pbxproj
  6. 1 1
      libs/package.json
  7. 1 1
      libs/src/LSPlugin.caller.ts
  8. 4 6
      libs/src/LSPlugin.core.ts
  9. 9 1
      libs/src/LSPlugin.ts
  10. 1 1
      resources/forge.config.js
  11. 0 0
      resources/js/lsplugin.core.js
  12. 14 14
      resources/package.json
  13. 2 1
      src/electron/electron/core.cljs
  14. 24 9
      src/electron/electron/git.cljs
  15. 7 0
      src/electron/electron/handler.cljs
  16. 8 14
      src/electron/electron/state.cljs
  17. 8 8
      src/main/frontend/components/plugins.cljs
  18. 3 3
      src/main/frontend/components/query_table.cljs
  19. 26 11
      src/main/frontend/components/settings.cljs
  20. 12 3
      src/main/frontend/context/i18n.cljs
  21. 26 14
      src/main/frontend/handler/editor.cljs
  22. 29 12
      src/main/frontend/handler/export/text.cljs
  23. 2 2
      src/main/frontend/handler/plugin.cljs
  24. 3 2
      src/main/frontend/modules/outliner/core.cljs
  25. 4 0
      src/main/frontend/state.cljs
  26. 1 1
      src/main/frontend/version.cljs
  27. 22 19
      src/main/logseq/api.cljs
  28. 0 1
      src/resources/dicts/de.edn
  29. 1 1
      src/resources/dicts/en.edn
  30. 1 1
      src/resources/dicts/es.edn
  31. 4 6
      src/resources/dicts/fr.edn
  32. 0 1
      src/resources/dicts/id.edn
  33. 0 1
      src/resources/dicts/it.edn
  34. 0 1
      src/resources/dicts/ja.edn
  35. 0 1
      src/resources/dicts/ko.edn
  36. 1 2
      src/resources/dicts/nb-no.edn
  37. 0 1
      src/resources/dicts/nl.edn
  38. 0 1
      src/resources/dicts/pl.edn
  39. 0 1
      src/resources/dicts/pt-br.edn
  40. 0 1
      src/resources/dicts/pt-pt.edn
  41. 0 1
      src/resources/dicts/ru.edn
  42. 0 1
      src/resources/dicts/sk.edn
  43. 0 1
      src/resources/dicts/tr.edn
  44. 0 1
      src/resources/dicts/uk.edn
  45. 0 1
      src/resources/dicts/zh-cn.edn
  46. 0 1
      src/resources/dicts/zh-hant.edn
  47. 25 1
      src/test/frontend/handler/export_test.cljs
  48. 6 6
      static/yarn.lock

+ 2 - 1
Dockerfile

@@ -13,7 +13,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     curl \
     ca-certificates \
     apt-transport-https \
-    gpg
+    gpg \
+    build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
 
 # install NodeJS & yarn
 RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -

+ 2 - 2
android/app/build.gradle

@@ -12,8 +12,8 @@ android {
         applicationId "com.logseq.app"
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
-        versionCode 77
-        versionName "0.10.3"
+        versionCode 79
+        versionName "0.10.5"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         aaptOptions {
              // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.

+ 4 - 1
docs/contributing-to-translations.md

@@ -84,7 +84,10 @@ Almost all translations are small. The only exceptions to this are the keys `:tu
 
 * Some translations may include punctuation like `:` or `!`. When translating them, please use the punctuation that makes the most sense for your language as you don't have to follow the English ones.
 * Some translations may include arguments/interpolations e.g. `{1}`. If you see them in a translation, be sure to include them. These arguments are substituted in the string and are usually used for something the app needs to calculate e.g. a number. See [these docs](https://github.com/tonsky/tongue#interpolation) for more examples.
-* Rarely, a translation may need to translate formatted text by returning [hiccup-style HTML](https://github.com/weavejester/hiccup#syntax). In this case, a Clojure function is the recommended approach. For example, a function translation would look like `(fn [] [:div "FOO"])`. See `:on-boarding/main-title` for an example.
+* Rarely, a translation is a function that calls code and look like `(fn ... )`
+    * The logic for these fns must be simple and can only use the following fns: `str`, `when`, `if` and `=`.
+    * These fn translations are usually used to handle pluralization or handle formatted text by returning [hiccup-style HTML](https://github.com/weavejester/hiccup#syntax). For example, a hiccup style translation would look like `(fn [] [:div "FOO"])`. See `:on-boarding/main-title` for more examples.
+
 ## Fix Mistakes
 
 There is a lint command to catch common translation mistakes - `bb

+ 1 - 2
docs/dev-practices.md

@@ -90,8 +90,7 @@ translations here are some things to keep in mind:
   fn translation. Hiccup vectors are needed when word order matters for a
   translation and formatting is involved. See [this 3 word Turkish
   example](https://github.com/logseq/logseq/commit/1d932f07c4a0aad44606da6df03a432fe8421480#r118971415).
-* Translations can have arguments for interpolating strings. When they do, be
-  sure translators are using them correctly.
+* Translations can be anonymous fns with arguments for interpolating strings. Fns should be simple and only include the following fns: `str`, `when`, `if` and `=`.
 
 ### Spell Checker
 

+ 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.10.3;
+				MARKETING_VERSION = 0.10.5;
 				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.10.3;
+				MARKETING_VERSION = 0.10.5;
 				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.10.3;
+				MARKETING_VERSION = 0.10.5;
 				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.10.3;
+				MARKETING_VERSION = 0.10.5;
 				MTL_FAST_MATH = YES;
 				PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq.ShareViewController;
 				PRODUCT_NAME = "$(TARGET_NAME)";

+ 1 - 1
libs/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@logseq/libs",
-  "version": "0.0.16",
+  "version": "0.0.17",
   "description": "Logseq SDK libraries",
   "main": "dist/lsplugin.user.js",
   "typings": "index.d.ts",

+ 1 - 1
libs/src/LSPlugin.caller.ts

@@ -286,7 +286,7 @@ class LSPluginCaller extends EventEmitter {
       timer = setTimeout(() => {
         reject(new Error(`handshake Timeout`))
         pt.destroy()
-      }, 4 * 1000) // 4 secs
+      }, 8 * 1000) // 8 secs
 
       handshake
         .then((refChild: ParentAPI) => {

+ 4 - 6
libs/src/LSPlugin.core.ts

@@ -384,14 +384,14 @@ function convertToLSPResource(fullUrl: string, dotPluginRoot: string) {
 class IllegalPluginPackageError extends Error {
   constructor(message: string) {
     super(message)
-    this.name = IllegalPluginPackageError.name
+    this.name = 'IllegalPluginPackageError'
   }
 }
 
 class ExistedImportedPluginPackageError extends Error {
   constructor(message: string) {
     super(message)
-    this.name = ExistedImportedPluginPackageError.name
+    this.name = 'ExistedImportedPluginPackageError'
   }
 }
 
@@ -409,7 +409,7 @@ class PluginLocal extends EventEmitter<
   private _localRoot?: string
   private _dotSettingsFile?: string
   private _caller?: LSPluginCaller
-  private _logger?: PluginLogger
+  private _logger?: PluginLogger = new PluginLogger('PluginLocal')
 
   /**
    * @param _options
@@ -595,9 +595,7 @@ class PluginLocal extends EventEmitter<
     // Validate id
     const { registeredPlugins, isRegistering } = this._ctx
     if (isRegistering && registeredPlugins.has(this.id)) {
-      throw new ExistedImportedPluginPackageError(
-        'Registered plugin package Error'
-      )
+      throw new ExistedImportedPluginPackageError(this.id)
     }
 
     return async () => {

+ 9 - 1
libs/src/LSPlugin.ts

@@ -141,7 +141,7 @@ export interface AppUserInfo {
 export interface AppInfo {
   version: string
 
-  [key: string]: any
+  [key: string]: unknown
 }
 
 /**
@@ -159,6 +159,8 @@ export interface AppUserConfigs {
   showBracket: boolean
   enabledFlashcards: boolean
   enabledJournals: boolean
+
+  [key: string]: unknown
 }
 
 /**
@@ -168,6 +170,8 @@ export interface AppGraphInfo {
   name: string
   url: string
   path: string
+
+  [key: string]: unknown
 }
 
 /**
@@ -193,6 +197,8 @@ export interface BlockEntity {
   meta?: { timestamps: any; properties: any; startPos: number; endPos: number }
   title?: Array<any>
   marker?: string
+
+  [key: string]: unknown
 }
 
 /**
@@ -212,6 +218,8 @@ export interface PageEntity {
   format?: 'markdown' | 'org'
   journalDay?: number
   updatedAt?: number
+
+  [key: string]: unknown
 }
 
 export type BlockIdentity = BlockUUID | Pick<BlockEntity, 'uuid'>

+ 1 - 1
resources/forge.config.js

@@ -4,7 +4,7 @@ module.exports = {
   packagerConfig: {
     name: 'Logseq',
     icon: './icons/logseq_big_sur.icns',
-    buildVersion: 77,
+    buildVersion: 79,
     protocols: [
       {
         "protocol": "logseq",

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
resources/js/lsplugin.core.js


+ 14 - 14
resources/package.json

@@ -1,7 +1,7 @@
 {
   "name": "Logseq",
   "productName": "Logseq",
-  "version": "0.10.3",
+  "version": "0.10.5",
   "main": "electron.js",
   "author": "Logseq",
   "license": "AGPL-3.0",
@@ -20,30 +20,30 @@
     "forge": "./forge.config.js"
   },
   "dependencies": {
-    "better-sqlite3": "8.0.1",
+    "@fastify/cors": "8.2.0",
+    "@logseq/rsapi": "0.0.81",
+    "@sentry/electron": "2.5.1",
+    "abort-controller": "3.0.0",
+    "better-sqlite3": "9.3.0",
     "chokidar": "^3.5.1",
+    "command-exists": "1.2.9",
+    "diff-match-patch": "1.0.5",
     "dugite": "2.5.0",
+    "electron-deeplink": "1.0.10",
     "electron-dl": "3.3.0",
     "electron-log": "4.3.1",
     "electron-squirrel-startup": "1.0.0",
     "electron-window-state": "5.0.3",
+    "extract-zip": "2.0.1",
+    "fastify": "latest",
     "fs-extra": "9.1.0",
+    "https-proxy-agent": "7.0.2",
     "node-fetch": "2.6.7",
     "open": "7.3.1",
+    "posthog-js": "1.10.2",
     "semver": "7.5.2",
-    "update-electron-app": "2.0.1",
-    "extract-zip": "2.0.1",
-    "diff-match-patch": "1.0.5",
-    "https-proxy-agent": "7.0.2",
     "socks-proxy-agent": "8.0.2",
-    "@sentry/electron": "2.5.1",
-    "posthog-js": "1.10.2",
-    "@logseq/rsapi": "0.0.81",
-    "electron-deeplink": "1.0.10",
-    "abort-controller": "3.0.0",
-    "fastify": "latest",
-    "@fastify/cors": "8.2.0",
-    "command-exists": "1.2.9"
+    "update-electron-app": "2.0.1"
   },
   "devDependencies": {
     "@electron-forge/cli": "^6.0.4",

+ 2 - 1
src/electron/electron/core.cljs

@@ -291,7 +291,7 @@
 
                (search/open-dbs!)
 
-               (git/auto-commit-current-graph!)
+               (git/configure-auto-commit!)
 
                (vreset! *setup-fn
                         (fn []
@@ -310,6 +310,7 @@
 
                ;; main window events
                (.on win "close" (fn [e]
+                                  (git/before-graph-close-hook!)
                                   (when @*quit-dirty? ;; when not updating
                                     (.preventDefault e)
 

+ 24 - 9
src/electron/electron/git.cljs

@@ -171,13 +171,28 @@
        (p/resolved result))
      (p/catch error-handler))))
 
-(defn auto-commit-current-graph!
+(defonce auto-commit-interval (atom nil))
+(defn- auto-commit-tick-fn
   []
-  (when (not (state/git-auto-commit-disabled?))
-    (state/clear-git-commit-interval!)
-    (js/setTimeout add-all-and-commit! 3000)
-    (let [seconds (state/get-git-commit-seconds)]
-      (when (int? seconds)
-        (js/setTimeout add-all-and-commit! 5000)
-        (let [interval (js/setInterval add-all-and-commit! (* seconds 1000))]
-          (state/set-git-commit-interval! interval))))))
+  (when (state/git-auto-commit-enabled?)
+    (add-all-and-commit!)))
+
+(defn configure-auto-commit!
+  "Configure auto commit interval, reentrantable"
+  []
+  (when @auto-commit-interval
+    (swap! auto-commit-interval js/clearInterval))
+  (when (state/git-auto-commit-enabled?)
+    (let [seconds (state/get-git-commit-seconds)
+          millis (if (int? seconds)
+                   (* seconds 1000)
+                   6000)]
+      (logger/info ::set-auto-commit-interval seconds)
+      (js/setTimeout add-all-and-commit! 100)
+      (reset! auto-commit-interval (js/setInterval auto-commit-tick-fn millis)))))
+
+(defn before-graph-close-hook!
+  []
+  (when (and (state/git-auto-commit-enabled?)
+             (state/git-commit-on-close-enabled?))
+    (add-all-and-commit!)))

+ 7 - 0
src/electron/electron/handler.cljs

@@ -29,6 +29,7 @@
             [electron.state :as state]
             [electron.utils :as utils]
             [electron.window :as win]
+            [goog.functions :refer [debounce]]
             [logseq.common.graph :as common-graph]
             [promesa.core :as p]))
 
@@ -501,6 +502,12 @@
 (defmethod handle :gitStatus [_ [_]]
   (git/short-status!))
 
+(def debounced-configure-auto-commit! (debounce git/configure-auto-commit! 5000))
+(defmethod handle :setGitAutoCommit []
+  (debounced-configure-auto-commit!)
+  nil)
+
+
 (defmethod handle :installMarketPlugin [_ [_ mft]]
   (plugin/install-or-update! mft))
 

+ 8 - 14
src/electron/electron/state.cljs

@@ -6,9 +6,7 @@
 (defonce persistent-dbs-chan (async/chan 1))
 
 (defonce state
-  (atom {:git/auto-commit-interval nil
-
-         :config (config/get-config)
+  (atom {:config (config/get-config)
 
          ;; FIXME: replace with :window/graph
          :graph/current nil
@@ -28,22 +26,18 @@
     (swap! state assoc-in path value)
     (swap! state assoc path value)))
 
-(defn set-git-commit-interval!
-  [v]
-  (set-state! :git/auto-commit-interval v))
-
-(defn clear-git-commit-interval!
-  []
-  (when-let [interval (get @state :git/auto-commit-interval)]
-    (js/clearInterval interval)))
-
 (defn get-git-commit-seconds
   []
   (get-in @state [:config :git/auto-commit-seconds] 60))
 
-(defn git-auto-commit-disabled?
+(defn git-auto-commit-enabled?
+  []
+  ;; For backward compatibility, use negative logic
+  (false? (get-in @state [:config :git/disable-auto-commit?] true)))
+
+(defn git-commit-on-close-enabled?
   []
-  (get-in @state [:config :git/disable-auto-commit?] true))
+  (get-in @state [:config :git/commit-on-close?] false))
 
 (defn get-graph-path
   []

+ 8 - 8
src/main/frontend/components/plugins.cljs

@@ -119,14 +119,14 @@
   (rum/use-effect!
     (fn []
       (let [err-handle
-                       (fn [^js e]
-                         (case (keyword (aget e "name"))
-                           :IllegalPluginPackageError
-                           (notification/show! "Illegal Logseq plugin package." :error)
-                           :ExistedImportedPluginPackageError
-                           (notification/show! "Existed Imported plugin package." :error)
-                           :default)
-                         (plugin-handler/reset-unpacked-state))
+            (fn [^js e]
+              (case (keyword (aget e "name"))
+                :IllegalPluginPackageError
+                (notification/show! "Illegal Logseq plugin package." :error)
+                :ExistedImportedPluginPackageError
+                (notification/show! (str "Existed plugin package (" (.-message e) ").") :error)
+                :default)
+              (plugin-handler/reset-unpacked-state))
             reg-handle #(plugin-handler/reset-unpacked-state)]
         (when unpacked-pkg-path
           (doto js/LSPluginCore

+ 3 - 3
src/main/frontend/components/query_table.cljs

@@ -181,7 +181,7 @@
           result-as-text (for [row sort-result]
                            (for [column columns]
                              (build-column-text row column)))
-          render-column-value (fn [row-format cell-format value]
+          render-column-value (fn [row-block row-format cell-format value]
                                 (cond
                                   ;; elements should be rendered as they are provided
                                   (= :element cell-format) value
@@ -194,7 +194,7 @@
                                   ;; inline-text when no page entity is found
                                   (string? value) (if-let [page (db/entity [:block/name (util/page-name-sanity-lc value)])]
                                                     (page-cp {} page)
-                                                    (inline-text row-format value))
+                                                    (inline-text row-block row-format value))
                                   ;; anything else should just be rendered as provided
                                   :else value))]
 
@@ -237,4 +237,4 @@
                                                                 :block-ref)
                                                                (reset! *mouse-down? false)))}
                        (when value
-                         (apply render-column-value format value))]))]))]]]))))
+                         (apply render-column-value row format value))]))]))]]]))))

+ 26 - 11
src/main/frontend/components/settings.cljs

@@ -250,7 +250,24 @@
          enabled?
          (fn []
            (state/set-state! [:electron/user-cfgs :git/disable-auto-commit?] enabled?)
-           (ipc/ipc :userAppCfgs :git/disable-auto-commit? enabled?))
+           (p/do!
+            (ipc/ipc :userAppCfgs :git/disable-auto-commit? enabled?)
+            (ipc/ipc :setGitAutoCommit)))
+         true)]]]))
+
+(rum/defcs switch-git-commit-on-close-row < rum/reactive
+  [state t]
+  (let [enabled? (state/get-git-commit-on-close-enabled?)]
+    [:div.it.sm:grid.sm:grid-cols-3.sm:gap-4.sm:items-center
+     [:label.block.text-sm.font-medium.leading-5.opacity-70
+      (t :settings-page/git-commit-on-close)]
+     [:div
+      [:div.rounded-md.sm:max-w-xs
+       (ui/toggle
+         enabled?
+         (fn []
+           (state/set-state! [:electron/user-cfgs :git/commit-on-close?] (not enabled?))
+           (ipc/ipc :userAppCfgs :git/commit-on-close? (not enabled?)))
          true)]]]))
 
 (rum/defcs git-auto-commit-seconds < rum/reactive
@@ -267,14 +284,15 @@
                           (let [value (-> (util/evalue event)
                                           util/safe-parse-int)]
                             (if (and (number? value)
-                                     (< 0 value (inc 600)))
-                              (do
+                                     (< 0 value (inc 86400)))
+                              (p/do!
                                 (state/set-state! [:electron/user-cfgs :git/auto-commit-seconds] value)
-                                (ipc/ipc :userAppCfgs :git/auto-commit-seconds value))
+                                (ipc/ipc :userAppCfgs :git/auto-commit-seconds value)
+                                (ipc/ipc :setGitAutoCommit))
                               (when-let [elem (gobj/get event "target")]
                                 (notification/show!
-                                  [:div "Invalid value! Must be a number between 1 and 600."]
-                                  :warning true)
+                                 [:div "Invalid value! Must be a number between 1 and 86400"]
+                                 :warning true)
                                 (gobj/set elem "value" secs)))))}]]]]))
 
 (rum/defc app-auto-update-row < rum/reactive [t]
@@ -749,11 +767,8 @@
      (t :settings-page/git-desc-3)]]
    [:br]
    (switch-git-auto-commit-row t)
-   (git-auto-commit-seconds t)
-
-   (ui/admonition
-     :warning
-     [:p (t :settings-page/git-confirm)])])
+   (switch-git-commit-on-close-row t)
+   (git-auto-commit-seconds t)])
 
 (rum/defc settings-advanced < rum/reactive
   [current-repo]

+ 12 - 3
src/main/frontend/context/i18n.cljs

@@ -4,8 +4,8 @@
   throughout the application."
   (:require [frontend.dicts :as dicts]
             [tongue.core :as tongue]
-            [cljs.core :refer [PersistentVector]]
-            [frontend.state :as state]))
+            [frontend.state :as state]
+            [lambdaisland.glogi :as log]))
 
 (def dicts (merge dicts/dicts {:tongue/fallback :en}))
 
@@ -31,7 +31,16 @@
 (defn t
   [& args]
   (let [preferred-language (keyword (state/sub :preferred-language))]
-    (apply translate preferred-language args)))
+    (try
+      (apply translate preferred-language args)
+      (catch :default e
+        (log/error :failed-translation {:arguments args
+                                        :lang preferred-language})
+        (state/pub-event! [:capture-error {:error e
+                                           :payload {:type :failed-translation
+                                                     :arguments args
+                                                     :lang preferred-language}}])
+        (apply translate :en args)))))
 
 (defn- fetch-local-language []
   (.. js/window -navigator -language))

+ 26 - 14
src/main/frontend/handler/editor.cljs

@@ -425,7 +425,7 @@
 
 (declare save-current-block!)
 (defn outliner-insert-block!
-  [config current-block new-block {:keys [sibling? keep-uuid?
+  [config current-block new-block {:keys [sibling? keep-uuid? ordered-list?
                                           replace-empty-target?]}]
   (let [ref-query-top-block? (and (or (:ref? config)
                                       (:custom-query? config))
@@ -446,9 +446,11 @@
     (outliner-tx/transact!
      {:outliner-op :insert-blocks}
      (save-current-block! {:current-block current-block})
-     (outliner-core/insert-blocks! [new-block] current-block {:sibling? sibling?
-                                                              :keep-uuid? keep-uuid?
-                                                              :replace-empty-target? replace-empty-target?}))))
+      (outliner-core/insert-blocks! [new-block] current-block
+        {:sibling?              sibling?
+         :keep-uuid?            keep-uuid?
+         :replace-empty-target? replace-empty-target?
+         :ordered-list? ordered-list?}))))
 
 (defn- block-self-alone-when-insert?
   [config uuid]
@@ -566,7 +568,7 @@
 
 (defn api-insert-new-block!
   [content {:keys [page block-uuid sibling? before? properties
-                   custom-uuid replace-empty-target? edit-block?]
+                   custom-uuid replace-empty-target? edit-block? ordered-list?]
             :or {sibling? false
                  before? false
                  edit-block? true}}]
@@ -626,9 +628,11 @@
                                    :else
                                    nil)]
           (when block-m
-            (outliner-insert-block! {} block-m new-block {:sibling? sibling?
-                                                          :keep-uuid? true
-                                                          :replace-empty-target? replace-empty-target?})
+            (outliner-insert-block! {} block-m new-block
+              {:sibling?              sibling?
+               :keep-uuid?            true
+               :replace-empty-target? replace-empty-target?
+               :ordered-list? ordered-list?})
             (when edit-block?
               (if (and replace-empty-target?
                        (string/blank? (:block/content last-block)))
@@ -2020,7 +2024,8 @@
                   target-block
                   sibling?
                   keep-uuid?
-                  revert-cut-txs]
+                  revert-cut-txs
+                  skip-empty-target?]
            :or {exclude-properties []}}]
   (state/set-editor-op! :paste-blocks)
   (let [editing-block (when-let [editing-block (state/get-edit-block)]
@@ -2033,7 +2038,8 @@
         block (db/entity (:db/id target-block))
         page (if (:block/name block) block
                  (when target-block (:block/page (db/entity (:db/id target-block)))))
-        empty-target? (string/blank? (:block/content target-block))
+        empty-target? (if (true? skip-empty-target?) false
+                        (string/blank? (:block/content target-block)))
         paste-nested-blocks? (nested-blocks blocks)
         target-block-has-children? (db/has-children? (:block/uuid target-block))
         replace-empty-target? (and empty-target?
@@ -2117,9 +2123,10 @@
    A block element: {:content :properties :children [block-1, block-2, ...]}"
   [target-block-id sibling? tree-vec format keep-uuid?]
   (insert-block-tree tree-vec format
-                     {:target-block (db/pull target-block-id)
-                      :keep-uuid?   keep-uuid?
-                      :sibling?     sibling?}))
+    {:target-block       (db/pull target-block-id)
+     :keep-uuid?         keep-uuid?
+     :skip-empty-target? true
+     :sibling?           sibling?}))
 
 (defn insert-template!
   ([element-id db-id]
@@ -2817,7 +2824,12 @@
       (outliner-tx/transact!
        {:outliner-op :move-blocks
         :real-outliner-op :indent-outdent}
-       (outliner-core/indent-outdent-blocks! [block] indent?)))
+       (outliner-core/indent-outdent-blocks! [block] indent?))
+      (edit-block!
+        (db/pull (:db/id block))
+        (cursor/pos (state/get-input))
+        (:block/uuid block))
+    )
     (state/set-editor-op! :nil)))
 
 (defn keydown-tab-handler

+ 29 - 12
src/main/frontend/handler/export/text.cljs

@@ -103,19 +103,36 @@
         (newline* 1)])
      l)))
 
+(defn- remove-max-prefix-spaces
+  [lines]
+  (let [common-prefix-spaces
+        (reduce
+         (fn [r line]
+           (if (string/blank? line)
+             r
+             (let [leading-spaces (re-find #"^\s+" line)]
+               (if (nil? r)
+                 leading-spaces
+                 (if (string/starts-with? r leading-spaces)
+                   leading-spaces
+                   r)))))
+         nil
+         lines)
+        pattern (re-pattern (str "^" common-prefix-spaces))]
+    (mapv (fn [line] (string/replace-first line pattern "")) lines)))
+
 (defn- block-src
-  [{:keys [lines language full_content]}]
-  (if (= "no-indent" (get-in *state* [:export-options :indent-style]))
-    ;; when "no-indent", just use :full_content in 'Src' ast
-    [(raw-text full_content) (newline* 1)]
-
-    (let [level (dec (get *state* :current-level 1))]
-      (concatv
-       [(indent-with-2-spaces level) (raw-text "```")]
-       (when language [(raw-text language)])
-       [(newline* 1)]
-       (mapv raw-text lines)
-       [(indent-with-2-spaces level) (raw-text "```") (newline* 1)]))))
+  [{:keys [lines language]}]
+  (let [level (dec (get *state* :current-level 1))
+        lines* (if (= "no-indent" (get-in *state* [:export-options :indent-style]))
+                 (remove-max-prefix-spaces lines)
+                 lines)]
+    (concatv
+     [(indent-with-2-spaces level) (raw-text "```")]
+     (when language [(raw-text language)])
+     [(newline* 1)]
+     (mapv raw-text lines*)
+     [(indent-with-2-spaces level) (raw-text "```") (newline* 1)])))
 
 (defn- block-quote
   [block-coll]

+ 2 - 2
src/main/frontend/handler/plugin.cljs

@@ -773,8 +773,8 @@
                                                             (when (and (number? end)
                                                                        ;; valid end time
                                                                        (> end 0)
-                                                                       ;; greater than 3s
-                                                                       (> (- end (.-s v)) 3000))
+                                                                       ;; greater than 6s
+                                                                       (> (- end (.-s v)) 6000))
                                                               v))))
                                                       ((fn [perfs]
                                                          (doseq [perf perfs]

+ 3 - 2
src/main/frontend/modules/outliner/core.cljs

@@ -531,7 +531,7 @@
       `replace-empty-target?`: If the `target-block` is an empty block, whether
                                to replace it, it defaults to be `false`.
     ``"
-  [blocks target-block {:keys [sibling? keep-uuid? outliner-op replace-empty-target?] :as opts}]
+  [blocks target-block {:keys [sibling? keep-uuid? outliner-op replace-empty-target? ordered-list?] :as opts}]
   {:pre [(seq blocks)
          (s/valid? ::block-map-or-entity target-block)]}
   (let [target-block' (get-target-block target-block)
@@ -549,7 +549,8 @@
                                      (> (count blocks) 1)
                                      (not move?)))
         blocks' (blocks-with-level blocks)
-        blocks' (blocks-with-ordered-list-props blocks' target-block sibling?)
+        blocks' (if (false? ordered-list?) blocks'
+                  (blocks-with-ordered-list-props blocks' target-block sibling?))
         blocks' (if (= outliner-op :paste)
                   (fix-top-level-blocks blocks')
                   blocks')

+ 4 - 0
src/main/frontend/state.cljs

@@ -1934,6 +1934,10 @@ Similar to re-frame subscriptions"
   []
   (false? (sub [:electron/user-cfgs :git/disable-auto-commit?])))
 
+(defn get-git-commit-on-close-enabled?
+  []
+  (sub [:electron/user-cfgs :git/commit-on-close?]))
+
 (defn set-last-key-code!
   [key-code]
   (set-state! :editor/last-key-code key-code))

+ 1 - 1
src/main/frontend/version.cljs

@@ -1,3 +1,3 @@
 (ns ^:no-doc frontend.version)
 
-(defonce version "0.10.3")
+(defonce version "0.10.5")

+ 22 - 19
src/main/logseq/api.cljs

@@ -604,7 +604,7 @@
   (fn [block-uuid-or-page-name content ^js opts]
     (when (string/blank? block-uuid-or-page-name)
       (throw (js/Error. "Page title or block UUID shouldn't be empty.")))
-    (let [{:keys [before sibling focus customUUID properties]} (bean/->clj opts)
+    (let [{:keys [before sibling focus customUUID properties autoOrderedList]} (bean/->clj opts)
           [page-name block-uuid] (if (util/uuid-string? block-uuid-or-page-name)
                                    [nil (uuid block-uuid-or-page-name)]
                                    [block-uuid-or-page-name nil])
@@ -635,31 +635,34 @@
                                    before?)
           new-block              (editor-handler/api-insert-new-block!
                                    content
-                                   {:block-uuid  block-uuid'
-                                    :sibling?    sibling?
-                                    :before?     before?
-                                    :edit-block? edit-block?
-                                    :page        page-name
-                                    :custom-uuid custom-uuid
-                                    :properties  (merge properties
-                                                        (when custom-uuid {:id custom-uuid}))})]
+                                   {:block-uuid    block-uuid'
+                                    :sibling?      sibling?
+                                    :before?       before?
+                                    :edit-block?   edit-block?
+                                    :page          page-name
+                                    :custom-uuid   custom-uuid
+                                    :ordered-list? (if (boolean? autoOrderedList) autoOrderedList false)
+                                    :properties    (merge properties
+                                                     (when custom-uuid {:id custom-uuid}))})]
       (bean/->js (sdk-utils/normalize-keyword-for-json new-block)))))
 
 (def ^:export insert_batch_block
   (fn [block-uuid ^js batch-blocks ^js opts]
     (when-let [block (db-model/query-block-by-uuid (sdk-utils/uuid-or-throw-error block-uuid))]
       (when-let [bb (bean/->clj batch-blocks)]
-        (let [bb         (if-not (vector? bb) (vector bb) bb)
-              {:keys [sibling keepUUID]} (bean/->clj opts)
+        (let [bb (if-not (vector? bb) (vector bb) bb)
+              {:keys [sibling keepUUID before]} (bean/->clj opts)
               keep-uuid? (or keepUUID false)
-              _          (when keep-uuid? (doseq
-                                            [block (outliner/tree-vec-flatten bb :children)]
-                                            (let [uuid (:id (:properties block))]
-                                              (when (and uuid (db-model/query-block-by-uuid (sdk-utils/uuid-or-throw-error uuid)))
-                                                (throw (js/Error.
-                                                         (util/format "Custom block UUID already exists (%s)." uuid)))))))
-              _          (editor-handler/insert-block-tree-after-target
-                           (:db/id block) sibling bb (:block/format block) keep-uuid?)]
+              _ (when keep-uuid? (doseq
+                                  [block (outliner/tree-vec-flatten bb :children)]
+                                   (let [uuid (:id (:properties block))]
+                                     (when (and uuid (db-model/query-block-by-uuid (sdk-utils/uuid-or-throw-error uuid)))
+                                       (throw (js/Error.
+                                                (util/format "Custom block UUID already exists (%s)." uuid)))))))
+              block (if (and before sibling)
+                      (db/pull (:db/id (:block/left block))) block)
+              _ (editor-handler/insert-block-tree-after-target
+                  (:db/id block) sibling bb (:block/format block) keep-uuid?)]
           nil)))))
 
 (def ^:export remove_block

+ 0 - 1
src/resources/dicts/de.edn

@@ -575,7 +575,6 @@
  :settings-page/export-theme "Theme exportieren"
  :settings-page/filename-format "Dateinamen-Format"
  :settings-page/git-commit-delay "Anzahl Sekunden für Git Auto Commit"
- :settings-page/git-confirm "Sie müssen die App neu starten, nachdem Sie die Git-Einstellungen angepasst haben."
  :settings-page/git-switcher-label "Git Auto Commit aktivieren"
  :settings-page/home-default-page "Standard-Homepage einrichten"
  :settings-page/login-prompt "Um vor allen anderen auf neue Funktionen zugreifen zu können, müssen Sie ein Open Collective Sponsor oder Backer von Logseq sein und sich daher zuerst anmelden."

+ 1 - 1
src/resources/dicts/en.edn

@@ -287,9 +287,9 @@
  :settings-page/git-desc-1 "To view page's edit history, click the three horizontal dots in the top-right corner and select \"View page history\"."
  :settings-page/git-desc-2 "For professional users, Logseq also supports using "
  :settings-page/git-desc-3 " for version control. Use Git at your own risk as general Git issues are not supported by the Logseq team."
+ :settings-page/git-commit-on-close "Git commit on window close"
  :settings-page/git-switcher-label "Enable Git auto commit"
  :settings-page/git-commit-delay "Git auto commit seconds"
- :settings-page/git-confirm "You need to restart the app after updating the Git settings."
  :settings-page/edit-config-edn "Edit config.edn"
  :settings-page/edit-global-config-edn "Edit global config.edn"
  :settings-page/edit-custom-css "Edit custom.css"

+ 1 - 1
src/resources/dicts/es.edn

@@ -650,10 +650,10 @@
  :settings-page/export-theme                        "Tema exportación"
  :settings-page/filename-format                     "Formato de nombre de archivo"
  :settings-page/git-commit-delay                    "Segundos para Git auto commit"
- :settings-page/git-confirm                         "Debe reiniciar la aplicación después de actualizar las opciones de Git."
  :settings-page/git-desc-1                          "Para ver el historial de edición de la página, da clic en los tres puntos horizontales en la esquina superior derecha y selecciona \"Ver historial de página\"."
  :settings-page/git-desc-2                          "Para usuarios profesionales, Logseq también es compatible con"
  :settings-page/git-desc-3                          " para control de versiones. Usa Git bajo tu propio riesgo ya que problemas generales con Git no son respaldados por el equipo de Logseq."
+ :settings-page/git-commit-on-close  "Git auto commit"
  :settings-page/git-switcher-label                  "Habilitar Git auto commit"
  :settings-page/git-tip                             "Si tienes Logseq Sync habilitado, puedes ver el historial de edición de la página directamente. Esta sección es solo para conocedores de tecnología."
  :settings-page/home-default-page                   "Establecer página de inicio"

+ 4 - 6
src/resources/dicts/fr.edn

@@ -172,7 +172,7 @@
     :linked-references/filter-excludes "Exclut : "
     :linked-references/filter-heading "Filtrer"
     :linked-references/filter-includes "Inclut : "
-    :linked-references/reference-count (fn [filtered-count total] (cond (= filtered-count nil) (cond (= total 0) "Aucune référence liée" (= total 1) "1 référence liée" :else (str total " références liées")) (= filtered-count 1) (str "1 référence liée / " total) :else (str filtered-count " références liées / " total) ))
+    :linked-references/reference-count (fn [filtered-count total] (str filtered-count (when filtered-count (if (= filtered-count 1) " référence liée" " références liées")) " parmi " total))
     :linked-references/filter-search "Rechercher dans les pages liées"
     :linked-references/unexpected-error "Références liées : erreur inattendue. Veuillez d'abord ré-indexer votre graphe."
     :on-boarding/add-graph "Ajouter un graphe"
@@ -269,7 +269,6 @@
     :settings-page/export-theme "Exporter le thème"
     :settings-page/filename-format "Format de nom de fichier"
     :settings-page/git-commit-delay "Délai (secondes) des commits Git automatiques"
-    :settings-page/git-confirm "Vous devez redémarrer l'application après avoir mis à jour le dossier Git"
     :settings-page/git-switcher-label "Activer les commits Git automatiques"
     :settings-page/home-default-page "Régler la page d'accueil par défaut"
     :settings-page/login-prompt "Pour accéder aux nouvelles fonctionnalités avant tout le monde, vous devez être sponsor ou \"backer\" (contributeur) sur Open Collective, puis vous connecter."
@@ -556,7 +555,7 @@
     :shortcut.category/plugins "Plugins"
     :settings-permission/start-granting "Permettre"
     :settings-page/update-error-2 "Vérifiez le/la"
-    :settings-page/update-error-1 "⚠️ Oups, quelque chose s'est mal passée !"
+    :settings-page/update-error-1 "⚠️ Oups, quelque chose s'est mal passé !"
     :settings-page/update-available "Nouvelle mise à jour trouvée"
     :settings-page/theme-system "système"
     :settings-page/theme-light "Clair"
@@ -721,7 +720,7 @@
     :page/logseq-is-having-a-problem "Logseq a un problème. Pour essayer de le ravoir…"
     :page/page-already-exists "Page “{1}” existe déjà !"
     :page/slide-view "Visualiser en diapositives"
-    :page/something-went-wrong "Quelque chose s'est mal passée"
+    :page/something-went-wrong "Quelque chose s'est mal passé"
     :page/step "Étape {1}"
     :page/try "Essayer"
     :page/whiteboard-to-journal-error "Les pages de tableau blanc ne peuvent pas être renommées en titre de journ…"
@@ -806,5 +805,4 @@
     :settings-page/auto-chmod "Automatiquement changer les permissions du fichier"
     :settings-page/auto-chmod-desc "Désactiver pour permettre l'édition par plusieurs utilisateurs avec les permissions données par l'appartenance au groupe."
     :settings-page/tab-keymap "Raccourcis"
-    :unlinked-references/reference-count (fn [total] (cond (= total "") "Références non liées" (= total 0) "Aucune référence non liée" (= total 1) "1 référence non liée" (> total 1) (str total " références non liées")))
-}
+    :unlinked-references/reference-count  (fn [total] (str total (if (= total 1) " référence non liée" " références non liées")))}

+ 0 - 1
src/resources/dicts/id.edn

@@ -261,7 +261,6 @@
  :settings-page/git-desc-3 " untuk kontrol versi. Gunakan Git dengan risiko Anda sendiri karena masalah umum Git tidak didukung oleh tim Logseq."
  :settings-page/git-switcher-label "Aktifkan komit otomatis Git"
  :settings-page/git-commit-delay "Detik komit otomatis Git"
- :settings-page/git-confirm "Anda perlu me-restart aplikasi setelah memperbarui pengaturan Git."
  :settings-page/edit-config-edn "Sunting config.edn"
  :settings-page/edit-global-config-edn "Sunting global config.edn"
  :settings-page/edit-custom-css "Sunting custom.css"

+ 0 - 1
src/resources/dicts/it.edn

@@ -77,7 +77,6 @@
  :content/copy-block-emebed "Copia blocco incorporato"
  :content/open-in-sidebar "Apri nel pannello laterale"
  :content/click-to-edit "Clicca per modificare"
- :settings-page/git-confirm "Devi riavviare l'app dopo aver aggiornato le impostazioni di Git."
  :settings-page/git-switcher-label "Commit automatico"
  :settings-page/git-commit-delay "Secondi per commit automatico"
  :settings-page/edit-config-edn "Modifica config.edn"

+ 0 - 1
src/resources/dicts/ja.edn

@@ -270,7 +270,6 @@
  :settings-page/git-desc-3 " の利用も用意しています。Gitの利用はご自身の責任で行ってください。一般的なGitの問題について、Logseqチームはサポートしません。"
  :settings-page/git-switcher-label "Gitの自動コミットを有効化"
  :settings-page/git-commit-delay "Gitの自動コミット間隔(秒)"
- :settings-page/git-confirm "Git設定を更新するにはアプリを再起動する必要があります。"
  :settings-page/edit-config-edn "config.ednを編集"
  :settings-page/edit-global-config-edn "グローバルなconfig.ednを編集"
  :settings-page/edit-custom-css "custom.cssを編集"

+ 0 - 1
src/resources/dicts/ko.edn

@@ -78,7 +78,6 @@
  :content/copy-block-emebed "블록 임베드 복사"
  :content/open-in-sidebar "사이드바에서 열기"
  :content/click-to-edit "클릭하여 수정"
- :settings-page/git-confirm "Git 설정을 변경한 뒤 앱을 재시작해야 합니다."
  :settings-page/git-switcher-label "Git 자동 커밋 설정"
  :settings-page/git-commit-delay "Git 자동 커밋 간격 (초)"
  :settings-page/edit-config-edn "config.edn 수정"

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

@@ -79,7 +79,6 @@
  :content/copy-block-emebed "Kopier innebygging av blokk"
  :content/open-in-sidebar "Åpne i sidefeltet"
  :content/click-to-edit "Klikk for å redigere"
- :settings-page/git-confirm "Du må starte appen på nytt etter å ha oppdatert Git innstillingene."
  :settings-page/git-switcher-label "Skru på Git auto commit"
  :settings-page/git-commit-delay "Git auto commit sekunder"
  :settings-page/edit-config-edn "Rediger config.edn for nåværende repo"
@@ -790,7 +789,7 @@
  :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"
- 
+
  :command.command-palette/toggle "Søk kommandoer"
  :command.go/search-in-page "Søk blokker på side"
  :command.ui/cycle-color "Veksle farge"

+ 0 - 1
src/resources/dicts/nl.edn

@@ -199,7 +199,6 @@
  :settings-page/enable-tooltip "Tooltips inschakelen"
  :settings-page/export-theme "Exporteer thema"
  :settings-page/git-commit-delay "Git auto commit seconden"
- :settings-page/git-confirm "Je moet de app opnieuw opstarten nadat je de Git instellingen hebt aangepast."
  :settings-page/git-switcher-label "Git auto commit inschakelen"
  :settings-page/home-default-page "De standaard startpagina instellen"
  :settings-page/network-proxy "Netwerk proxy"

+ 0 - 1
src/resources/dicts/pl.edn

@@ -82,7 +82,6 @@
  :content/copy-block-emebed "Kopiuj blok jako embed"
  :content/open-in-sidebar "Otwórz w panelu bocznym"
  :content/click-to-edit "Kliknij, aby edytować"
- :settings-page/git-confirm "Musisz uruchomić ponownie aplikację żeby zastosować zmiany w ustawieniach Gita."
  :settings-page/git-switcher-label "Włącz opcję autocommit w Git"
  :settings-page/git-commit-delay "Wykonaj commit co każde [s.]"
  :settings-page/edit-config-edn "Edytuj config.edn"

+ 0 - 1
src/resources/dicts/pt-br.edn

@@ -265,7 +265,6 @@
  :settings-page/git-desc-3 " para controle de versão. Use o Git por sua própria conta e risco, uma vez que questões gerais do Git não são suportadas pela equipe do Logseq."
  :settings-page/git-switcher-label "Ativar confirmação automática do Git"
  :settings-page/git-commit-delay "Segundos para confirmação automática do Git"
- :settings-page/git-confirm "Você precisa reiniciar o aplicativo após atualizar as configurações do Git."
  :settings-page/edit-config-edn "Editar config.edn"
  :settings-page/edit-global-config-edn "Editar config.edn global"
  :settings-page/edit-custom-css "Editar custom.css"

+ 0 - 1
src/resources/dicts/pt-pt.edn

@@ -140,7 +140,6 @@
  :content/delete-ref "Apagar esta referência"
  :content/open-in-sidebar "Abrir na barra lateral"
  :content/click-to-edit "Clicar para editar"
- :settings-page/git-confirm "É necessário reiniciar a aplicação após atualizar as definições do Git."
  :settings-page/git-switcher-label "Ativar o auto commit do Git"
  :settings-page/git-commit-delay "Segundos entre cada auto commit"
  :settings-page/edit-config-edn "Editar config.edn"

+ 0 - 1
src/resources/dicts/ru.edn

@@ -172,7 +172,6 @@
  :context-menu/input-template-name                     "Как назовём шаблон?"
  :context-menu/template-include-parent-block           "Включить родительский блок в шаблон?"
  :context-menu/template-exists-warning                 "Шаблон уже существует!"
- :settings-page/git-confirm                            "Необходимо перезапустить приложение после изменения настроек Git."
  :settings-page/git-switcher-label                     "Включить автокоммит в Git"
  :settings-page/git-commit-delay                       "Задержка автокоммита Git в секундах"
  :settings-page/edit-config-edn                        "Редактировать config.edn"

+ 0 - 1
src/resources/dicts/sk.edn

@@ -266,7 +266,6 @@
  :settings-page/git-desc-3                         " pre správu verzií. Používajte Git na vlastné riziko, pretože všeobecné problémy s Git nie sú podporované tímom Logseq."
  :settings-page/git-switcher-label                 "Povoliť automatický zápis do Git"
  :settings-page/git-commit-delay                   "Automatický zápis do Git po sekundách"
- :settings-page/git-confirm                        "Po aktualizácii nastavení Git je potrebné reštartovať aplikáciu."
  :settings-page/edit-config-edn                    "Upraviť config.edn"
  :settings-page/edit-global-config-edn             "Upraviť globálny config.edn"
  :settings-page/edit-custom-css                    "Upraviť custom.css"

+ 0 - 1
src/resources/dicts/tr.edn

@@ -289,7 +289,6 @@
  :settings-page/git-desc-3 " kullanımını da destekler. Genel Git sorunları Logseq ekibi tarafından desteklenmediğinden Git'i kullanmanın riski size aittir."
  :settings-page/git-switcher-label "Otomatik git commit'i etkinleştir"
  :settings-page/git-commit-delay "Otomatik git commit saniyesi"
- :settings-page/git-confirm "Git ayarlarını güncelledikten sonra uygulamayı yeniden başlatmanız gerekiyor."
  :settings-page/edit-config-edn "config.edn dosyasını düzenle"
  :settings-page/edit-global-config-edn "Genel config.edn dosyasını düzenle"
  :settings-page/edit-custom-css "custom.css dosyasını düzenle"

+ 0 - 1
src/resources/dicts/uk.edn

@@ -162,7 +162,6 @@
  :context-menu/input-template-name "Як назвемо шаблон?"
  :context-menu/template-include-parent-block "Включити батьківський блок у шаблон?"
  :context-menu/template-exists-warning "Шаблон вже існує!"
- :settings-page/git-confirm "Вам потрібно перезапустити програму після оновлення налаштувань Git."
  :settings-page/git-switcher-label "Увімкнути Git авто commit"
  :settings-page/git-commit-delay "Секунди Git авто commit"
  :settings-page/edit-config-edn "Редагувати config.edn"

+ 0 - 1
src/resources/dicts/zh-cn.edn

@@ -191,7 +191,6 @@
  :settings-page/edit-custom-css "编辑 custom.css (当前库)"
  :settings-page/custom-configuration "自定义配置"
  :settings-page/custom-theme "自定义主题"
- :settings-page/git-confirm "更新 Git 设置后,需要重启应用"
  :settings-page/git-switcher-label "开启 Git 自动 commit"
  :settings-page/git-commit-delay "Git 自动 commit 间隔秒数"
  :settings-page/preferred-outdenting "逻辑缩进"

+ 0 - 1
src/resources/dicts/zh-hant.edn

@@ -138,7 +138,6 @@
  :content/copy-block-emebed "複製嵌入區塊"
  :content/open-in-sidebar "在側邊欄中打開"
  :content/click-to-edit "點擊以編輯"
- :settings-page/git-confirm "在更新 Git 設置後,您需要重新啟動應用程式。"
  :settings-page/git-switcher-label "啟用 Git 自動提交"
  :settings-page/git-commit-delay "Git 自動提交間隔"
  :settings-page/edit-config-edn "編輯 config.edn"

+ 25 - 1
src/test/frontend/handler/export_test.cljs

@@ -144,7 +144,31 @@
   2
   3
   - 4
-    5"))
+    5"
+"
+some inner code
+```jsx
+import React;
+
+function main() {
+  return 0;
+}
+
+export default main;
+```
+"
+    "
+- some inner code
+  - ```jsx
+    import React;
+
+    function main() {
+      return 0;
+    }
+
+    export default main;
+    ```
+"))
 
 
 (deftest-async export-files-as-markdown

+ 6 - 6
static/yarn.lock

@@ -1068,13 +1068,13 @@ base64-js@^1.3.1, base64-js@^1.5.1:
   resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
   integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
 
-better-sqlite3@8.0.1:
-  version "8.0.1"
-  resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-8.0.1.tgz#3a596d21fbcefadf36f94e126c5cf24d5697d0b8"
-  integrity sha512-JhTZjpyapA1icCEjIZB4TSSgkGdFgpWZA2Wszg7Cf4JwJwKQmbvuNnJBeR+EYG/Z29OXvR4G//Rbg31BW/Z7Yg==
+better-sqlite3@9.3.0:
+  version "9.3.0"
+  resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-9.3.0.tgz#2a8aaad65fa0210a4df5e8a0bcbc9156f6138d56"
+  integrity sha512-ww73jVpQhRRdS9uMr761ixlkl4bWoXi8hMQlBGhoN6vPNlUHpIsNmw4pKN6kjknlt/wopdvXHvLk1W75BI+n0Q==
   dependencies:
     bindings "^1.5.0"
-    prebuild-install "^7.1.0"
+    prebuild-install "^7.1.1"
 
 binary-extensions@^2.0.0:
   version "2.2.0"
@@ -4034,7 +4034,7 @@ [email protected]:
   dependencies:
     fflate "^0.4.1"
 
-prebuild-install@^7.1.0:
+prebuild-install@^7.1.1:
   version "7.1.1"
   resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45"
   integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác