فهرست منبع

Merge branch 'fix/wb-fixes' of https://github.com/logseq/logseq into fix/wb-fixes

Peng Xiao 3 سال پیش
والد
کامیت
53415d2eec

+ 2 - 2
.github/workflows/build-android.yml

@@ -98,7 +98,7 @@ jobs:
           echo ::set-output name=version::$pkgver
 
       - name: Update Nightly APP Version
-        if: ${{ inputs.build-target == 'nightly' || github.event.inputs.build-target == 'nightly' }}
+        if: ${{ inputs.build-target == '' || inputs.build-target == 'nightly' || github.event.inputs.build-target == 'nightly' }}
         run: |
           sed -i 's/defonce version ".*"/defonce version "${{ steps.ref.outputs.version }}"/g' src/main/frontend/version.cljs
           sed -i 's/versionName ".*"/versionName "${{ steps.ref.outputs.version }}"/g' android/app/build.gradle
@@ -133,7 +133,7 @@ jobs:
           rm -rvf android/app/src/main/assets/public || true
 
       - name: Sync public to Android Project
-        run: npx cap sync
+        run: npx cap sync android
 
       - name: Setup Android SDK
         uses: android-actions/setup-android@v2

+ 1 - 1
.github/workflows/build-desktop-release.yml

@@ -425,7 +425,7 @@ jobs:
     with:
       build-target: "${{ github.event.inputs.build-target }}"
       # if scheduled, use production mode
-      enable-file-sync-production: true
+      enable-file-sync-production: "${{ github.event_name == 'schedule' || github.event.inputs.enable-file-sync-production == 'true' }}"
     secrets:
       ANDROID_KEYSTORE: "${{ secrets.ANDROID_KEYSTORE }}"
       ANDROID_KEYSTORE_PASSWORD: "${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"

+ 2 - 1
docs/develop-logseq.md

@@ -55,7 +55,8 @@ yarn dev-electron-app
 Alternatively, run `bb dev:electron-start` to do this step with one command. To
 download bb, see https://github.com/babashka/babashka#installation.
 
-3. (Optional) Update dependencies if your are updating from an old branch
+3. (Optional) Update dependencies if `resources/package.json` has changed since
+the last time you used dev Logseq.
 
 ```bash
 # pull new changes

+ 1 - 1
package.json

@@ -119,7 +119,7 @@
         "ignore": "5.1.8",
         "is-svg": "4.3.0",
         "jszip": "3.7.0",
-        "mldoc": "^1.5.0",
+        "mldoc": "^1.5.1",
         "path": "0.12.7",
         "path-complete-extname": "1.0.0",
         "pixi-graph-fork": "0.2.0",

+ 3 - 2
src/main/frontend/components/settings.cljs

@@ -6,6 +6,7 @@
             [frontend.config :as config]
             [frontend.context.i18n :refer [t]]
             [frontend.storage :as storage]
+            [frontend.spec.storage :as storage-spec]
             [frontend.date :as date]
             [frontend.dicts :as dicts]
             [frontend.handler :as handler]
@@ -493,7 +494,7 @@
         [on? set-on?] (rum/use-state value)
         on-toggle #(let [v (not on?)]
                      (set-on? v)
-                     (storage/set :lsp-core-enabled v))]
+                     (storage/set ::storage-spec/lsp-core-enabled v))]
     [:div.flex.items-center
      (ui/toggle on? on-toggle true)
      (when (not= (boolean value) on?)
@@ -679,7 +680,7 @@
             :on-key-press  (fn [e]
                              (when (= "Enter" (util/ekey e))
                                (update-home-page e)))}]]]])
-     (when (and (util/electron?) config/enable-plugins?) (plugin-system-switcher-row))
+     (when (and (util/electron?) config/feature-plugin-system-on?) (plugin-system-switcher-row))
      (flashcards-switcher-row enable-flashcards?)
      (zotero-settings-row)
      (when-not web-platform?

+ 2 - 3
src/main/frontend/config.cljs

@@ -39,9 +39,7 @@
 ;; =============
 
 (goog-define ENABLE-PLUGINS true)
-(defonce enable-plugins? ENABLE-PLUGINS)
-
-(swap! state/state assoc :plugin/enabled enable-plugins?)
+(defonce feature-plugin-system-on? ENABLE-PLUGINS)
 
 ;; Desktop only as other platforms requires better understanding of their
 ;; multi-graph workflows and optimal place for a "global" dir
@@ -50,6 +48,7 @@
 ;; User level configuration for whether plugins are enabled
 (defonce lsp-enabled?
          (and (util/electron?)
+              (not (false? feature-plugin-system-on?))
               (state/lsp-enabled?-or-theme)))
 
 (defn plugin-config-enabled?

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

@@ -9,6 +9,7 @@
             [electron.ipc :as ipc]
             [frontend.mobile.util :as mobile-util]
             [frontend.storage :as storage]
+            [frontend.spec.storage :as storage-spec]
             [frontend.util :as util]
             [frontend.util.cursor :as cursor]
             [goog.dom :as gdom]
@@ -172,7 +173,7 @@
      ;; plugin
      :plugin/enabled                        (and (util/electron?)
                                                  ;; true false :theme-only
-                                                 ((fnil identity true) (storage/get :lsp-core-enabled)))
+                                                 ((fnil identity true) (storage/get ::storage-spec/lsp-core-enabled)))
      :plugin/preferences                    nil
      :plugin/indicator-text                 nil
      :plugin/installed-plugins              {}

+ 1 - 1
tldraw/apps/tldraw-logseq/build.mjs

@@ -5,7 +5,7 @@ import fs from 'fs'
 import path from 'path'
 
 // Build with [tsup](https://tsup.egoist.sh)
-await $`tsup`
+await $`npx tsup`
 
 // Prepare package.json file
 const packageJson = fs.readFileSync('package.json', 'utf8')

+ 4 - 4
yarn.lock

@@ -4691,10 +4691,10 @@ mkdirp@^1.0.3:
   resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
   integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
 
-mldoc@^1.5.0:
-  version "1.5.0"
-  resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-1.5.0.tgz#c1250115ef320ec3eaf9717dd65730b041d78e7b"
-  integrity sha512-V1HSNCOkeWRukQPfOdUv12wMKeNSVNzz2AIvjsmi/C8fakimoOt5oJA+H+r1bNf+7j9PBtagEzbrTTRKoOmqpw==
+mldoc@^1.5.1:
+  version "1.5.1"
+  resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-1.5.1.tgz#570ae860d621e167e9a586f5be2b1bb96faf8bb7"
+  integrity sha512-FlmspawzeYjIegvHlUxx2VoZx2ExHKS5h+f80yCFjhuW3yeqdvq4zFP19GJGVGbAWnyTL0DfUoROf84IMAL8Fw==
   dependencies:
     yargs "^12.0.2"