Browse Source

Merge branch 'master' into feat/db

charlie 1 year ago
parent
commit
3dc019b567

+ 2 - 2
android/app/build.gradle

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

BIN
fastlane/metadata/android/en-US/images/icon.png


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

+ 1 - 1
resources/forge.config.js

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

+ 1 - 1
resources/package.json

@@ -1,7 +1,7 @@
 {
   "name": "Logseq",
   "productName": "Logseq",
-  "version": "0.10.9",
+  "version": "0.10.10",
   "main": "electron.js",
   "author": "Logseq",
   "license": "AGPL-3.0",

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

@@ -51,7 +51,7 @@
     (boolean (text-util/get-matched-video url))
     (util/format "{{video %s}}" url)
 
-    (string/includes? url "twitter.com")
+    (or (string/includes? url "twitter.com") (string/includes? url "x.com"))
     (util/format "{{twitter %s}}" url)))
 
 (defn- try-parse-as-json

+ 5 - 0
src/main/frontend/mobile/util.cljs

@@ -44,6 +44,9 @@
           landscape? (> width height)
           [width height] (if landscape? [height width] [width height])]
       [(case [width height]
+         ;; The following list is from:
+         ;; - https://useyourloaf.com/blog/ipad-2024-screen-sizes/
+         ;; - https://useyourloaf.com/blog/iphone-15-screen-sizes/
          [320 568] "iPhoneSE4"
          [375 667] "iPhone8"
          [375 812] "iPhoneX"
@@ -61,6 +64,8 @@
          [834 1112] "iPadAir10.5"
          [834 1194] "iPadPro11"
          [1024 1366] "iPadPro12.9"
+         [1032 1376] "iPadPro13(M4)"
+         [834 1210]  "iPadPro11(M4)"
          "Not a known Apple device!")
        landscape?])))
 

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

@@ -15,7 +15,8 @@
 (defn- is-tweet-link
   [url]
   (when (not-empty url)
-    (re-matches #"^https://twitter\.com/.*?/status/.*?$" url)))
+    (or (re-matches #"^https://twitter\.com/.*?/status/.*?$" url)
+        (re-matches #"^https://x\.com/.*?/status/.*?$" url))))
 
 (defn quick-capture [args]
   (let [{:keys [url title content page append]} (bean/->clj args)

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

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

+ 6 - 2
src/resources/dicts/ko.edn

@@ -390,7 +390,7 @@
  :command.editor/select-parent                    "부모 블록 선택"
  :command.go/all-graphs                           "모든 그래프로 이동"
  :command.go/electron-find-in-page                "페이지에서 검색"
- :command.go/electron-jump-to-the-next            "다음 검색 항목으로 디오"
+ :command.go/electron-jump-to-the-next            "다음 검색 항목으로 이동"
  :command.go/electron-jump-to-the-previous        "이전 검색 항목으로 이동"
  :command.go/whiteboards                          "화이트보드로 이동"
  :command.graph/export-as-html                    "그래프를 html로 내보내기"
@@ -398,4 +398,8 @@
  :command.pdf/find                                "PDF: 현재 PDF 문서에서 검색"
  :command.sidebar/close-top                       "우축 사이드바의 최상단 항목 닫기"
  :command.ui/clear-all-notifications              "모든 알람 제거"
- :command.ui/install-plugins-from-file            "plugins.edn에서 플러그인 설치"}
+ :command.ui/install-plugins-from-file            "plugins.edn에서 플러그인 설치"
+ :command.command-palette/toggle                  "명령어 검색"
+ :command.go/search-in-page                       "현재 페이지에서 블록 검색"
+ }
+  

+ 16 - 0
src/test/frontend/handler/paste_test.cljs

@@ -122,6 +122,22 @@
           (is (= expected-paste result))
           (reset))))))
 
+(deftest-async editor-on-paste-with-twitter-is-now-x-lol
+  (testing "Formatted paste for the site formerly known as twitter link should paste macro wrapped as twitter"
+    (let [clipboard "https://x.com/chiefnoah13/status/1792677792506843462"
+          expected-paste "{{twitter https://x.com/chiefnoah13/status/1792677792506843462}}"]
+      (test-helper/with-reset
+        reset
+        [commands/delete-selection! (constantly nil)
+         commands/simple-insert! (fn [_input text] (p/resolved text))
+         util/stop (constantly nil)
+         util/get-selected-text (constantly "")
+         html-parser/convert (constantly nil)]
+        (p/let [result ((paste-handler/editor-on-paste! nil)
+                        #js {:clipboardData #js {:getData (constantly clipboard)}})]
+          (is (= expected-paste result))
+          (reset))))))
+
 (deftest-async editor-on-paste-with-text-over-link
   (testing "Paste text over a selected formatted link"
     (let [actual-text (atom nil)