From 62697aa940d3eed791c41b6b5d84352444f26110 Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Thu, 25 Apr 2024 22:32:30 +0800
Subject: [PATCH 1/7] :art: Supports specifying the notebook to save new docs
https://github.com/siyuan-note/siyuan/issues/10671
---
kernel/api/filetree.go | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/kernel/api/filetree.go b/kernel/api/filetree.go
index 6496b8d6b..3cda46b51 100644
--- a/kernel/api/filetree.go
+++ b/kernel/api/filetree.go
@@ -707,12 +707,18 @@ func getDocCreateSavePath(c *gin.Context) {
var docCreateSaveBox string
docCreateSavePathTpl := model.Conf.FileTree.DocCreateSavePath
if nil != box {
- docCreateSaveBox = box.GetConf().DocCreateSaveBox
- docCreateSavePathTpl = box.GetConf().DocCreateSavePath
+ boxConf := box.GetConf()
+ docCreateSaveBox = boxConf.DocCreateSaveBox
+ docCreateSavePathTpl = boxConf.DocCreateSavePath
}
if "" == docCreateSaveBox {
docCreateSaveBox = model.Conf.FileTree.DocCreateSaveBox
}
+ if "" != docCreateSaveBox {
+ if nil == model.Conf.Box(docCreateSaveBox) {
+ docCreateSaveBox = notebook
+ }
+ }
if "" == docCreateSaveBox {
docCreateSaveBox = notebook
}
@@ -754,12 +760,18 @@ func getRefCreateSavePath(c *gin.Context) {
var refCreateSaveBox string
refCreateSavePathTpl := model.Conf.FileTree.RefCreateSavePath
if nil != box {
- refCreateSaveBox = box.GetConf().RefCreateSaveBox
- refCreateSavePathTpl = box.GetConf().RefCreateSavePath
+ boxConf := box.GetConf()
+ refCreateSaveBox = boxConf.RefCreateSaveBox
+ refCreateSavePathTpl = boxConf.RefCreateSavePath
}
if "" == refCreateSaveBox {
refCreateSaveBox = model.Conf.FileTree.RefCreateSaveBox
}
+ if "" != refCreateSaveBox {
+ if nil == model.Conf.Box(refCreateSaveBox) {
+ refCreateSaveBox = notebook
+ }
+ }
if "" == refCreateSaveBox {
refCreateSaveBox = notebook
}
From 78216e79096db2db55575a73e59457597216aac9 Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Thu, 25 Apr 2024 23:03:33 +0800
Subject: [PATCH 2/7] :art: Supports specifying the notebook to save new docs
https://github.com/siyuan-note/siyuan/issues/10671
---
kernel/api/filetree.go | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/kernel/api/filetree.go b/kernel/api/filetree.go
index 3cda46b51..cb19a55b4 100644
--- a/kernel/api/filetree.go
+++ b/kernel/api/filetree.go
@@ -716,6 +716,7 @@ func getDocCreateSavePath(c *gin.Context) {
}
if "" != docCreateSaveBox {
if nil == model.Conf.Box(docCreateSaveBox) {
+ // 如果配置的笔记本未打开或者不存在,则使用当前笔记本
docCreateSaveBox = notebook
}
}
@@ -733,6 +734,13 @@ func getDocCreateSavePath(c *gin.Context) {
docCreateSavePathTpl = "/Untitled"
}
+ if docCreateSaveBox != notebook {
+ if "" != docCreateSavePathTpl && !strings.HasPrefix(docCreateSavePathTpl, "/") {
+ // 如果配置的笔记本不是当前笔记本,则将相对路径转换为绝对路径
+ docCreateSavePathTpl = "/" + docCreateSavePathTpl
+ }
+ }
+
docCreateSavePath, err := model.RenderGoTemplate(docCreateSavePathTpl)
if nil != err {
ret.Code = -1
@@ -769,6 +777,7 @@ func getRefCreateSavePath(c *gin.Context) {
}
if "" != refCreateSaveBox {
if nil == model.Conf.Box(refCreateSaveBox) {
+ // 如果配置的笔记本未打开或者不存在,则使用当前笔记本
refCreateSaveBox = notebook
}
}
@@ -779,6 +788,13 @@ func getRefCreateSavePath(c *gin.Context) {
refCreateSavePathTpl = model.Conf.FileTree.RefCreateSavePath
}
+ if refCreateSaveBox != notebook {
+ if "" != refCreateSavePathTpl && !strings.HasPrefix(refCreateSavePathTpl, "/") {
+ // 如果配置的笔记本不是当前笔记本,则将相对路径转换为绝对路径
+ refCreateSavePathTpl = "/" + refCreateSavePathTpl
+ }
+ }
+
refCreateSavePath, err := model.RenderGoTemplate(refCreateSavePathTpl)
if nil != err {
ret.Code = -1
From b102219a130cef1d74e5c8486dfc132c18970a87 Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Thu, 25 Apr 2024 23:41:05 +0800
Subject: [PATCH 3/7] :art: Supports specifying the notebook to save new docs
https://github.com/siyuan-note/siyuan/issues/10671
---
app/src/menus/onGetnotebookconf.ts | 8 ++++----
app/src/util/newFile.ts | 24 +++++++++++++++++++++++-
2 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/app/src/menus/onGetnotebookconf.ts b/app/src/menus/onGetnotebookconf.ts
index db88c429f..a7de89d44 100644
--- a/app/src/menus/onGetnotebookconf.ts
+++ b/app/src/menus/onGetnotebookconf.ts
@@ -20,14 +20,14 @@ declare interface INotebookConf {
}
}
-export const genNotebookOption = (id: string) => {
+export const genNotebookOption = (id: string, notebookId?: string) => {
let html = ``;
const helpIds: string[] = [];
Object.keys(Constants.HELP_PATH).forEach((key: "zh_CN") => {
helpIds.push(Constants.HELP_PATH[key]);
});
window.siyuan.notebooks.forEach((item) => {
- if (helpIds.includes(item.id)) {
+ if (helpIds.includes(item.id) || item.id === notebookId) {
return;
}
html += ``;
@@ -45,7 +45,7 @@ export const onGetnotebookconf = (data: INotebookConf) => {
${window.siyuan.languages.fileTree13}
-
+
@@ -55,7 +55,7 @@ export const onGetnotebookconf = (data: INotebookConf) => {
${window.siyuan.languages.fileTree6}
-
+
diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.ts
index bc12bf090..36b8a5598 100644
--- a/app/src/util/newFile.ts
+++ b/app/src/util/newFile.ts
@@ -92,6 +92,9 @@ export const newFile = (optios: {
optios.currentPath = resultData.currentPath;
}
fetchPost("/api/filetree/getDocCreateSavePath", {notebook: optios.notebookId}, (data) => {
+ if (!optios.useSavePath) {
+ data.data.box = optios.notebookId;
+ }
if ((data.data.path.indexOf("/") > -1 && optios.useSavePath) || optios.name) {
if (data.data.path.startsWith("/") || optios.currentPath === "/") {
fetchPost("/api/filetree/createDocWithMd", {
@@ -138,8 +141,27 @@ export const newFile = (optios: {
if (!validateName(title)) {
return;
}
+ if (optios.notebookId !== data.data.box) {
+ fetchPost("/api/filetree/createDocWithMd", {
+ notebook: data.data.box,
+ path: pathPosix().join(data.data.path || "/", optios.name || (data.data.path.endsWith("/") ? window.siyuan.languages.untitled : "")),
+ markdown: ""
+ }, response => {
+ /// #if !MOBILE
+ openFileById({
+ app: optios.app,
+ id: response.data,
+ action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]
+ });
+ /// #else
+ openMobileFileById(optios.app, response.data, [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
+ /// #endif
+ });
+ return;
+ }
+
const id = Lute.NewNodeID();
- const newPath = optios.notebookId === data.data.box ? (pathPosix().join(getDisplayName(optios.currentPath, false, true), id + ".sy")) : (data.data.path || "/");
+ const newPath = (pathPosix().join(getDisplayName(optios.currentPath, false, true), id + ".sy"));
if (optios.paths) {
optios.paths[optios.paths.indexOf(undefined)] = newPath;
}
From 8063a7ff37892fc97705168128203841d0652332 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BB=9B=E4=BA=BD?=
<83791825+Soltus@users.noreply.github.com>
Date: Thu, 25 Apr 2024 23:46:04 +0800
Subject: [PATCH 4/7] Use GitHub environment variables as template literals to
reduce workflow maintenance and provide convenience for forked repositories.
(#11142)
* Update cd.yml
* Update dockerimage.yml
---
.github/workflows/cd.yml | 62 ++++++++++++++++++-------------
.github/workflows/dockerimage.yml | 19 ++++++----
2 files changed, 49 insertions(+), 32 deletions(-)
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index 5fc027cb6..7f4bba053 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -6,6 +6,13 @@ on:
- '*-dev*'
workflow_dispatch:
+# ref https://docs.github.com/zh/actions/learn-github-actions/variables
+env:
+ repo_name_android: "siyuan-android"
+ repo_name: "siyuan"
+ repo_owner: "siyuan-note"
+ package_json: "app/package.json"
+
jobs:
create_release:
name: Create Release
@@ -39,7 +46,7 @@ jobs:
run: |
echo "release_title=$(git show --format=%s --no-patch | head -1)" >> $GITHUB_OUTPUT
echo "release_version=$(TZ=Asia/Shanghai date +'v%Y%m%d%H%M')" >> $GITHUB_OUTPUT
- changelog=$(python scripts/parse-changelog.py -t ${{ github.ref }} -b ${{ steps.thislatestR.outputs.release }} siyuan-note/siyuan)
+ changelog=$(python scripts/parse-changelog.py -t ${{ github.ref }} -b ${{ steps.thislatestR.outputs.release }} ${{ env.repo_owner }}/${{ env.repo_name }})
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "release_body<<$EOF" >> $GITHUB_ENV
echo "$changelog" >> $GITHUB_ENV
@@ -51,13 +58,13 @@ jobs:
uses: sergeysova/jq-action@v2
id: version
with:
- cmd: 'jq .version app/package.json -r'
+ cmd: 'jq .version ${{ env.package_json }} -r'
- name: Extract packageManager from package.json
uses: sergeysova/jq-action@v2
id: packageManager
with:
- cmd: "jq .packageManager app/package.json -r"
+ cmd: "jq .packageManager ${{ env.package_json }} -r"
- name: Create Release
id: create_release
@@ -80,7 +87,8 @@ jobs:
- os: ubuntu-20.04
name: ubuntu build linux.AppImage
kernel_path: "../app/kernel-linux/SiYuan-Kernel"
- build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod"
+ build_args_prefix: "-s -w -X"
+ build_args_suffix: "Mode=prod"
electron_args: "dist-linux"
goos: "linux"
goarch: "amd64"
@@ -88,7 +96,8 @@ jobs:
- os: ubuntu-20.04
name: ubuntu build linux.tar.gz
kernel_path: "../app/kernel-linux/SiYuan-Kernel"
- build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod"
+ build_args_prefix: "-s -w -X"
+ build_args_suffix: "Mode=prod"
electron_args: "dist-linux"
goos: "linux"
goarch: "amd64"
@@ -96,7 +105,8 @@ jobs:
- os: macos-latest
name: macos build mac.dmg
kernel_path: "../app/kernel-darwin/SiYuan-Kernel"
- build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod"
+ build_args_prefix: "-s -w -X"
+ build_args_suffix: "Mode=prod"
electron_args: "dist-darwin"
goos: "darwin"
goarch: "amd64"
@@ -104,7 +114,8 @@ jobs:
- os: macos-latest
name: macos build mac-arm64.dmg
kernel_path: "../app/kernel-darwin-arm64/SiYuan-Kernel"
- build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod"
+ build_args_prefix: "-s -w -X"
+ build_args_suffix: "Mode=prod"
electron_args: "dist-darwin-arm64"
goos: "darwin"
goarch: "arm64"
@@ -112,7 +123,8 @@ jobs:
- os: windows-latest
name: windows build win.exe
kernel_path: "../app/kernel/SiYuan-Kernel.exe"
- build_args: "-s -w -H=windowsgui -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod"
+ build_args_prefix: "-s -w -H=windowsgui -X"
+ build_args_suffix: "Mode=prod"
electron_args: "dist"
goos: "windows"
gobin: "bin"
@@ -123,7 +135,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
- path: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan
+ path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}
- name: Set up MingGW
uses: msys2/setup-msys2@v2
@@ -132,20 +144,20 @@ jobs:
install: p7zip mingw-w64-x86_64-lua
- name: Set up TDM-GCC
- run: msys2 -c "bash go/src/github.com/siyuan-note/siyuan/scripts/get-tdm-gcc.sh tdm https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm-1/tdm-gcc-10.3.0.exe" && echo "CC=${{ github.workspace }}/tdm/bin/gcc.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ run: msys2 -c "bash go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/scripts/get-tdm-gcc.sh tdm https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm-1/tdm-gcc-10.3.0.exe" && echo "CC=${{ github.workspace }}/tdm/bin/gcc.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if: "contains( matrix.config.goarch, '386')"
working-directory: ${{ github.workspace }}
- name: Set up Go
uses: actions/setup-go@v5
with:
- go-version-file: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/kernel/go.mod
+ go-version-file: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel/go.mod
- run: go version
- name: Set up goversioninfo
run: go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo
if: "contains( matrix.config.goos, 'windows')"
- working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/kernel
+ working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
env:
GO111MODULE: on
CGO_ENABLED: 1
@@ -160,49 +172,49 @@ jobs:
- name: Install Node pnpm
run: npm install -g ${{ needs.create_release.outputs.packageManager }}
- working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app
+ working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
- name: Install Node Dependencies
run: pnpm install --no-frozen-lockfile
- working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app
+ working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
- name: Building UI
run: pnpm run build
- working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app
+ working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
- name: Remove Build Directory
uses: JesseTG/rm@v1.0.2
with:
- path: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app/build
+ path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/build
- name: Remove Kernel Directory for Linux
uses: JesseTG/rm@v1.0.2
with:
- path: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app/kernel-linux
+ path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-linux
- name: Remove Kernel Directory for Windows
uses: JesseTG/rm@v1.0.2
with:
- path: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app/kernel
+ path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel
- name: Remove Kernel Directory for macOS
uses: JesseTG/rm@v1.0.2
with:
- path: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app/kernel-darwin
+ path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-darwin
- name: Remove Kernel Directory for macOS ARM64
uses: JesseTG/rm@v1.0.2
with:
- path: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app/kernel-darwin-arm64
+ path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-darwin-arm64
- name: Generate Icon Resource and Properties/Version Info For Windows
run: ${{ github.workspace }}\go\${{ matrix.config.gobin }}\goversioninfo -platform-specific=true -icon="resource\icon.ico" -manifest="resource\goversioninfo.exe.manifest"
if: "contains( matrix.config.goos, 'windows')"
- working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/kernel
+ working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
- name: Building Kernel
- run: go build --tags fts5 -o "${{ matrix.config.kernel_path }}" -v -ldflags "${{ matrix.config.build_args }}"
- working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/kernel
+ run: go build --tags fts5 -o "${{ matrix.config.kernel_path }}" -v -ldflags "${{ matrix.config.build_args_prefix }} github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel/util.${{ matrix.config.build_args_suffix }}"
+ working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
env:
GO111MODULE: on
CGO_ENABLED: 1
@@ -212,7 +224,7 @@ jobs:
- name: Building Electron
run: pnpm run ${{ matrix.config.electron_args }}
- working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app
+ working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
- name: Upload Release
uses: actions/upload-release-asset@v1
@@ -221,5 +233,5 @@ jobs:
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: siyuan-${{ needs.create_release.outputs.release_version }}-${{ matrix.config.suffix }}
- asset_path: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app/build/siyuan-${{ needs.create_release.outputs.version }}-${{ matrix.config.suffix }}
+ asset_path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/build/siyuan-${{ needs.create_release.outputs.version }}-${{ matrix.config.suffix }}
asset_content_type: application/octet-stream
diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml
index efbf09663..bf16d4d21 100644
--- a/.github/workflows/dockerimage.yml
+++ b/.github/workflows/dockerimage.yml
@@ -11,14 +11,19 @@ on:
branches:
- master
+# ref https://docs.github.com/zh/actions/learn-github-actions/variables
+env:
+ repo_name_android: "siyuan-android"
+ repo_name: "siyuan"
+ repo_owner: "siyuan-note"
+ package_json: "app/package.json"
+ docker_hub_owner: "b3log"
+ docker_hub_repo: "siyuan"
+
jobs:
build:
name: build
runs-on: ubuntu-latest
- strategy:
- matrix:
- string:
- - package_json: "app/package.json"
permissions:
packages: write
contents: read
@@ -34,7 +39,7 @@ jobs:
uses: sergeysova/jq-action@v2
id: version
with:
- cmd: "jq .version ${{ matrix.string.package_json }} -r"
+ cmd: "jq .version ${{ env.package_json }} -r"
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
@@ -67,9 +72,9 @@ jobs:
- name: Build the Docker image use Workflow Dispatch inputs' version
if: ${{ github.event_name == 'workflow_dispatch' && !github.event.inputs.image_tag == '' }}
run: |
- docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t b3log/siyuan:latest -t b3log/siyuan:v${{ github.event.inputs.image_tag }} .
+ docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:latest -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:v${{ github.event.inputs.image_tag }} .
- name: Build the Docker image use package_json version
if: ${{ github.event_name == 'push' || github.event.inputs.image_tag == '' }}
run: |
- docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t b3log/siyuan:latest -t b3log/siyuan:v${{ steps.version.outputs.value }} .
+ docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:latest -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:v${{ steps.version.outputs.value }} .
From 43b376ac8614fdc65f14305ab7134d7841bcd326 Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Fri, 26 Apr 2024 09:14:34 +0800
Subject: [PATCH 5/7] :art: Rollback notebook do not reload UI twice
---
kernel/model/history.go | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/model/history.go b/kernel/model/history.go
index 4ea4001ac..7ca196210 100644
--- a/kernel/model/history.go
+++ b/kernel/model/history.go
@@ -320,7 +320,6 @@ func RollbackNotebookHistory(historyPath string) (err error) {
return
}
- util.ReloadUI()
FullReindex()
IncSync()
return nil
From 5ede8fd1be1dbaddde186f9a255fe15f4b598c3a Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Fri, 26 Apr 2024 09:17:50 +0800
Subject: [PATCH 6/7] :art: Update statusbar message timeout
---
app/src/dialog/processSystem.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index c8822e645..626e6dfba 100644
--- a/app/src/dialog/processSystem.ts
+++ b/app/src/dialog/processSystem.ts
@@ -284,6 +284,7 @@ export const progressStatus = (data: IWebSocketData) => {
if (!statusElement) {
return;
}
+
if (isMobile()) {
if (!document.querySelector("#keyboardToolbar").classList.contains("fn__none")) {
return;
@@ -293,7 +294,7 @@ export const progressStatus = (data: IWebSocketData) => {
statusElement.style.bottom = "0";
statusTimeout = window.setTimeout(() => {
statusElement.style.bottom = "";
- }, 5000);
+ }, 7000);
} else {
const msgElement = statusElement.querySelector(".status__msg");
if (msgElement) {
@@ -301,7 +302,7 @@ export const progressStatus = (data: IWebSocketData) => {
msgElement.innerHTML = data.msg;
statusTimeout = window.setTimeout(() => {
msgElement.innerHTML = "";
- }, 5000);
+ }, 7000);
}
}
};
From c1019a0c493cd93b03040335918131b4dc3094cf Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Fri, 26 Apr 2024 10:12:49 +0800
Subject: [PATCH 7/7] :art: Update user guide
https://github.com/siyuan-note/siyuan/issues/11144
---
.../20210808180117-6v0mkxr/.siyuan/conf.json | 2 +
.../20200924100950-9op5xi1.sy | 53 ++++++++++-------
.../20210808180117-czj9bvb/.siyuan/conf.json | 2 +
.../20200813004551-gm0pbn1.sy | 57 +++++++++++--------
.../20211226090932-5lcq56f/.siyuan/conf.json | 2 +
.../20211226122549-jktxego.sy | 53 ++++++++++-------
6 files changed, 101 insertions(+), 68 deletions(-)
diff --git a/app/guide/20210808180117-6v0mkxr/.siyuan/conf.json b/app/guide/20210808180117-6v0mkxr/.siyuan/conf.json
index a4d69e287..d9bbc5131 100644
--- a/app/guide/20210808180117-6v0mkxr/.siyuan/conf.json
+++ b/app/guide/20210808180117-6v0mkxr/.siyuan/conf.json
@@ -3,7 +3,9 @@
"sort": 3,
"icon": "1f4d4",
"closed": false,
+ "refCreateSaveBox": "",
"refCreateSavePath": "",
+ "docCreateSaveBox": "",
"docCreateSavePath": "",
"dailyNoteSavePath": "/daily note/{{now | date \"2006/01\"}}/{{now | date \"2006-01-02\"}}",
"dailyNoteTemplatePath": "",
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
index 8e2d5da3d..c680afbd8 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
@@ -7,7 +7,7 @@
"id": "20200924100950-9op5xi1",
"title": "Shortcuts",
"type": "doc",
- "updated": "20240416115710"
+ "updated": "20240426101110"
},
"Children": [
{
@@ -40,7 +40,7 @@
"Properties": {
"colgroup": "||",
"id": "20210106154101-qrojg1b",
- "updated": "20240308232956"
+ "updated": "20240426100644"
},
"Children": [
{
@@ -502,7 +502,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select next edit tab"
+ "Data": "Jump to next edit tab"
}
]
},
@@ -550,7 +550,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select previous edit tab"
+ "Data": "Jump to previous edit tab"
}
]
},
@@ -598,7 +598,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the first tab"
+ "Data": "Jump to the first tab"
}
]
},
@@ -646,7 +646,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the second tab"
+ "Data": "Jump to the second tab"
}
]
},
@@ -661,7 +661,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+2"
},
{
"Type": "NodeText",
@@ -694,7 +694,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the third tab"
+ "Data": "Jump to the third tab"
}
]
},
@@ -709,7 +709,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+3"
},
{
"Type": "NodeText",
@@ -742,7 +742,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the fourth tab"
+ "Data": "Jump to the fourth tab"
}
]
},
@@ -757,7 +757,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+4"
},
{
"Type": "NodeText",
@@ -790,7 +790,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the fifth tab"
+ "Data": "Jump to the fifth tab"
}
]
},
@@ -805,7 +805,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+5"
},
{
"Type": "NodeText",
@@ -838,7 +838,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the sixth tab"
+ "Data": "Jump to the sixth tab"
}
]
},
@@ -853,7 +853,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+6"
},
{
"Type": "NodeText",
@@ -886,7 +886,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the seventh tab"
+ "Data": "Jump to the seventh tab"
}
]
},
@@ -901,7 +901,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+7"
},
{
"Type": "NodeText",
@@ -934,7 +934,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the eighth tab"
+ "Data": "Jump to the eighth tab"
}
]
},
@@ -949,7 +949,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+8"
},
{
"Type": "NodeText",
@@ -982,7 +982,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select the ninth tab"
+ "Data": "Jump to the ninth/last tab"
}
]
},
@@ -997,7 +997,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+9"
},
{
"Type": "NodeText",
@@ -2326,7 +2326,7 @@
"Properties": {
"colgroup": "||",
"id": "20210826183314-axmylf4",
- "updated": "20240416115710"
+ "updated": "20240426101110"
},
"Children": [
{
@@ -2398,6 +2398,15 @@
"TextMarkType": "kbd",
"TextMarkTextContent": "Ctrl+/"
},
+ {
+ "Type": "NodeText",
+ "Data": " / "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "⌘/"
+ },
{
"Type": "NodeText",
"Data": ""
diff --git a/app/guide/20210808180117-czj9bvb/.siyuan/conf.json b/app/guide/20210808180117-czj9bvb/.siyuan/conf.json
index 27a4c7ae5..02a84d95e 100644
--- a/app/guide/20210808180117-czj9bvb/.siyuan/conf.json
+++ b/app/guide/20210808180117-czj9bvb/.siyuan/conf.json
@@ -3,7 +3,9 @@
"sort": 1,
"icon": "1f4d4",
"closed": false,
+ "refCreateSaveBox": "",
"refCreateSavePath": "",
+ "docCreateSaveBox": "",
"docCreateSavePath": "",
"dailyNoteSavePath": "/daily note/{{now | date \"2006/01\"}}/{{now | date \"2006-01-02\"}}",
"dailyNoteTemplatePath": "",
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
index 5ca4827c2..d31da7f15 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
@@ -7,7 +7,7 @@
"id": "20200813004551-gm0pbn1",
"title": "快捷键",
"type": "doc",
- "updated": "20240416105908"
+ "updated": "20240426101023"
},
"Children": [
{
@@ -36,7 +36,7 @@
"Properties": {
"colgroup": "||",
"id": "20201227133317-ovwnk1y",
- "updated": "20240308232815"
+ "updated": "20240426100731"
},
"Children": [
{
@@ -494,7 +494,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中下一个编辑页签"
+ "Data": "跳转到下一个编辑页签"
}
]
},
@@ -542,7 +542,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中上一个编辑页签"
+ "Data": "跳转到上一个编辑页签"
}
]
},
@@ -596,7 +596,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第一个页签"
+ "Data": "跳转到第一个页签"
}
]
},
@@ -644,7 +644,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第二个页签"
+ "Data": "跳转到第二个页签"
}
]
},
@@ -659,7 +659,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+2"
},
{
"Type": "NodeText",
@@ -692,7 +692,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第三个页签"
+ "Data": "跳转到第三个页签"
}
]
},
@@ -707,7 +707,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+3"
},
{
"Type": "NodeText",
@@ -740,7 +740,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第四个页签"
+ "Data": "跳转到第四个页签"
}
]
},
@@ -755,7 +755,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+4"
},
{
"Type": "NodeText",
@@ -788,7 +788,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第五个页签"
+ "Data": "跳转到第五个页签"
}
]
},
@@ -803,7 +803,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+5"
},
{
"Type": "NodeText",
@@ -836,7 +836,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第六个页签"
+ "Data": "跳转到第六个页签"
}
]
},
@@ -851,7 +851,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+6"
},
{
"Type": "NodeText",
@@ -884,7 +884,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第七个页签"
+ "Data": "跳转到第七个页签"
}
]
},
@@ -899,7 +899,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+7"
},
{
"Type": "NodeText",
@@ -932,7 +932,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第八个页签"
+ "Data": "跳转到第八个页签"
}
]
},
@@ -947,7 +947,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+8"
},
{
"Type": "NodeText",
@@ -980,7 +980,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中第九个页签"
+ "Data": "跳转到第九个/最后一个页签"
}
]
},
@@ -995,7 +995,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+9"
},
{
"Type": "NodeText",
@@ -1028,7 +1028,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中下一个页签"
+ "Data": "跳转到下一个页签"
}
]
},
@@ -1076,7 +1076,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中上一个页签"
+ "Data": "跳转到上一个页签"
}
]
},
@@ -2324,7 +2324,7 @@
"Properties": {
"colgroup": "||",
"id": "20210826183308-gok25ug",
- "updated": "20240416105908"
+ "updated": "20240426101023"
},
"Children": [
{
@@ -2396,6 +2396,15 @@
"TextMarkType": "kbd",
"TextMarkTextContent": "Ctrl+/"
},
+ {
+ "Type": "NodeText",
+ "Data": " / "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "⌘/"
+ },
{
"Type": "NodeText",
"Data": ""
diff --git a/app/guide/20211226090932-5lcq56f/.siyuan/conf.json b/app/guide/20211226090932-5lcq56f/.siyuan/conf.json
index c3870b023..f3b810284 100644
--- a/app/guide/20211226090932-5lcq56f/.siyuan/conf.json
+++ b/app/guide/20211226090932-5lcq56f/.siyuan/conf.json
@@ -3,7 +3,9 @@
"sort": 2,
"icon": "1f4d4",
"closed": false,
+ "refCreateSaveBox": "",
"refCreateSavePath": "",
+ "docCreateSaveBox": "",
"docCreateSavePath": "",
"dailyNoteSavePath": "/daily note/{{now | date \"2006/01\"}}/{{now | date \"2006-01-02\"}}",
"dailyNoteTemplatePath": "",
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
index 33d787e9a..645112816 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
@@ -7,7 +7,7 @@
"id": "20211226122549-jktxego",
"title": "快捷鍵",
"type": "doc",
- "updated": "20240416113937"
+ "updated": "20240426101104"
},
"Children": [
{
@@ -36,7 +36,7 @@
"Properties": {
"colgroup": "||",
"id": "20211226122652-4e9hm9i",
- "updated": "20240308232846"
+ "updated": "20240426100801"
},
"Children": [
{
@@ -494,7 +494,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取上一個編輯分頁"
+ "Data": "跳到上一個編輯分頁"
}
]
},
@@ -542,7 +542,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選中上一個編輯分頁"
+ "Data": "跳到上一個編輯分頁"
}
]
},
@@ -590,7 +590,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第一個分頁"
+ "Data": "跳到第一個分頁"
}
]
},
@@ -638,7 +638,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第二個分頁"
+ "Data": "跳到第二個分頁"
}
]
},
@@ -653,7 +653,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+2"
},
{
"Type": "NodeText",
@@ -686,7 +686,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第三個分頁"
+ "Data": "跳到第三個分頁"
}
]
},
@@ -701,7 +701,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+3"
},
{
"Type": "NodeText",
@@ -734,7 +734,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第四個分頁"
+ "Data": "跳到第四個分頁"
}
]
},
@@ -749,7 +749,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+4"
},
{
"Type": "NodeText",
@@ -782,7 +782,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第五個分頁"
+ "Data": "跳到第五個分頁"
}
]
},
@@ -797,7 +797,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+5"
},
{
"Type": "NodeText",
@@ -830,7 +830,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第六個分頁"
+ "Data": "跳到第六個分頁"
}
]
},
@@ -845,7 +845,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+6"
},
{
"Type": "NodeText",
@@ -878,7 +878,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第七個分頁"
+ "Data": "跳到第七個分頁"
}
]
},
@@ -893,7 +893,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+7"
},
{
"Type": "NodeText",
@@ -926,7 +926,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第八個分頁"
+ "Data": "跳到第八個分頁"
}
]
},
@@ -941,7 +941,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+8"
},
{
"Type": "NodeText",
@@ -974,7 +974,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取第九個分頁"
+ "Data": "跳到第九個/最後一個分頁"
}
]
},
@@ -989,7 +989,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Ctrl+1"
+ "TextMarkTextContent": "Ctrl+9"
},
{
"Type": "NodeText",
@@ -2318,7 +2318,7 @@
"Properties": {
"colgroup": "||",
"id": "20211226122652-eu9085n",
- "updated": "20240416113937"
+ "updated": "20240426101104"
},
"Children": [
{
@@ -2390,6 +2390,15 @@
"TextMarkType": "kbd",
"TextMarkTextContent": "Ctrl+/"
},
+ {
+ "Type": "NodeText",
+ "Data": " / "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "⌘/"
+ },
{
"Type": "NodeText",
"Data": ""