diff --git a/.github/workflows/build-ios-release.yml b/.github/workflows/build-ios-release.yml index 0b3d4407f5..e743db811e 100644 --- a/.github/workflows/build-ios-release.yml +++ b/.github/workflows/build-ios-release.yml @@ -35,6 +35,14 @@ jobs: distribution: 'zulu' java-version: ${{ env.JAVA_VERSION }} + - name: Cache clojure deps + uses: actions/cache@v2 + with: + path: | + ~/.m2/repository + ~/.gitlibs + key: ${{ runner.os }}-clojure-lib-${{ hashFiles('**/deps.edn') }} + - name: Setup clojure uses: DeLaGuardo/setup-clojure@3.5 with: @@ -65,3 +73,5 @@ jobs: APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64: true SLACK_URL: ${{ secrets.SLACK_URL }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} diff --git a/README.md b/README.md index 56c7d57f7b..caefbe64f2 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ If you would like to contribute by solving an open issue, please fork this repos Once you push your code to your fork you we'll be able to open a PR into Logseq repository. For more info you can follow this guide from [Github docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) -And here a list of some [good firt issues](https://github.com/logseq/logseq/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)! +And here a list of some [good first issues](https://github.com/logseq/logseq/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)! ## Thanks diff --git a/ios/App/fastlane/Fastfile b/ios/App/fastlane/Fastfile index 42d84d88c4..8783f36949 100644 --- a/ios/App/fastlane/Fastfile +++ b/ios/App/fastlane/Fastfile @@ -18,20 +18,29 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do - # Set from env - app_store_connect_api_key + setup_ci - increment_build_number( + app_store_connect_api_key( + key_id: ENV["APP_STORE_CONNECT_API_KEY_KEY_ID"], + issuer_id: ENV["APP_STORE_CONNECT_API_KEY_ISSUER_ID"], + key_filepath: ENV["APP_STORE_CONNECT_API_KEY_KEY_FILEPATH"], + ) + + sync_code_signing(type: "appstore", readonly: true) + + build_number = increment_build_number( xcodeproj: "App.xcodeproj", build_number: latest_testflight_build_number + 1, - skip_info_plist: true ) + # Ref: https://docs.fastlane.tools/advanced/fastlane/#directory-behavior + sh("../../../scripts/patch-xcode-project.sh") + build_app( workspace: "App.xcworkspace", - configuration: "Release", destination: "generic/platform=iOS", - scheme: "Logseq" + scheme: "Logseq", + configuration: "Release", ) upload_to_testflight( @@ -39,6 +48,6 @@ platform :ios do skip_waiting_for_build_processing: true, ) - slack(message: "App successfully uploaded to TestFlight 🎉!") + slack(message: "App Build (#{build_number}) successfully uploaded to TestFlight 🎉!") end end diff --git a/ios/App/fastlane/Matchfile b/ios/App/fastlane/Matchfile new file mode 100644 index 0000000000..ce307bf711 --- /dev/null +++ b/ios/App/fastlane/Matchfile @@ -0,0 +1,13 @@ +git_url("https://github.com/logseq/certificates.git") + +storage_mode("git") + +type("appstore") # The default type, can be: appstore, adhoc, enterprise or development + +app_identifier(["com.logseq.logseq", "com.logseq.logseq.ShareViewController"]) +# username("user@fastlane.tools") # Your Apple Developer Portal username + +# For all available options run `fastlane match --help` +# Remove the # in the beginning of the line to enable the other options + +# The docs are available on https://docs.fastlane.tools/actions/match diff --git a/scripts/patch-xcode-project.sh b/scripts/patch-xcode-project.sh new file mode 100755 index 0000000000..e908a31183 --- /dev/null +++ b/scripts/patch-xcode-project.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# This script patches the iOS project to use the correct codesigning and provisioning profiles. + +set -e +set -o pipefail + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +cd ${SCRIPT_DIR}/../ios/App + +ls -lah App.xcodeproj/project.pbxproj + +FILE="App.xcodeproj/project.pbxproj" + +/usr/libexec/PlistBuddy -c 'Set :objects:504EC2FC1FED79650016851F:attributes:TargetAttributes:504EC3031FED79650016851F:ProvisioningStyle Manual' $FILE +/usr/libexec/PlistBuddy -c 'Set :objects:504EC2FC1FED79650016851F:attributes:TargetAttributes:5FFF7D6927E343FA00B00DA8:ProvisioningStyle Manual' $FILE + +/usr/libexec/PlistBuddy -c 'Set :objects:504EC3171FED79650016851F:buildSettings:CODE_SIGN_STYLE Manual' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3171FED79650016851F:buildSettings:"CODE_SIGN_IDENTITY[sdk=iphoneos*]" String "iPhone Distribution"' $FILE +/usr/libexec/PlistBuddy -c 'Set :objects:504EC3171FED79650016851F:buildSettings:DEVELOPMENT_TEAM ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3171FED79650016851F:buildSettings:"DEVELOPMENT_TEAM[sdk=iphoneos*]" String K378MFWK59' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3171FED79650016851F:buildSettings:PROVISIONING_PROFILE_SPECIFIER String ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3171FED79650016851F:buildSettings:"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" String "match AppStore com.logseq.logseq"' $FILE + +/usr/libexec/PlistBuddy -c 'Set :objects:504EC3181FED79650016851F:buildSettings:CODE_SIGN_STYLE Manual' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3181FED79650016851F:buildSettings:"CODE_SIGN_IDENTITY[sdk=iphoneos*]" String "iPhone Distribution"' $FILE +/usr/libexec/PlistBuddy -c 'Set :objects:504EC3181FED79650016851F:buildSettings:DEVELOPMENT_TEAM ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3181FED79650016851F:buildSettings:"DEVELOPMENT_TEAM[sdk=iphoneos*]" String K378MFWK59' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3181FED79650016851F:buildSettings:PROVISIONING_PROFILE_SPECIFIER String ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:504EC3181FED79650016851F:buildSettings:"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" String "match AppStore com.logseq.logseq"' $FILE + +/usr/libexec/PlistBuddy -c 'Set :objects:5FFF7D7627E343FA00B00DA8:buildSettings:CODE_SIGN_STYLE Manual' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7627E343FA00B00DA8:buildSettings:"CODE_SIGN_IDENTITY[sdk=iphoneos*]" String "iPhone Distribution"' $FILE +/usr/libexec/PlistBuddy -c 'Set :objects:5FFF7D7627E343FA00B00DA8:buildSettings:DEVELOPMENT_TEAM ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7627E343FA00B00DA8:buildSettings:"DEVELOPMENT_TEAM[sdk=iphoneos*]" String K378MFWK59' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7627E343FA00B00DA8:buildSettings:PROVISIONING_PROFILE_SPECIFIER String ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7627E343FA00B00DA8:buildSettings:"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" String "match AppStore com.logseq.logseq.ShareViewController"' $FILE + +/usr/libexec/PlistBuddy -c 'Set :objects:5FFF7D7727E343FA00B00DA8:buildSettings:CODE_SIGN_STYLE Manual' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7727E343FA00B00DA8:buildSettings:"CODE_SIGN_IDENTITY[sdk=iphoneos*]" String "iPhone Distribution"' $FILE +/usr/libexec/PlistBuddy -c 'Set :objects:5FFF7D7727E343FA00B00DA8:buildSettings:DEVELOPMENT_TEAM ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7727E343FA00B00DA8:buildSettings:"DEVELOPMENT_TEAM[sdk=iphoneos*]" String K378MFWK59' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7727E343FA00B00DA8:buildSettings:PROVISIONING_PROFILE_SPECIFIER String ""' $FILE +/usr/libexec/PlistBuddy -c 'Add :objects:5FFF7D7727E343FA00B00DA8:buildSettings:"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" String "match AppStore com.logseq.logseq.ShareViewController"' $FILE + +echo Patch OK! diff --git a/src/main/electron/listener.cljs b/src/main/electron/listener.cljs index a475918cf1..86e18ba3cc 100644 --- a/src/main/electron/listener.cljs +++ b/src/main/electron/listener.cljs @@ -160,6 +160,9 @@ insert-today? (get-in (state/get-config) [:quick-capture-options :insert-today] false) + redirect-page? (get-in (state/get-config) + [:quick-capture-options :redirect-page] + false) today-page (when (state/enable-journals?) (string/lower-case (date/today))) page (if (or (= page "TODAY") @@ -195,7 +198,7 @@ (do (when (not= page (state/get-current-page)) - (page-handler/create! page {:redirect? true})) + (page-handler/create! page {:redirect? redirect-page?})) (editor-handler/api-insert-new-block! content {:page page :edit-block? true :replace-empty-target? true})))))) diff --git a/src/main/frontend/components/sidebar.cljs b/src/main/frontend/components/sidebar.cljs index 740363b36f..290320f4ba 100644 --- a/src/main/frontend/components/sidebar.cljs +++ b/src/main/frontend/components/sidebar.cljs @@ -361,7 +361,16 @@ (route-handler/sidebar-journals!) (route-handler/go-to-journals!))) :icon "calendar"}))) - + + (when enable-whiteboards? + (sidebar-item + {:class "whiteboard" + :title (t :right-side-bar/whiteboards) + :href (rfe/href :whiteboards) + :active (and (not srs-open?) (#{:whiteboard :whiteboards} route-name)) + :icon "whiteboard" + :icon-extension? true})) + (when (state/enable-flashcards? (state/get-current-repo)) [:div.flashcards-nav (flashcards srs-open?)]) @@ -378,16 +387,7 @@ :title (t :right-side-bar/all-pages) :href (rfe/href :all-pages) :active (and (not srs-open?) (= route-name :all-pages)) - :icon "files"}) - - (when enable-whiteboards? - (sidebar-item - {:class "whiteboard" - :title (t :right-side-bar/whiteboards) - :href (rfe/href :whiteboards) - :active (and (not srs-open?) (#{:whiteboard :whiteboards} route-name)) - :icon "whiteboard" - :icon-extension? true}))]] + :icon "files"})]] [:div.nav-contents-container.flex.flex-col.gap-1.pt-1 {:on-scroll on-contents-scroll} diff --git a/src/main/frontend/extensions/pdf/highlights.cljs b/src/main/frontend/extensions/pdf/highlights.cljs index 46204dd3fa..ab51be9d1b 100644 --- a/src/main/frontend/extensions/pdf/highlights.cljs +++ b/src/main/frontend/extensions/pdf/highlights.cljs @@ -178,7 +178,7 @@ (action-fn! action true)))} [:li.item-colors - (for [it ["yellow", "blue", "green", "red", "purple"]] + (for [it ["yellow", "red", "green", "blue", "purple"]] [:a {:key it :data-color it :data-action it} it])] diff --git a/src/main/frontend/fs/sync.cljs b/src/main/frontend/fs/sync.cljs index 16b3aa82a0..59a6bf2335 100644 --- a/src/main/frontend/fs/sync.cljs +++ b/src/main/frontend/fs/sync.cljs @@ -728,6 +728,12 @@ (RemoteAPI nil)) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 723e978ace..55a0834785 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -56,13 +56,13 @@ (defonce icon-size (if (mobile-util/native-platform?) 26 20)) (def block-background-colors - ["gray" + ["yellow" "red" - "yellow" + "pink" "green" "blue" "purple" - "pink"]) + "gray"]) (rum/defc ls-textarea < rum/reactive diff --git a/tldraw/README.md b/tldraw/README.md index ece5ebafc4..84f73a3765 100644 --- a/tldraw/README.md +++ b/tldraw/README.md @@ -8,7 +8,7 @@ This folder contains the JS codes for a custom build of Tldraw to fit the needs ### Prerequisites -Morden JS eco tools like Node.js and yarn. +Modern JS eco tools like Node.js and yarn. ### Run in dev mode diff --git a/tldraw/apps/tldraw-logseq/src/lib/shapes/LineShape.tsx b/tldraw/apps/tldraw-logseq/src/lib/shapes/LineShape.tsx index d32501b29c..8f897e78a2 100644 --- a/tldraw/apps/tldraw-logseq/src/lib/shapes/LineShape.tsx +++ b/tldraw/apps/tldraw-logseq/src/lib/shapes/LineShape.tsx @@ -161,7 +161,7 @@ export class LineShape extends TLLineShape { <> { strokeWidth={strokeWidth / 2} strokeLinejoin="round" strokeLinecap="round" - stroke={getComputedColor(stroke, 'stroke')} - fill={getComputedColor(stroke, 'stroke')} + stroke={getComputedColor(stroke, 'text')} + fill={getComputedColor(stroke, 'text')} strokeDasharray={strokeType === 'dashed' ? '12 4' : undefined} /> ) diff --git a/tldraw/apps/tldraw-logseq/src/styles.css b/tldraw/apps/tldraw-logseq/src/styles.css index c05a122420..ec743fce44 100644 --- a/tldraw/apps/tldraw-logseq/src/styles.css +++ b/tldraw/apps/tldraw-logseq/src/styles.css @@ -7,7 +7,7 @@ --ls-wb-stroke-color-purple: var(--color-purple-500, purple); --ls-wb-stroke-color-pink: var(--color-pink-500, pink); --ls-wb-stroke-color-default: var(--ls-secondary-border-color); - --ls-wb-text-color-default: var(--ls-secondary-text-color); + --ls-wb-text-color-default: var(--ls-primary-text-color); --ls-wb-background-color-default: var(--ls-tertiary-background-color); } diff --git a/tldraw/packages/core/src/types/types.ts b/tldraw/packages/core/src/types/types.ts index aed49f447b..e8b15729e2 100644 --- a/tldraw/packages/core/src/types/types.ts +++ b/tldraw/packages/core/src/types/types.ts @@ -4,13 +4,13 @@ import type { TLEventMap } from './TLEventMap' import type { TLHandle } from './TLHandle' export enum Color { - Gray = 'gray', - Red = 'red', Yellow = 'yellow', + Red = 'red', + Pink = 'pink', Green = 'green', Blue = 'blue', Purple = 'purple', - Pink = 'pink', + Gray = 'gray', Default = '', }