diff --git a/.github/README.md b/.github/README.md index 62eb845d9b..b7769eaae0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -62,7 +62,11 @@

-

+
split -


+

+ + +

+

diff --git a/.gitignore b/.gitignore index f747cb0106..b0a9cd7655 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ lerna-debug.log* package-lock.json yarn.lock -# workflows +# Workflows **/__pycache__ # Sillot extend diff --git a/.vscode/Sillot.code-workspace b/.vscode/Sillot.code-workspace index c8a9835599..46ea9119a1 100644 --- a/.vscode/Sillot.code-workspace +++ b/.vscode/Sillot.code-workspace @@ -1,28 +1,34 @@ { "folders": [ { - "path": "..", - "name": "汐洛🤍/ 🗂️" + "path": "..", // 必填 + "name": "汐洛🤍/ 🗂️", // 必填 + "url": "https://github.com/Hi-Windom/Sillot" // 仅描述,无效字段 }, { "path": "../kernel", // 列出子文件夹,在父文件夹的 setting.json 添加隐藏(排除) - "name": "汐洛版思源内核🤍/kernel 🗂️" + "name": "汐洛绞架内核🤍/kernel 🗂️", + "url": "https://github.com/Hi-Windom/Sillot/kernel" }, { "path": "../app/appearance", // 列出子文件夹,在父文件夹的 setting.json 添加隐藏(排除) - "name": "汐洛版思源美化🤍/app/appearance 🗂️" + "name": "汐洛绞架美化🤍/app/appearance 🗂️", + "url": "https://github.com/Hi-Windom/Sillot/app/appearance" }, { "path": "../.vscode/extensions/Sillot", // 列出子文件夹,在父文件夹的 setting.json 添加隐藏(排除) - "name": "汐洛 VSC 扩展🤍/.vscode/extensions/Sillot 🗂️" + "name": "汐洛 VSC 扩展🤍/.vscode/extensions/Sillot 🗂️", + "url": "https://github.com/Hi-Windom/Sillot/.vscode/extensions/Sillot" }, { "path": "../docs/starlight", // 列出子文件夹,在父文件夹的 setting.json 添加隐藏(排除) - "name": "汐洛宝典🤍/docs/starlight 🗂️" + "name": "汐洛宝典🤍/docs/starlight 🗂️", + "url": "https://github.com/Hi-Windom/Sillot/docs/starlight" }, { "path": "../../Sillot-android", // 开发在 Android Studio 完成,这里列出只是方便 Git 管理 - "name": "汐洛安卓🤍../Sillot-android 🗂️" + "name": "汐洛安卓🤍../Sillot-android 🗂️", + "url": "https://github.com/Hi-Windom/Sillot-android" }, { "path": "../../sofillBuilder", // 沁棘开发仓库(暂未开源) diff --git a/.vscode/extensions/Sillot/package.json b/.vscode/extensions/Sillot/package.json index 99ab15e77a..a53afae26c 100644 --- a/.vscode/extensions/Sillot/package.json +++ b/.vscode/extensions/Sillot/package.json @@ -2,7 +2,7 @@ "name": "sillot", "displayName": "汐洛 Sillot", "description": "汐洛彖夲肜矩阵(Sillot T☳Converbenk Matrix)为智慧新彖务服务。此插件为汐洛官方插件,提供多功能一体化集成。", - "version": "0.35.2600", + "version": "0.35.2810", "preview": true, "repository": "https://github.com/Hi-Windom/Sillot", "publisher": "Hi-Windom", @@ -459,5 +459,5 @@ "fs-extra": "^11.2.0", "json5": "^2.2.3" }, - "packageManager": "pnpm@9.1.4" + "packageManager": "pnpm@9.2.0" } \ No newline at end of file diff --git "a/.vscode/extensions/Sillot/src/task/\350\277\220\350\241\214\345\267\245\344\275\234\345\214\272\350\204\232\346\234\254\346\226\207\344\273\266.ts" "b/.vscode/extensions/Sillot/src/task/\350\277\220\350\241\214\345\267\245\344\275\234\345\214\272\350\204\232\346\234\254\346\226\207\344\273\266.ts" index 748329c802..28f56056b8 100644 --- "a/.vscode/extensions/Sillot/src/task/\350\277\220\350\241\214\345\267\245\344\275\234\345\214\272\350\204\232\346\234\254\346\226\207\344\273\266.ts" +++ "b/.vscode/extensions/Sillot/src/task/\350\277\220\350\241\214\345\267\245\344\275\234\345\214\272\350\204\232\346\234\254\346\226\207\344\273\266.ts" @@ -5,7 +5,7 @@ import * as path from "path"; export function add_task_运行工作区脚本文件(context: vscode.ExtensionContext) { const disposable = vscode.commands.registerCommand("sillot.运行工作区脚本文件", async () => { let batFiles: vscode.Uri[] | undefined = undefined; - const limiter1 = 58; + const limiter1 = 31; const fileNameStartWith = "workspace-"; // 使用 withProgress 显示进度 vscode.window diff --git a/Dockerfile b/Dockerfile index f35d579ba0..a71f4aee55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ ENV GO111MODULE=on ENV CGO_ENABLED=1 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential && \ - cd kernel && go build --tags fts5 -v -ldflags "-s -w -X github.com/Hi-Windom/Sillot/kernel/util.Mode=prod" && \ + cd kernel && go build --tags fts5 -v -ldflags "-s -w" && \ mkdir /opt/Sillot/ && \ rm /Hi-Windom/Sillot/app/appearance/langs/zh_CHT.json && \ rm /Hi-Windom/Sillot/app/appearance/langs/fr_FR.json && \ diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 391d23befa..6836490fe1 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -731,7 +731,7 @@ "insertImgURL": "插入图片链接", "insertIframeURL": "插入 IFrame 链接", "context": "上下文", - "dockTip": "\n单击 展开/最小化\n右键 调整位置", + "dockTip": "\n单击 展开/最小化\n右键/拖拽 调整位置", "shadow": "投影", "hollow": "镂空", "attrValue1": "属性值留空则会自动删除该属性", @@ -860,7 +860,7 @@ "insertBefore": "光标所在块前插入空块", "insertAfter": "光标所在块后插入空块", "list1": "列表", - "insert": "插入元素", + "element": "元素", "closeTab": "关闭当前页签", "keymap": "快捷键", "clearFontStyle": "清除样式", diff --git a/app/appearance/themes/_lnco/.gitignore b/app/appearance/themes/_lnco/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/app/appearance/themes/_lnco/dark/theme.css b/app/appearance/themes/_lnco/dark/theme.css deleted file mode 100644 index 0ae144a882..0000000000 --- a/app/appearance/themes/_lnco/dark/theme.css +++ /dev/null @@ -1,164 +0,0 @@ -:root { - /* 主色 */ - --b3-theme-primary: #3573f0; - --b3-theme-primary-light: rgba(53, 115, 240, 0.72); - --b3-theme-primary-lighter: rgba(53, 115, 240, 0.48); - --b3-theme-primary-lightest: rgba(53, 115, 240, 0.24); - --b3-theme-secondary: #f3a92f; - --b3-theme-background: #1e1f22; - --b3-theme-background-light: #353637; - --b3-theme-surface: #2b2d30; - --b3-theme-surface-light: rgba(41, 42, 45, .86); - --b3-theme-surface-lighter: rgba(230, 230, 230, .06); - --b3-theme-error: #d23f31; - - /* 文字颜色 */ - --b3-theme-on-primary: #fff; - --b3-theme-on-secondary: #fff; - --b3-theme-on-background: #c9d1d9; - --b3-theme-on-surface: #9aa0a6; - --b3-theme-on-surface-light: rgba(154, 160, 166, .68); - --b3-theme-on-error: #fff; - - /* 字体 */ - --b3-font-family: "quote", "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; - --b3-font-family-code: "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; - --b3-font-family-graph: mononoki; - --b3-font-family-emoji: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"; - --b3-font-family-math: KaTeX_Math; - - /* 顶部工具栏 */ - --b3-toolbar-background: #2b2d30; - --b3-toolbar-blur-background: #373a41; - --b3-toolbar-color: #ced0d6; - --b3-toolbar-hover: #383a42; - - /* 线条 */ - --b3-border-color: #0e0f10; - - /* 滚动条 */ - --b3-scroll-color: rgba(230, 230, 230, .2); - - /* 列表 */ - --b3-list-hover: #3f4041; - --b3-list-icon-hover: rgba(201, 209, 217, .1); - - /* 菜单 */ - --b3-menu-background: #27282a; - - /* 提示 */ - --b3-tooltips-color: rgba(70, 72, 76, .86); - - /* 遮罩 */ - --b3-mask-background: rgba(0, 0, 0, 0.78); - - /* 卡片背景 */ - --b3-card-error-color: rgb(250, 179, 174); - --b3-card-error-background: #680d06; - --b3-card-warning-color: rgb(255, 213, 153); - --b3-card-warning-background: #5e3700; - --b3-card-info-color: rgb(166, 213, 250); - --b3-card-info-background: #053961; - --b3-card-success-color: rgb(183, 223, 185); - --b3-card-success-background: #1c401e; - - /* 自定义文字 */ - --b3-font-color1: var(--b3-card-error-color); - --b3-font-color2: var(--b3-card-warning-color); - --b3-font-color3: var(--b3-card-info-color); - --b3-font-color4: var(--b3-card-success-color); - --b3-font-color5: var(--b3-theme-on-surface); - --b3-font-color6: var(--b3-theme-primary); - --b3-font-color7: var(--b3-theme-secondary); - --b3-font-color8: var(--b3-theme-error); - --b3-font-color9: #f5539e; - --b3-font-color10: #bc67bc; - --b3-font-color11: #65b84d; - --b3-font-color12: #f5822e; - --b3-font-color13: var(--b3-theme-background); - --b3-font-background1: var(--b3-card-error-background); - --b3-font-background2: var(--b3-card-warning-background); - --b3-font-background3: var(--b3-card-info-background); - --b3-font-background4: var(--b3-card-success-background); - --b3-font-background5: #4c5257; - --b3-font-background6: #0c3d88; - --b3-font-background7: #593905; - --b3-font-background8: #541812; - --b3-font-background9: #6a0634; - --b3-font-background10: #6b2f6b; - --b3-font-background11: #376629; - --b3-font-background12: #803a06; - --b3-font-background13: var(--b3-theme-on-background); - - /* 动画效果 */ - --b3-transition: all .15s cubic-bezier(0, 0, .2, 1) 0ms; - --b3-width-transition: width .15s cubic-bezier(0, 0, .2, 1) 0ms; - - /* 阴影 */ - --b3-point-shadow: 0 3px 6px #010409; - --b3-dialog-shadow: 0 8px 24px #010409; - - /* 图表颜色 */ - --b3-graph-p-point: #076f7e; - --b3-graph-heading-point: #8957e5; - --b3-graph-math-point: #80FFA5; - --b3-graph-code-point: #00DDFF; - --b3-graph-table-point: #37A2FF; - --b3-graph-list-point: #FF0087; - --b3-graph-todo-point: #FFBF00; - --b3-graph-olist-point: #b3005f; - --b3-graph-listitem-point: #f65b00; - --b3-graph-bq-point: #8d48e3; - --b3-graph-super-point: #dd79ff; - --b3-graph-doc-point: #e8eaed; - --b3-graph-tag-point: #dbf32f; - --b3-graph-asset-point: #05c091; - --b3-graph-line: #9aa0a6; - --b3-graph-ref-line: #d23f31; - --b3-graph-tag-line: #5f6b06; - --b3-graph-tag-tag-line: #dbf32f; - --b3-graph-asset-line: #037457; - --b3-graph-hl-point: #f3a92f; - --b3-graph-hl-line: #4285f4; - - /* 编辑器搜索颜色 */ - --b3-protyle-search-background: #32593c; - --b3-protyle-search-border-color: #486a51; - --b3-protyle-search-current-background: #204282; - - /* 代码片段背景 */ - --b3-protyle-code-background: rgba(240, 246, 252, .15); - --b3-protyle-code-linenumber-hl: #26364a; - - /* 所见即所得行内元素颜色 */ - --b3-protyle-inline-strong-color: #e8eaed; - --b3-protyle-inline-em-color: #e8eaed; - --b3-protyle-inline-s-color: #e8eaed; - --b3-protyle-inline-link-color: #8ab4f8; - --b3-protyle-inline-mark-background: rgb(50, 89, 61); - --b3-protyle-inline-mark-color: #e8eaed; - --b3-protyle-inline-tag-color: #9aa0a6; - --b3-protyle-inline-blockref-color: #8957e5; - - /* PDF */ - --b3-pdf-selection: #779170; - --b3-pdf-sidebar-width: 200px; - --b3-pdf-offset: 0; - --b3-pdf-background1: var(--b3-theme-error); - --b3-pdf-background2: #f5822e; - --b3-pdf-background3: var(--b3-theme-secondary); - --b3-pdf-background4: #65b84d; - --b3-pdf-background5: #f5539e; - --b3-pdf-background6: var(--b3-theme-primary); - --b3-pdf-background7: #944194; - --b3-pdf-dark: #212224; -} - -/* https://github.com/siyuan-note/siyuan/issues/6440 */ -.protyle-action--order:after { - mix-blend-mode: screen; -} - -.b3-text-field::-webkit-calendar-picker-indicator { - filter: invert(1) -} diff --git a/app/appearance/themes/_lnco/light/theme.css b/app/appearance/themes/_lnco/light/theme.css deleted file mode 100644 index 88d8c72c45..0000000000 --- a/app/appearance/themes/_lnco/light/theme.css +++ /dev/null @@ -1,164 +0,0 @@ -:root { - /* 主色 */ - --b3-theme-primary: #3575f0; - --b3-theme-primary-light: rgba(53, 117, 240, 0.54); - --b3-theme-primary-lighter: rgba(53, 117, 240, 0.38); - --b3-theme-primary-lightest: rgba(53, 117, 240, 0.12); - --b3-theme-secondary: #f3a92f; - --b3-theme-background: #fff; - --b3-theme-background-light: #dfe0e1; - --b3-theme-surface: #f7f8fa; - --b3-theme-surface-light: rgba(243, 243, 243, .86); - --b3-theme-surface-lighter: rgba(0, 0, 0, .06); - --b3-theme-error: #d23f31; - - /* 文字颜色 */ - --b3-theme-on-primary: #fff; - --b3-theme-on-secondary: #fff; - --b3-theme-on-background: #202124; - --b3-theme-on-surface: #5f6368; - --b3-theme-on-surface-light: rgba(95, 99, 104, .68); - --b3-theme-on-error: #fff; - - /* 字体 */ - --b3-font-family: "quote", "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; - --b3-font-family-code: "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; - --b3-font-family-graph: mononoki; - --b3-font-family-emoji: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"; - --b3-font-family-math: KaTeX_Math; - - /* 顶部工具栏 */ - --b3-toolbar-background: #2b2d30; - --b3-toolbar-blur-background: #373a41; - --b3-toolbar-color: #9aa0a6; - --b3-toolbar-hover: #383a42; - - /* 线条 */ - --b3-border-color: rgba(0, 0, 0, .1); - - /* 滚动条 */ - --b3-scroll-color: rgba(0, 0, 0, .2); - - /* 列表 */ - --b3-list-hover: #e9eaea; - --b3-list-icon-hover: rgba(33, 34, 36, .1); - - /* 菜单 */ - --b3-menu-background: #f8f9fa; - - /* 提示 */ - --b3-tooltips-color: rgba(0, 0, 0, 0.54); - - /* 遮罩 */ - --b3-mask-background: rgba(0, 0, 0, 0.78); - - /* 卡片背景 */ - --b3-card-error-color: rgb(97, 26, 21); - --b3-card-error-background: #f5d1cf; - --b3-card-warning-color: rgb(102, 60, 0); - --b3-card-warning-background: #ffe8c8; - --b3-card-info-color: rgb(13, 60, 97); - --b3-card-info-background: #d6eaf9; - --b3-card-success-color: rgb(30, 70, 32); - --b3-card-success-background: #d7eed8; - - /* 自定义文字 */ - --b3-font-color1: var(--b3-card-error-color); - --b3-font-color2: var(--b3-card-warning-color); - --b3-font-color3: var(--b3-card-info-color); - --b3-font-color4: var(--b3-card-success-color); - --b3-font-color5: var(--b3-theme-on-surface); - --b3-font-color6: var(--b3-theme-primary); - --b3-font-color7: var(--b3-theme-secondary); - --b3-font-color8: var(--b3-theme-error); - --b3-font-color9: #f5539e; - --b3-font-color10: #944194; - --b3-font-color11: #65b84d; - --b3-font-color12: #f5822e; - --b3-font-color13: var(--b3-theme-background); - --b3-font-background1: var(--b3-card-error-background); - --b3-font-background2: var(--b3-card-warning-background); - --b3-font-background3: var(--b3-card-info-background); - --b3-font-background4: var(--b3-card-success-background); - --b3-font-background5: #e2e3e4; - --b3-font-background6: #acd0fc; - --b3-font-background7: #fdeed6; - --b3-font-background8: rgba(255, 193, 153, 0.5); - --b3-font-background9: #fdd5e7; - --b3-font-background10: #e6c7e6; - --b3-font-background11: #def0d9; - --b3-font-background12: rgba(253, 198, 200, 0.5); - --b3-font-background13: var(--b3-theme-on-background); - - /* 动画效果 */ - --b3-transition: all .15s cubic-bezier(0, 0, .2, 1) 0ms; - --b3-width-transition: width .15s cubic-bezier(0, 0, .2, 1) 0ms; - - /* 阴影 */ - --b3-point-shadow: 0 3px 6px rgba(140,149,159,0.15); - --b3-dialog-shadow: 0 8px 24px rgba(140,149,159,0.2); - - /* 图表颜色 */ - --b3-graph-p-point: #076f7e; - --b3-graph-heading-point: #8250df; - --b3-graph-math-point: #80FFA5; - --b3-graph-code-point: #00DDFF; - --b3-graph-table-point: #37A2FF; - --b3-graph-list-point: #FF0087; - --b3-graph-todo-point: #FFBF00; - --b3-graph-olist-point: #b3005f; - --b3-graph-listitem-point: #f65b00; - --b3-graph-bq-point: #8d48e3; - --b3-graph-super-point: #dd79ff; - --b3-graph-doc-point: #202124; - --b3-graph-tag-point: #dbf32f; - --b3-graph-asset-point: #05c091; - --b3-graph-line: #5f6368; - --b3-graph-ref-line: #d23f31; - --b3-graph-tag-line: #5f6b06; - --b3-graph-tag-tag-line: #dbf32f; - --b3-graph-asset-line: #037457; - --b3-graph-hl-point: #f3a92f; - --b3-graph-hl-line: #4285f4; - - /* 编辑器搜索颜色 */ - --b3-protyle-search-background: #ffe955; - --b3-protyle-search-border-color: #f2e680; - --b3-protyle-search-current-background: #a5d3fe; - - /* 代码片段背景 */ - --b3-protyle-code-background: rgba(27, 31, 35, .05); - --b3-protyle-code-linenumber-hl: #b9d1f4; - - /* 所见即所得行内元素颜色 */ - --b3-protyle-inline-strong-color: #202124; - --b3-protyle-inline-em-color: #202124; - --b3-protyle-inline-s-color: #202124; - --b3-protyle-inline-link-color: #4285f4; - --b3-protyle-inline-mark-background: rgb(252, 212, 126); - --b3-protyle-inline-mark-color: #202124; - --b3-protyle-inline-tag-color: #5f6368; - --b3-protyle-inline-blockref-color: #8250df; - - /* PDF */ - --b3-pdf-selection: #d0e9c8; - --b3-pdf-sidebar-width: 200px; - --b3-pdf-offset: 0; - --b3-pdf-background1: var(--b3-theme-error); - --b3-pdf-background2: #f5822e; - --b3-pdf-background3: var(--b3-theme-secondary); - --b3-pdf-background4: #65b84d; - --b3-pdf-background5: #f5539e; - --b3-pdf-background6: var(--b3-theme-primary); - --b3-pdf-background7: #944194; - --b3-pdf-dark: #212224; -} - -/* https://github.com/siyuan-note/siyuan/issues/6440 */ -.protyle-action--order:after { - mix-blend-mode: multiply; -} - -.b3-typography div.hljs, .protyle-wysiwyg div.hljs { - background-color: #f8f9fa; -} diff --git a/app/appearance/themes/_lnco/theme.json b/app/appearance/themes/_lnco/theme.json deleted file mode 100644 index d899d88913..0000000000 --- a/app/appearance/themes/_lnco/theme.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "lnco", - "author": "Soltus", - "url": "https://github.com/Soltus", - "version": "1.0.1", - "modes": [ - "light", - "dark" - ] -} diff --git a/app/appx/AppxManifest.xml b/app/appx/AppxManifest.xml index cfe1476518..f7337655e6 100644 --- a/app/appx/AppxManifest.xml +++ b/app/appx/AppxManifest.xml @@ -9,7 +9,7 @@ + Version="3.0.17.0"/> SiYuan 云南链滴科技有限公司 diff --git a/app/changelogs/v3.0.17/v3.0.17.md b/app/changelogs/v3.0.17/v3.0.17.md new file mode 100644 index 0000000000..151c2d1714 --- /dev/null +++ b/app/changelogs/v3.0.17/v3.0.17.md @@ -0,0 +1,55 @@ +## Overview + +This version supports Windows arm64 and Linux arm64, improves web clipping, fixes some defects, and improves many details. + +## Changelogs + +Below are the detailed changes in this version. + +### Enhancement + +* [Dock icon support drag](https://github.com/siyuan-note/siyuan/issues/10247) +* [Improve the handling of empty input of query criteria](https://github.com/siyuan-note/siyuan/issues/11254) +* [Add deb release package for Linux](https://github.com/siyuan-note/siyuan/issues/11532) +* [Display database superscript icon on mobile](https://github.com/siyuan-note/siyuan/issues/11549) +* [Disable `Ctrl+D` in read-only mode](https://github.com/siyuan-note/siyuan/issues/11558) +* [Improve HTML h clipping](https://github.com/siyuan-note/siyuan/issues/11560) +* [Improve HTML strong clipping](https://github.com/siyuan-note/siyuan/issues/11562) +* [Support Windows arm64](https://github.com/siyuan-note/siyuan/issues/11565) +* [Support Linux arm64](https://github.com/siyuan-note/siyuan/issues/11566) +* [Improve importing Markdown folder](https://github.com/siyuan-note/siyuan/issues/11567) +* [Improve pasting nearby some inline elements](https://github.com/siyuan-note/siyuan/issues/11572) +* [Improve rollback doc file history](https://github.com/siyuan-note/siyuan/issues/11575) +* [Improve `Enter` outdent after adjusting image size in the list](https://github.com/siyuan-note/siyuan/issues/11577) +* [Improve the block fold icon button in the backlink panel](https://github.com/siyuan-note/siyuan/issues/11578) +* [Add confirm dialog for `Restore Default Layout`](https://github.com/siyuan-note/siyuan/issues/11579) +* [Improve untitled doc placeholder](https://github.com/siyuan-note/siyuan/issues/11582) +* [The browser extension supports Wikipedia formula clipping](https://github.com/siyuan-note/siyuan/issues/11583) +* [The User Guide is no longer opened repeatedly when multiple windows exist](https://github.com/siyuan-note/siyuan/issues/11588) +* [Improve pasting in code block](https://github.com/siyuan-note/siyuan/issues/11589) +* [Improve `Expand Down/Up` keymaps on Windows](https://github.com/siyuan-note/siyuan/issues/11593) +* [Improve HTML img clipping](https://github.com/siyuan-note/siyuan/issues/11595) +* [Improve HTML math clipping](https://github.com/siyuan-note/siyuan/issues/11599) +* [Do not clip the `Edit` element next to Wikipedia headings](https://github.com/siyuan-note/siyuan/issues/11600) +* [Improve task list redo](https://github.com/siyuan-note/siyuan/issues/11605) +* [Add an internal kernel API `/api/av/appendAttributeViewDetachedBlocksWithValues`](https://github.com/siyuan-note/siyuan/issues/11608) +* [Static compile for Linux desktop kernel](https://github.com/siyuan-note/siyuan/issues/11620) +* [Improve database handling when importing .sy.zip](https://github.com/siyuan-note/siyuan/issues/11628) +* [Improve table parsing](https://github.com/siyuan-note/siyuan/issues/11630) + +### Bugfix + +* [The exception occurs in the Settings - About on the Microsoft Store edition](https://github.com/siyuan-note/siyuan/issues/11580) +* [The request of PWA files without `Authentication` Header](https://github.com/siyuan-note/siyuan/pull/11586) +* [The primary key sorting of the database panel fails in some cases](https://github.com/siyuan-note/siyuan/issues/11621) +* [`Optimize typography` causes HTML blocks in the list to become invalid](https://github.com/siyuan-note/siyuan/issues/11623) +* [Database entries cannot be reordered in some cases](https://github.com/siyuan-note/siyuan/issues/11627) + +### Document + +* [Add Japanese user guide](https://github.com/siyuan-note/siyuan/pull/11591) + +## Download + +* [B3log](https://b3log.org/siyuan/en/download.html) +* [GitHub](https://github.com/siyuan-note/siyuan/releases) diff --git a/app/changelogs/v3.0.17/v3.0.17_zh_CHT.md b/app/changelogs/v3.0.17/v3.0.17_zh_CHT.md new file mode 100644 index 0000000000..faa5ec90e4 --- /dev/null +++ b/app/changelogs/v3.0.17/v3.0.17_zh_CHT.md @@ -0,0 +1,55 @@ +## 概述 + +此版本支援了 Windows arm64 和 Linux arm64,改進了網頁剪藏,修復了一些缺陷並改進了許多細節。 + +## 變更記錄 + +以下是此版本中的詳細變更。 + +### 改進功能 + +* [支援拖曳停靠列圖示](https://github.com/siyuan-note/siyuan/issues/10247) +* [改進查詢條件空輸入的處理](https://github.com/siyuan-note/siyuan/issues/11254) +* [為 Linux 新增 deb 發布套件](https://github.com/siyuan-note/siyuan/issues/11532) +* [在行動裝置上顯示資料庫角標](https://github.com/siyuan-note/siyuan/issues/11549) +* [在唯讀模式下停用 `Ctrl+D`](https://github.com/siyuan-note/siyuan/issues/11558) +* [改進 HTML h 剪藏](https://github.com/siyuan-note/siyuan/issues/11560) +* [改進 HTML strong 剪藏](https://github.com/siyuan-note/siyuan/issues/11562) +* [支援 Windows arm64](https://github.com/siyuan-note/siyuan/issues/11565) +* [支援 Linux arm64](https://github.com/siyuan-note/siyuan/issues/11566) +* [改進導入 Markdown 資料夾](https://github.com/siyuan-note/siyuan/issues/11567) +* [改進在一些行級元素附近貼上](https://github.com/siyuan-note/siyuan/issues/11572) +* [改進文件檔案歷史的回溯](https://github.com/siyuan-note/siyuan/issues/11575) +* [在清單中調整影像大小後改進 `Enter` 縮排](https://github.com/siyuan-note/siyuan/issues/11577) +* [改進反向連結面板中的塊折疊圖示按鈕](https://github.com/siyuan-note/siyuan/issues/11578) +* [為 `恢復預設版面配置` 新增確認對話方塊](https://github.com/siyuan-note/siyuan/issues/11579) +* [改進未命名文件佔位符](https://github.com/siyuan-note/siyuan/issues/11582) +* [瀏覽器擴充支援維基百科公式剪藏](https://github.com/siyuan-note/siyuan/issues/11583) +* [當存在多個視窗時不再重複開啟使用者指南](https://github.com/siyuan-note/siyuan/issues/11588) +* [改進程式碼區塊中的貼上](https://github.com/siyuan-note/siyuan/issues/11589) +* [在 Windows 上改進 `向下/向上展開` 快捷鍵](https://github.com/siyuan-note/siyuan/issues/11593) +* [改良 HTML img 剪藏](https://github.com/siyuan-note/siyuan/issues/11595) +* [改進 HTML 公式剪藏](https://github.com/siyuan-note/siyuan/issues/11599) +* [不剪下維基百科標題旁的 `編輯` 元素](https://github.com/siyuan-note/siyuan/issues/11600) +* [改進任務清單重做](https://github.com/siyuan-note/siyuan/issues/11605) +* [新增內部核心 API `/api/av/appendAttributeViewDetachedBlocksWithValues`](https://github.com/siyuan-note/siyuan/issues/11608) +* [為 Linux 桌面端核心進行靜態編譯](https://github.com/siyuan-note/siyuan/issues/11620) +* [在匯入 .sy.zip 時改進資料庫處理](https://github.com/siyuan-note/siyuan/issues/11628) +* [改進表格解析](https://github.com/siyuan-note/siyuan/issues/11630) + +### 修復缺陷 + +* [微軟商店版版本的設定 - 關於異常](https://github.com/siyuan-note/siyuan/issues/11580) +* [PWA 檔案的請求沒有 `Authentication` 標頭](https://github.com/siyuan-note/siyuan/pull/11586) +* [資料庫面板的主鍵排序在某些情況下失敗](https://github.com/siyuan-note/siyuan/issues/11621) +* [`優化排版` 導致清單中的 HTML 區塊失效](https://github.com/siyuan-note/siyuan/issues/11623) +* [在某些情況下無法重新排序資料庫條目](https://github.com/siyuan-note/siyuan/issues/11627) + +### 改進文檔 + +* [新增日文使用者指南](https://github.com/siyuan-note/siyuan/pull/11591) + +## 下載 + +* [B3log](https://b3log.org/siyuan/download.html) +* [GitHub](https://github.com/siyuan-note/siyuan/releases) diff --git a/app/changelogs/v3.0.17/v3.0.17_zh_CN.md b/app/changelogs/v3.0.17/v3.0.17_zh_CN.md new file mode 100644 index 0000000000..cfb9c5641d --- /dev/null +++ b/app/changelogs/v3.0.17/v3.0.17_zh_CN.md @@ -0,0 +1,55 @@ +## 概述 + +该版本支持了 Windows arm64 和 Linux arm64,改进了网页剪藏,修复了一些缺陷并改进了许多细节。 + +## 变更记录 + +以下是此版本中的详细变更。 + +### 改进功能 + +* [支持拖动停靠栏图标](https://github.com/siyuan-note/siyuan/issues/10247) +* [改进查询条件空输入的处理](https://github.com/siyuan-note/siyuan/issues/11254) +* [为 Linux 添加 deb 发布包](https://github.com/siyuan-note/siyuan/issues/11532) +* [在移动设备上显示数据库角标](https://github.com/siyuan-note/siyuan/issues/11549) +* [在只读模式下禁用 `Ctrl+D`](https://github.com/siyuan-note/siyuan/issues/11558) +* [改进 HTML h 剪藏](https://github.com/siyuan-note/siyuan/issues/11560) +* [改进 HTML strong 剪藏](https://github.com/siyuan-note/siyuan/issues/11562) +* [支持 Windows arm64](https://github.com/siyuan-note/siyuan/issues/11565) +* [支持 Linux arm64](https://github.com/siyuan-note/siyuan/issues/11566) +* [改进导入 Markdown 文件夹](https://github.com/siyuan-note/siyuan/issues/11567) +* [改进在一些行级元素附近粘贴](https://github.com/siyuan-note/siyuan/issues/11572) +* [改进文档文件历史的回滚](https://github.com/siyuan-note/siyuan/issues/11575) +* [在列表中调整图像大小后改进 `Enter` 缩进](https://github.com/siyuan-note/siyuan/issues/11577) +* [改进反向链接面板中的块折叠图标按钮](https://github.com/siyuan-note/siyuan/issues/11578) +* [为 `恢复默认布局` 添加确认对话框](https://github.com/siyuan-note/siyuan/issues/11579) +* [改进未命名文档占位符](https://github.com/siyuan-note/siyuan/issues/11582) +* [浏览器扩展支持维基百科公式剪藏](https://github.com/siyuan-note/siyuan/issues/11583) +* [当存在多个窗口时不再重复打开用户指南](https://github.com/siyuan-note/siyuan/issues/11588) +* [改进代码块中的粘贴](https://github.com/siyuan-note/siyuan/issues/11589) +* [在 Windows 上改进 `向下/向上展开` 快捷键](https://github.com/siyuan-note/siyuan/issues/11593) +* [改进 HTML img 剪藏](https://github.com/siyuan-note/siyuan/issues/11595) +* [改进 HTML 公式剪藏](https://github.com/siyuan-note/siyuan/issues/11599) +* [不剪藏维基百科标题旁边的 `编辑` 元素](https://github.com/siyuan-note/siyuan/issues/11600) +* [改进任务列表重做](https://github.com/siyuan-note/siyuan/issues/11605) +* [添加内部内核 API `/api/av/appendAttributeViewDetachedBlocksWithValues`](https://github.com/siyuan-note/siyuan/issues/11608) +* [为 Linux 桌面端内核进行静态编译](https://github.com/siyuan-note/siyuan/issues/11620) +* [在导入 .sy.zip 时改进数据库处理](https://github.com/siyuan-note/siyuan/issues/11628) +* [改进表格解析](https://github.com/siyuan-note/siyuan/issues/11630) + +### 修复缺陷 + +* [微软商店版版本的设置 - 关于异常](https://github.com/siyuan-note/siyuan/issues/11580) +* [PWA 文件的请求没有 `Authentication` 标头](https://github.com/siyuan-note/siyuan/pull/11586) +* [数据库面板的主键排序在某些情况下失败](https://github.com/siyuan-note/siyuan/issues/11621) +* [`优化排版` 导致列表中的 HTML 块失效](https://github.com/siyuan-note/siyuan/issues/11623) +* [在某些情况下无法重新排序数据库条目](https://github.com/siyuan-note/siyuan/issues/11627) + +### 改进文档 + +* [添加日语用户指南](https://github.com/siyuan-note/siyuan/pull/11591) + +## 下载 + +* [B3log](https://b3log.org/siyuan/download.html) +* [GitHub](https://github.com/siyuan-note/siyuan/releases) diff --git a/app/electron-builder-arm64.yml b/app/electron-builder-arm64.yml index 1eeb734954..af50f29e31 100644 --- a/app/electron-builder-arm64.yml +++ b/app/electron-builder-arm64.yml @@ -68,11 +68,9 @@ extraResources: - from: "appearance/themes/daylight" to: "appearance/themes/daylight" filter: "!**/{.DS_Store,custom.css}" - - from: "appearance/themes/_lnco" + - from: "appearance/themes/lnco" to: "appearance/themes/lnco" filter: "!**/{.DS_Store,custom.css}" - from: "src/assets/fonts" to: "appearance/fonts" filter: "!**/{.DS_Store}" - - from: "pandoc/pandoc-windows-amd64.zip" - to: "pandoc.zip" diff --git a/app/electron-builder-darwin-arm64.yml b/app/electron-builder-darwin-arm64.yml index a45e04afbc..68ecd4cfc5 100644 --- a/app/electron-builder-darwin-arm64.yml +++ b/app/electron-builder-darwin-arm64.yml @@ -1,67 +1,67 @@ -productName: "Sillot" -appId: "sc.windom.sillot" -asar: false -compression: "normal" -copyright: "© 2024 Hi-Windom" -artifactName: "Sillot-${version}-${os}-arm64.${ext}" -extraMetadata: - main: "electron/main.js" -directories: - output: "build" -files: - - "electron" - -mac: - identity: "Yunnan Liandi Technology Co., Ltd." - provisioningProfile: "../../SiYuan.provisionprofile" - icon: "src/assets/icon.icns" - gatekeeperAssess: false - hardenedRuntime: true - entitlements: "../../entitlements.mas.plist" - extendInfo: - - NSMicrophoneUsageDescription: "This app requires microphone access to record audio." - entitlementsInherit: "../../entitlements.mas.plist" - minimumSystemVersion: "10.15" - extraResources: - - from: "kernel-darwin-arm64" - to: "kernel" - target: - - target: "dmg" - arch: "arm64" - -extraResources: - - from: "changelogs" - to: "changelogs" - - from: "stage" - to: "stage" - - from: "guide" - to: "guide" - filter: "!**/{.DS_Store,.git,.gitignore,.idea,20211226090932-5lcq56f}" - - from: "appearance/boot" - to: "appearance/boot" - filter: "!**/{.DS_Store}" - - from: "appearance/icons" - to: "appearance/icons" - filter: "!**/{.DS_Store}" - - from: "appearance/langs" - to: "appearance/langs" - filter: "!**/{.DS_Store,zh_CHT.json,fr_FR.json,es_ES.json}" - - from: "appearance/emojis" - to: "appearance/emojis" - filter: "!**/{.DS_Store}" - - from: "appearance/themes/midnight" - to: "appearance/themes/midnight" - filter: "!**/{.DS_Store,custom.css}" - - from: "appearance/themes/daylight" - to: "appearance/themes/daylight" - filter: "!**/{.DS_Store,custom.css}" - - from: "src/assets/fonts" - to: "appearance/fonts" - filter: "!**/{.DS_Store}" - - from: "appearance/themes/_lnco" - to: "appearance/themes/lnco" - filter: "!**/{.DS_Store,custom.css}" - - from: "pandoc/pandoc-darwin-amd64.zip" - to: "pandoc.zip" - - from: "apps/deno/deno-aarch64-apple-darwin.zip" - to: "deno.zip" +productName: "Sillot" +appId: "sc.windom.sillot" +asar: false +compression: "normal" +copyright: "© 2024 Hi-Windom" +artifactName: "Sillot-${version}-${os}-arm64.${ext}" +extraMetadata: + main: "electron/main.js" +directories: + output: "build" +files: + - "electron" + +mac: + identity: "Yunnan Liandi Technology Co., Ltd." + provisioningProfile: "../../SiYuan.provisionprofile" + icon: "src/assets/icon.icns" + gatekeeperAssess: false + hardenedRuntime: true + entitlements: "../../entitlements.mas.plist" + extendInfo: + - NSMicrophoneUsageDescription: "This app requires microphone access to record audio." + entitlementsInherit: "../../entitlements.mas.plist" + minimumSystemVersion: "10.15" + extraResources: + - from: "kernel-darwin-arm64" + to: "kernel" + target: + - target: "dmg" + arch: "arm64" + +extraResources: + - from: "changelogs" + to: "changelogs" + - from: "stage" + to: "stage" + - from: "guide" + to: "guide" + filter: "!**/{.DS_Store,.git,.gitignore,.idea,20211226090932-5lcq56f}" + - from: "appearance/boot" + to: "appearance/boot" + filter: "!**/{.DS_Store}" + - from: "appearance/icons" + to: "appearance/icons" + filter: "!**/{.DS_Store}" + - from: "appearance/langs" + to: "appearance/langs" + filter: "!**/{.DS_Store,zh_CHT.json,fr_FR.json,es_ES.json}" + - from: "appearance/emojis" + to: "appearance/emojis" + filter: "!**/{.DS_Store}" + - from: "appearance/themes/midnight" + to: "appearance/themes/midnight" + filter: "!**/{.DS_Store,custom.css}" + - from: "appearance/themes/daylight" + to: "appearance/themes/daylight" + filter: "!**/{.DS_Store,custom.css}" + - from: "src/assets/fonts" + to: "appearance/fonts" + filter: "!**/{.DS_Store}" + - from: "appearance/themes/lnco" + to: "appearance/themes/lnco" + filter: "!**/{.DS_Store,custom.css}" + - from: "pandoc/pandoc-darwin-amd64.zip" + to: "pandoc.zip" + - from: "apps/deno/deno-aarch64-apple-darwin.zip" + to: "deno.zip" diff --git a/app/electron-builder-darwin.yml b/app/electron-builder-darwin.yml index 908c304f21..92f3164534 100644 --- a/app/electron-builder-darwin.yml +++ b/app/electron-builder-darwin.yml @@ -1,67 +1,67 @@ -productName: "Sillot" -appId: "sc.windom.sillot" -asar: false -compression: "normal" -copyright: "© 2024 Hi-Windom" -artifactName: "Sillot-${version}-${os}.${ext}" -extraMetadata: - main: "electron/main.js" -directories: - output: "build" -files: - - "electron" - -mac: - identity: "Yunnan Liandi Technology Co., Ltd." - provisioningProfile: "../../SiYuan.provisionprofile" - icon: "src/assets/icon.icns" - gatekeeperAssess: false - hardenedRuntime: true - entitlements: "../../entitlements.mas.plist" - extendInfo: - - NSMicrophoneUsageDescription: "This app requires microphone access to record audio." - entitlementsInherit: "../../entitlements.mas.plist" - minimumSystemVersion: "10.15" - extraResources: - - from: "kernel-darwin" - to: "kernel" - target: - - target: "dmg" - arch: "x64" - -extraResources: - - from: "changelogs" - to: "changelogs" - - from: "stage" - to: "stage" - - from: "guide" - to: "guide" - filter: "!**/{.DS_Store,.git,.gitignore,.idea,20211226090932-5lcq56f}" - - from: "appearance/boot" - to: "appearance/boot" - filter: "!**/{.DS_Store}" - - from: "appearance/icons" - to: "appearance/icons" - filter: "!**/{.DS_Store}" - - from: "appearance/langs" - to: "appearance/langs" - filter: "!**/{.DS_Store,zh_CHT.json,fr_FR.json,es_ES.json}" - - from: "appearance/emojis" - to: "appearance/emojis" - filter: "!**/{.DS_Store}" - - from: "appearance/themes/midnight" - to: "appearance/themes/midnight" - filter: "!**/{.DS_Store,custom.css}" - - from: "appearance/themes/daylight" - to: "appearance/themes/daylight" - filter: "!**/{.DS_Store,custom.css}" - - from: "src/assets/fonts" - to: "appearance/fonts" - filter: "!**/{.DS_Store}" - - from: "appearance/themes/_lnco" - to: "appearance/themes/lnco" - filter: "!**/{.DS_Store,custom.css}" - - from: "pandoc/pandoc-darwin-amd64.zip" - to: "pandoc.zip" - - from: "apps/deno/deno-x86_64-apple-darwin.zip" - to: "deno.zip" +productName: "Sillot" +appId: "sc.windom.sillot" +asar: false +compression: "normal" +copyright: "© 2024 Hi-Windom" +artifactName: "Sillot-${version}-${os}.${ext}" +extraMetadata: + main: "electron/main.js" +directories: + output: "build" +files: + - "electron" + +mac: + identity: "Yunnan Liandi Technology Co., Ltd." + provisioningProfile: "../../SiYuan.provisionprofile" + icon: "src/assets/icon.icns" + gatekeeperAssess: false + hardenedRuntime: true + entitlements: "../../entitlements.mas.plist" + extendInfo: + - NSMicrophoneUsageDescription: "This app requires microphone access to record audio." + entitlementsInherit: "../../entitlements.mas.plist" + minimumSystemVersion: "10.15" + extraResources: + - from: "kernel-darwin" + to: "kernel" + target: + - target: "dmg" + arch: "x64" + +extraResources: + - from: "changelogs" + to: "changelogs" + - from: "stage" + to: "stage" + - from: "guide" + to: "guide" + filter: "!**/{.DS_Store,.git,.gitignore,.idea,20211226090932-5lcq56f}" + - from: "appearance/boot" + to: "appearance/boot" + filter: "!**/{.DS_Store}" + - from: "appearance/icons" + to: "appearance/icons" + filter: "!**/{.DS_Store}" + - from: "appearance/langs" + to: "appearance/langs" + filter: "!**/{.DS_Store,zh_CHT.json,fr_FR.json,es_ES.json}" + - from: "appearance/emojis" + to: "appearance/emojis" + filter: "!**/{.DS_Store}" + - from: "appearance/themes/midnight" + to: "appearance/themes/midnight" + filter: "!**/{.DS_Store,custom.css}" + - from: "appearance/themes/daylight" + to: "appearance/themes/daylight" + filter: "!**/{.DS_Store,custom.css}" + - from: "src/assets/fonts" + to: "appearance/fonts" + filter: "!**/{.DS_Store}" + - from: "appearance/themes/lnco" + to: "appearance/themes/lnco" + filter: "!**/{.DS_Store,custom.css}" + - from: "pandoc/pandoc-darwin-amd64.zip" + to: "pandoc.zip" + - from: "apps/deno/deno-x86_64-apple-darwin.zip" + to: "deno.zip" diff --git a/app/electron-builder-linux-arm64.yml b/app/electron-builder-linux-arm64.yml index 3478b5a2cf..666c5a98bb 100644 --- a/app/electron-builder-linux-arm64.yml +++ b/app/electron-builder-linux-arm64.yml @@ -61,11 +61,9 @@ extraResources: - from: "appearance/themes/daylight" to: "appearance/themes/daylight" filter: "!**/{.DS_Store,custom.css}" - - from: "appearance/themes/_lnco" + - from: "appearance/themes/lnco" to: "appearance/themes/lnco" filter: "!**/{.DS_Store,custom.css}" - from: "src/assets/fonts" to: "appearance/fonts" filter: "!**/{.DS_Store}" - - from: "pandoc/pandoc-linux-amd64.zip" - to: "pandoc.zip" diff --git a/app/electron-builder-linux.yml b/app/electron-builder-linux.yml index 6a67c3370c..6f80c2cdbf 100644 --- a/app/electron-builder-linux.yml +++ b/app/electron-builder-linux.yml @@ -61,7 +61,7 @@ extraResources: - from: "src/assets/fonts" to: "appearance/fonts" filter: "!**/{.DS_Store}" - - from: "appearance/themes/_lnco" + - from: "appearance/themes/lnco" to: "appearance/themes/lnco" filter: "!**/{.DS_Store,custom.css}" - from: "pandoc/pandoc-linux-amd64.zip" diff --git a/app/electron-builder.yml b/app/electron-builder.yml index e0af630ced..2c560f8f6b 100644 --- a/app/electron-builder.yml +++ b/app/electron-builder.yml @@ -41,6 +41,7 @@ nsis: installerSidebar: "nsis/installerSidebar.bmp" uninstallerSidebar: "nsis/uninstallerSidebar.bmp" +# 考虑安卓端,尽量避免 from: "appearance/themes/_lnco" to: "appearance/themes/lnco" 这种重命名的情况,保持一致性 extraResources: - from: "changelogs" to: "changelogs" @@ -67,7 +68,7 @@ extraResources: - from: "appearance/themes/daylight" to: "appearance/themes/daylight" filter: "!**/{.DS_Store,custom.css}" - - from: "appearance/themes/_lnco" + - from: "appearance/themes/lnco" to: "appearance/themes/lnco" filter: "!**/{.DS_Store,custom.css}" - from: "src/assets/fonts" diff --git a/app/package.json b/app/package.json index e49c2c6991..648701342d 100644 --- a/app/package.json +++ b/app/package.json @@ -1,8 +1,8 @@ { "name": "sillot", - "version": "0.35.2600", - "syv": "3.0.17", - "sypv": "[3.0.16]", + "version": "0.35.2810", + "syv": "3.1.0", + "sypv": "[3.0.16, 3.0.17]", "description": "Build Your Eternal Digital Garden", "homepage": "https://sillot.db.sc.cn", "repository": "https://github.com/Hi-Windom/Sillot", @@ -11,7 +11,7 @@ "node": ">=20.11.1", "pnpm": ">=9.1.0" }, - "packageManager": "pnpm@9.1.4", + "packageManager": "pnpm@9.2.0", "actionInstallCommand": "pnpm install --no-frozen-lockfile", "scripts": { "test": "echo 'Test your sister day by day'", diff --git a/app/scripts/genTPLData.js b/app/scripts/genTPLData.js index ba92093f19..f55f5a3569 100644 --- a/app/scripts/genTPLData.js +++ b/app/scripts/genTPLData.js @@ -60,7 +60,7 @@ const SiYuan = { - + diff --git a/app/src/SConst.ts b/app/src/SConst.ts index be7c28a353..afe1045408 100644 --- a/app/src/SConst.ts +++ b/app/src/SConst.ts @@ -1,16 +1,16 @@ -// biome-ignore lint/complexity/noStaticOnlyClass: -export abstract class SConst { - public static readonly Themes = { - BuiltinThemeLight: "daylight", // 思源默认主题 - BuiltinThemeDark: "midnight", // 思源默认主题 - DefaultThemeLight: "lnco", - DefaultThemeDark: "lnco", - }; - - // 渲染进程调主进程 - // Sillot extend - public static readonly SILLOT_SHOW: string = "sillot-show"; - public static readonly SISI_SHOW: string = "sisi-show"; - public static readonly SILLOT_OPENURL: string = "sillot-openurl"; - public static readonly SISI_OPENURL: string = "sisi-openurl"; -} +// biome-ignore lint/complexity/noStaticOnlyClass: +export abstract class SConst { + public static readonly Themes = { + DefaultThemeLight: "daylight", // 思源默认主题 + DefaultThemeDark: "midnight", // 思源默认主题 + BuiltinThemeLight: "lnco", + BuiltinThemeDark: "lnco", + }; + + // 渲染进程调主进程 + // Sillot extend + public static readonly SILLOT_SHOW: string = "sillot-show"; + public static readonly SISI_SHOW: string = "sisi-show"; + public static readonly SILLOT_OPENURL: string = "sillot-openurl"; + public static readonly SISI_OPENURL: string = "sisi-openurl"; +} diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss index b81f2a1db7..8d3501f0f9 100644 --- a/app/src/assets/scss/business/_av.scss +++ b/app/src/assets/scss/business/_av.scss @@ -87,7 +87,7 @@ font-weight: bold; &:empty::after { - color: var(--b3-theme-on-surface); + color: var(--b3-theme-on-surface-light); content: attr(data-tip); } } diff --git a/app/src/assets/scss/component/_typography.scss b/app/src/assets/scss/component/_typography.scss index c4a9e04d34..a33d908787 100644 --- a/app/src/assets/scss/component/_typography.scss +++ b/app/src/assets/scss/component/_typography.scss @@ -255,7 +255,7 @@ display: inline-block !important; position: absolute !important; width: 1px !important; - right: 7px !important; + right: 8px !important; outline: 0 !important; background: 0 0 !important; text-decoration: initial !important; diff --git a/app/src/assets/template/mobile/index.tpl b/app/src/assets/template/mobile/index.tpl index 336cb3ce26..67a0b09d6a 100644 --- a/app/src/assets/template/mobile/index.tpl +++ b/app/src/assets/template/mobile/index.tpl @@ -21,7 +21,7 @@ - + diff --git a/app/src/boot/globalEvent/click.ts b/app/src/boot/globalEvent/click.ts index 62f2f89f58..4a45603668 100644 --- a/app/src/boot/globalEvent/click.ts +++ b/app/src/boot/globalEvent/click.ts @@ -16,28 +16,8 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => { if (ghostElement.dataset.ghostType === "dock") { ghostElement.parentElement.querySelectorAll(".dock__item").forEach((item: HTMLElement) => { item.style.opacity = ""; - item.classList.add("b3-tooltips"); }); - const original = JSON.parse(ghostElement.getAttribute("data-original")); - let dock - if (original.position === "Left") { - dock = window.siyuan.layout.leftDock; - } else if (original.position === "Right") { - dock = window.siyuan.layout.rightDock; - } else if (original.position === "Bottom") { - dock = window.siyuan.layout.bottomDock; - } - const previousElement = dock.element.querySelector(`.dock__item[data-type="${original.previousType}"]`) - const dockElement = dock.element.querySelector(`.dock__item[data-type="${original.type}"]`) - if (previousElement) { - previousElement.after(dockElement) - } else { - if (original.index === "0") { - dock.element.firstElementChild.prepend(dockElement) - } else { - dock.element.lastElementChild.previousElementSibling.prepend(dockElement) - } - } + document.querySelector("#dockMoveItem")?.remove(); } else { const startElement = ghostElement.parentElement.querySelector(`[data-node-id="${ghostElement.getAttribute("data-node-id")}"]`) as HTMLElement; // biome-ignore lint/suspicious/noAssignInExpressions: diff --git a/app/src/config/about.ts b/app/src/config/about.ts index 988a9ce949..92ee19e2f2 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -327,9 +327,9 @@ ${ isAppMode() ? ` networkServeElement.addEventListener("change", () => { fetchPost("/api/system/setNetworkServe", {networkServe: networkServeElement.checked}, () => { if (window.JSAndroid && networkServeElement.checked) { // 安卓平板 - window.JSAndroid?.requestPermissionActivity("Battery","注意:后台稳定伺服会消耗额外电量","coldRestart"); + window.JSAndroid?.requestPermissionActivity("Battery","注意:后台稳定伺服会消耗额外电量", "androidReboot"); } else if (window.JSAndroid) { - window.Sillot?.androidRestartSiYuan(); + window.JSAndroid?.androidReboot(); } else { exportLayout({ errorExit: true, diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts index 0296bfec53..0c4f08b9ac 100644 --- a/app/src/config/keymap.ts +++ b/app/src/config/keymap.ts @@ -159,7 +159,7 @@ export const keymap = { - ${window.siyuan.languages.insert} + ${window.siyuan.languages.element}
${keymap._genItem(window.siyuan.config.keymap.editor.insert, "editor" + Constants.ZWSP + "insert")}
diff --git a/app/src/constants.ts b/app/src/constants.ts index 5ef4f92855..c47c0f7897 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -436,6 +436,8 @@ export abstract class Constants extends SConst { // Sillot extend "inline-code": {default: "⌘G", custom: "⌘G"}, link: {default: "⌘K", custom: "⌘K"}, check: {default: "⌘L", custom: "⌘L"}, + "ordered-list": {default: "", custom: ""}, + list: {default: "", custom: ""}, table: {default: "⌘O", custom: "⌘O"}, code: {default: "⇧⌘K", custom: "⇧⌘K"}, clearInline: {default: "⌘\\", custom: "⌘\\"}, diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index 9bb7b2d3b3..2c9aa09e29 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -163,10 +163,6 @@ export const kernelError = () => { if (document.querySelector("#errorLog")) { return; } - if (window.JSAndroid) { - window.JSAndroid.androidReboot(); - return; - } let iosReStart = ""; if (isInIOS()) { iosReStart = `
`; diff --git a/app/src/index.ts b/app/src/index.ts index e5e40c66df..5346b6ff67 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -1,221 +1,211 @@ -import { Constants } from "./constants"; -import { Menus } from "./menus"; -import { Model } from "./layout/Model"; -import { onGetConfig } from "./boot/onGetConfig"; -import { initBlockPopover } from "./block/popover"; -import { account } from "./config/account"; -import { addScript, addScriptSync } from "./protyle/util/addScript"; -import { genUUID } from "./util/genID"; -import { fetchGet, fetchPost } from "./util/fetch"; -import { addBaseURL, getIdFromSYProtocol, isSYProtocol, setNoteBook } from "./util/pathName"; -import {registerServiceWorker} from "./util/serviceWorker"; -import { openFileById } from "./editor/util"; -import { - bootSync, - downloadProgress, - processSync, - progressBackgroundTask, - progressLoading, - progressStatus, - reloadSync, - setTitle, - transactionError -} from "./dialog/processSystem"; -import { initMessage } from "./dialog/message"; -import { getAllTabs } from "./layout/getAll"; -import { getLocalStorage } from "./protyle/util/compatibility"; -import { exportIDB, importIDB } from "./sillot/util/sillot-idb-backup-and-restore"; -import { SillotEnv } from "./sillot"; -import {getSearch} from "./util/functions"; -import {hideAllElements} from "./protyle/ui/hideElements"; -import {loadPlugins, reloadPlugin} from "./plugin/loader"; -import "./assets/scss/base.scss"; - -export class App { - public plugins: import("./plugin").Plugin[] = []; - public appId: string; - - constructor() { - /// #if BROWSER - registerServiceWorker(`${Constants.SERVICE_WORKER_PATH}?v=${Constants.SIYUAN_VERSION}`); - /// #endif - addBaseURL(); - - this.appId = Constants.SIYUAN_APPID; - window.siyuan = { - zIndex: 10, - transactions: [], - reqIds: {}, - backStack: [], - layout: {}, - dialogs: [], - blockPanels: [], - ctrlIsPressed: false, - altIsPressed: false, - ws: new Model({ - app: this, - id: genUUID(), - type: "main", - msgCallback: (data) => { - this.plugins.forEach((plugin) => { - plugin.eventBus.emit("ws-main", data); - }); - if (data) { - switch (data.cmd) { - case "reloadPlugin": - reloadPlugin(this, data.data); - break; - case "syncMergeResult": - reloadSync(this, data.data); - break; - case "reloaddoc": - reloadSync(this, {upsertRootIDs: [data.data], removeRootIDs: []}, false); - break; - case "readonly": - window.siyuan.config.editor.readOnly = data.data; - hideAllElements(["util"]); - break; - case "setConf": - window.siyuan.config = data.data; - break; - case "progress": - progressLoading(data); - break; - case "setLocalStorageVal": - window.siyuan.storage[data.data.key] = data.data.val; - break; - case "rename": - getAllTabs().forEach((tab) => { - if (tab.headElement) { - const initTab = tab.headElement.getAttribute("data-initdata"); - if (initTab) { - const initTabData = JSON.parse(initTab); - if (initTabData.instance === "Editor" && initTabData.rootId === data.data.id) { - tab.updateTitle(data.data.title); - } - } - } - }); - break; - case "unmount": - getAllTabs().forEach((tab) => { - if (tab.headElement) { - const initTab = tab.headElement.getAttribute("data-initdata"); - if (initTab) { - const initTabData = JSON.parse(initTab); - if (initTabData.instance === "Editor" && data.data.box === initTabData.notebookId) { - tab.parent.removeTab(tab.id); - } - } - } - }); - break; - case "removeDoc": - getAllTabs().forEach((tab) => { - if (tab.headElement) { - const initTab = tab.headElement.getAttribute("data-initdata"); - if (initTab) { - const initTabData = JSON.parse(initTab); - if (initTabData.instance === "Editor" && data.data.ids.includes(initTabData.rootId)) { - tab.parent.removeTab(tab.id); - } - } - } - }); - break; - case "statusbar": - progressStatus(data); - break; - case "downloadProgress": - downloadProgress(data.data); - break; - case "txerr": - transactionError(); - break; - case "syncing": - processSync(data, this.plugins); - break; - case "backgroundtask": - progressBackgroundTask(data.data.tasks); - break; - case "refreshtheme": - if ((window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark !== Constants.Themes.DefaultThemeDark) || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight !== Constants.Themes.DefaultThemeLight)) { - (document.getElementById("themeStyle") as HTMLLinkElement).href = data.data.theme; - } else { - (document.getElementById("themeDefaultStyle") as HTMLLinkElement).href = data.data.theme; - } - break; - case "openFileById": - openFileById({app: this, id: data.data.id, action: [Constants.CB_GET_FOCUS]}); - break; - } - } - } - }), - }; - new SillotEnv(); - window.Sillot.androidRestartSiYuan = ()=>{ - const overlay = document.querySelector('#SillotOverlay') as HTMLElement; - overlay.style.display = "block"; - exportIDB().then(() => { - hideAllElements(["util"]); - fetchPost("/api/sillot/androidReboot", {force: true}, (response) => { - window.location.href = "siyuan://androidRestartSiYuan"; - }); - }) - }; - - fetchPost("/api/system/getConf", {}, async (response) => { - addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); - addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); - window.siyuan.config = response.data.conf; - const workspaceName: string = window.siyuan.config.system.workspaceDir.replaceAll("\\","/").split("/").at(-1); - // console.log(workspaceName) - fetchPost("/api/sillot/getConfigesStore", { f: `IDB__${workspaceName}__.json` }, async (r) => { - // console.log(r); - importIDB(r.data).then(() => { - window.Sillot.status.IDBloaded = true; - });}); - getLocalStorage(() => { - fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages: IObject) => { - window.siyuan.languages = lauguages; - window.siyuan.menus = new Menus(this); - bootSync(); - fetchPost("/api/setting/getCloudUser", {}, userResponse => { - window.siyuan.user = userResponse.data; - onGetConfig(response.data.start, this); - account.onSetaccount(); - setTitle(window.siyuan.languages.siyuanNote); - initMessage(); - }); - }); - }); - }); - setNoteBook(); - initBlockPopover(this); - loadPlugins(this); - } -} - -const siyuanApp = new App(); - -window.openFileByURL = (openURL) => { - if (openURL && isSYProtocol(openURL)) { - const isZoomIn = getSearch("focus", openURL) === "1"; - openFileById({ - app: siyuanApp, - id: getIdFromSYProtocol(openURL), - action: isZoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL], - zoomIn: isZoomIn - }); - return true; - } - return false; -}; - - -/// #if BROWSER -window.showKeyboardToolbar = () => { - // 防止 Pad 端报错 -}; -/// #endif +import { Constants } from "./constants"; +import { Menus } from "./menus"; +import { Model } from "./layout/Model"; +import { onGetConfig } from "./boot/onGetConfig"; +import { initBlockPopover } from "./block/popover"; +import { account } from "./config/account"; +import { addScript, addScriptSync } from "./protyle/util/addScript"; +import { genUUID } from "./util/genID"; +import { fetchGet, fetchPost } from "./util/fetch"; +import { addBaseURL, getIdFromSYProtocol, isSYProtocol, setNoteBook } from "./util/pathName"; +import {registerServiceWorker} from "./util/serviceWorker"; +import { openFileById } from "./editor/util"; +import { + bootSync, + downloadProgress, + processSync, + progressBackgroundTask, + progressLoading, + progressStatus, + reloadSync, + setTitle, + transactionError +} from "./dialog/processSystem"; +import { initMessage } from "./dialog/message"; +import { getAllTabs } from "./layout/getAll"; +import { getLocalStorage } from "./protyle/util/compatibility"; +import { exportIDB, importIDB } from "./sillot/util/sillot-idb-backup-and-restore"; +import { SillotEnv } from "./sillot"; +import {getSearch} from "./util/functions"; +import {hideAllElements} from "./protyle/ui/hideElements"; +import {loadPlugins, reloadPlugin} from "./plugin/loader"; +import "./assets/scss/base.scss"; + +export class App { + public plugins: import("./plugin").Plugin[] = []; + public appId: string; + + constructor() { + /// #if BROWSER + registerServiceWorker(`${Constants.SERVICE_WORKER_PATH}?v=${Constants.SIYUAN_VERSION}`); + /// #endif + addBaseURL(); + + this.appId = Constants.SIYUAN_APPID; + window.siyuan = { + zIndex: 10, + transactions: [], + reqIds: {}, + backStack: [], + layout: {}, + dialogs: [], + blockPanels: [], + ctrlIsPressed: false, + altIsPressed: false, + ws: new Model({ + app: this, + id: genUUID(), + type: "main", + msgCallback: (data) => { + this.plugins.forEach((plugin) => { + plugin.eventBus.emit("ws-main", data); + }); + if (data) { + switch (data.cmd) { + case "reloadPlugin": + reloadPlugin(this, data.data); + break; + case "syncMergeResult": + reloadSync(this, data.data); + break; + case "reloaddoc": + reloadSync(this, {upsertRootIDs: [data.data], removeRootIDs: []}, false); + break; + case "readonly": + window.siyuan.config.editor.readOnly = data.data; + hideAllElements(["util"]); + break; + case "setConf": + window.siyuan.config = data.data; + break; + case "progress": + progressLoading(data); + break; + case "setLocalStorageVal": + window.siyuan.storage[data.data.key] = data.data.val; + break; + case "rename": + getAllTabs().forEach((tab) => { + if (tab.headElement) { + const initTab = tab.headElement.getAttribute("data-initdata"); + if (initTab) { + const initTabData = JSON.parse(initTab); + if (initTabData.instance === "Editor" && initTabData.rootId === data.data.id) { + tab.updateTitle(data.data.title); + } + } + } + }); + break; + case "unmount": + getAllTabs().forEach((tab) => { + if (tab.headElement) { + const initTab = tab.headElement.getAttribute("data-initdata"); + if (initTab) { + const initTabData = JSON.parse(initTab); + if (initTabData.instance === "Editor" && data.data.box === initTabData.notebookId) { + tab.parent.removeTab(tab.id); + } + } + } + }); + break; + case "removeDoc": + getAllTabs().forEach((tab) => { + if (tab.headElement) { + const initTab = tab.headElement.getAttribute("data-initdata"); + if (initTab) { + const initTabData = JSON.parse(initTab); + if (initTabData.instance === "Editor" && data.data.ids.includes(initTabData.rootId)) { + tab.parent.removeTab(tab.id); + } + } + } + }); + break; + case "statusbar": + progressStatus(data); + break; + case "downloadProgress": + downloadProgress(data.data); + break; + case "txerr": + transactionError(); + break; + case "syncing": + processSync(data, this.plugins); + break; + case "backgroundtask": + progressBackgroundTask(data.data.tasks); + break; + case "refreshtheme": + if ((window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark !== Constants.Themes.DefaultThemeDark) || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight !== Constants.Themes.DefaultThemeLight)) { + (document.getElementById("themeStyle") as HTMLLinkElement).href = data.data.theme; + } else { + (document.getElementById("themeDefaultStyle") as HTMLLinkElement).href = data.data.theme; + } + break; + case "openFileById": + openFileById({app: this, id: data.data.id, action: [Constants.CB_GET_FOCUS]}); + break; + } + } + } + }), + }; + new SillotEnv(); + + fetchPost("/api/system/getConf", {}, async (response) => { + addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); + addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); + window.siyuan.config = response.data.conf; + const workspaceName: string = window.siyuan.config.system.workspaceDir.replaceAll("\\","/").split("/").at(-1); + // console.log(workspaceName) + fetchPost("/api/sillot/getConfigesStore", { f: `IDB__${workspaceName}__.json` }, async (r) => { + // console.log(r); + importIDB(r.data).then(() => { + window.Sillot.status.IDBloaded = true; + });}); + getLocalStorage(() => { + fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages: IObject) => { + window.siyuan.languages = lauguages; + window.siyuan.menus = new Menus(this); + bootSync(); + fetchPost("/api/setting/getCloudUser", {}, userResponse => { + window.siyuan.user = userResponse.data; + onGetConfig(response.data.start, this); + account.onSetaccount(); + setTitle(window.siyuan.languages.siyuanNote); + initMessage(); + }); + }); + }); + }); + setNoteBook(); + initBlockPopover(this); + loadPlugins(this); + } +} + +const siyuanApp = new App(); + +window.openFileByURL = (openURL) => { + if (openURL && isSYProtocol(openURL)) { + const isZoomIn = getSearch("focus", openURL) === "1"; + openFileById({ + app: siyuanApp, + id: getIdFromSYProtocol(openURL), + action: isZoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL], + zoomIn: isZoomIn + }); + return true; + } + return false; +}; + + +/// #if BROWSER +window.showKeyboardToolbar = () => { + // 防止 Pad 端报错 +}; +/// #endif diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts index e625a44f5e..c369aaf167 100644 --- a/app/src/layout/dock/index.ts +++ b/app/src/layout/dock/index.ts @@ -63,7 +63,7 @@ export class Dock { this.app = options.app; this.element = document.getElementById("dock" + options.position); const dockClass = options.position === "Bottom" ? ' class="fn__flex dock__items"' : ' class="dock__items"'; - this.element.innerHTML = `
`; + this.element.innerHTML = `
`; this.position = options.position; this.pin = options.data.pin; this.data = {}; @@ -87,7 +87,7 @@ export class Dock { } } if (!showDock) { - this.element.firstElementChild.innerHTML = ` + this.element.firstElementChild.innerHTML = ` `; this.element.classList.add("fn__none"); @@ -143,17 +143,20 @@ export class Dock { documentSelf.ondragstart = () => false; let ghostElement: HTMLElement; let selectItem: HTMLElement; + const moveItem = document.createElement("span"); + moveItem.classList.add("dock__item", "fn__none"); + moveItem.style.background = "var(--b3-theme-primary-light)"; + moveItem.innerHTML = ""; + moveItem.id = "dockMoveItem"; documentSelf.onmousemove = (moveEvent: MouseEvent) => { if (window.siyuan.config.readonly || Math.abs(moveEvent.clientY - event.clientY) < 3 && Math.abs(moveEvent.clientX - event.clientX) < 3) { return; } - console.log(moveEvent.clientY - event.clientY) moveEvent.preventDefault(); moveEvent.stopPropagation(); if (!ghostElement) { item.style.opacity = "0.38"; - item.classList.remove("b3-tooltips"); ghostElement = item.cloneNode(true) as HTMLElement; ghostElement.setAttribute("data-ghost-type", "dock"); this.element.append(ghostElement); @@ -179,31 +182,92 @@ export class Dock { } const targetItem = hasClosestByClassName(moveEvent.target as HTMLElement, "dock__item") || - hasClosestByClassName(moveEvent.target as HTMLElement, "dock__items") as HTMLElement; + hasClosestByClassName(moveEvent.target as HTMLElement, "dock__items") as HTMLElement || + hasClosestByClassName(moveEvent.target as HTMLElement, "dock__item--space") as HTMLElement; if (targetItem && selectItem && targetItem.isSameNode(selectItem)) { - if (selectItem.classList.contains("dock__item")) { + if (selectItem.classList.contains("dock__item--space")) { + const selectRect = selectItem.getBoundingClientRect(); + if (selectItem.parentElement.id === "dockBottom") { + if (moveEvent.clientX < selectRect.right && moveEvent.clientX > selectRect.right - 40) { + const lastFirstElement = selectItem.nextElementSibling.firstElementChild; + if (lastFirstElement && lastFirstElement.isSameNode(item)) { + moveItem.classList.add("fn__none"); + } else { + moveItem.classList.remove("fn__none"); + lastFirstElement.before(moveItem); + } + } + } else { + if (moveEvent.clientY < selectRect.bottom && moveEvent.clientY > selectRect.bottom - 40) { + const lastFirstElement = selectItem.nextElementSibling.firstElementChild; + if (lastFirstElement && lastFirstElement.isSameNode(item)) { + moveItem.classList.add("fn__none"); + } else { + moveItem.classList.remove("fn__none"); + lastFirstElement.before(moveItem); + } + } + } + } else if (selectItem.classList.contains("dock__item--pin")) { + if (item.nextElementSibling?.isSameNode(selectItem)) { + moveItem.classList.add("fn__none"); + } else { + moveItem.classList.remove("fn__none"); + selectItem.before(moveItem); + } + } else if (selectItem.classList.contains("dock__item")) { const selectRect = selectItem.getBoundingClientRect(); if (selectItem.parentElement.parentElement.id === "dockBottom") { if (selectRect.left + selectRect.width / 2 > moveEvent.clientX) { - selectItem.before(item); + if (item.nextElementSibling?.isSameNode(selectItem)) { + moveItem.classList.add("fn__none"); + } else { + moveItem.classList.remove("fn__none"); + selectItem.before(moveItem); + } } else { - selectItem.after(item); + if (item.previousElementSibling?.isSameNode(selectItem)) { + moveItem.classList.add("fn__none"); + } else { + moveItem.classList.remove("fn__none"); + selectItem.after(moveItem); + } } } else { if (selectRect.top + selectRect.height / 2 > moveEvent.clientY) { - selectItem.before(item); + if (item.nextElementSibling?.isSameNode(selectItem)) { + moveItem.classList.add("fn__none"); + } else { + moveItem.classList.remove("fn__none"); + selectItem.before(moveItem); + } } else { - selectItem.after(item); + if (item.previousElementSibling?.isSameNode(selectItem)) { + moveItem.classList.add("fn__none"); + } else { + moveItem.classList.remove("fn__none"); + selectItem.after(moveItem); + } } } } else if (selectItem.childElementCount === 0) { - selectItem.append(item) + moveItem.classList.remove("fn__none"); + selectItem.append(moveItem); + } else if (selectItem.childElementCount === 1 && selectItem.firstElementChild.id === "dockMoveItem") { + moveItem.classList.remove("fn__none"); } else if (selectItem.childElementCount === 1 && selectItem.firstElementChild.classList.contains("dock__item--pin")) { - selectItem.insertAdjacentElement("afterbegin", item); + moveItem.classList.remove("fn__none"); + selectItem.insertAdjacentElement("afterbegin", moveItem); + } else if (selectItem.childElementCount === 2 && + selectItem.firstElementChild.id === "dockMoveItem" && selectItem.lastElementChild.classList.contains("dock__item--pin")) { + moveItem.classList.remove("fn__none"); } return; } - if (!targetItem || targetItem.classList.contains("dock__item--pin") || targetItem.style.position === "fixed" || targetItem.isSameNode(item)) { + if (!targetItem || targetItem.style.position === "fixed" || targetItem.isSameNode(item) || targetItem.id === "dockMoveItem") { + if (targetItem && targetItem.isSameNode(item)) { + moveItem.classList.add("fn__none"); + } return; } selectItem = targetItem; @@ -216,20 +280,22 @@ export class Dock { documentSelf.onselectstart = null; documentSelf.onselect = null; ghostElement?.remove(); - if (item.classList.contains("b3-tooltips")) { + if (item.style.opacity !== "0.38") { return; } item.style.opacity = ""; - item.classList.add("b3-tooltips"); - let dock - if (item.parentElement.parentElement.id === "dockBottom") { - dock = window.siyuan.layout.bottomDock; - } else if (item.parentElement.parentElement.id === "dockLeft") { - dock = window.siyuan.layout.leftDock; - } else if (item.parentElement.parentElement.id === "dockRight") { - dock = window.siyuan.layout.rightDock; + if (!moveItem.classList.contains("fn__none")) { + let dock; + if (moveItem.parentElement.parentElement.id === "dockBottom") { + dock = window.siyuan.layout.bottomDock; + } else if (moveItem.parentElement.parentElement.id === "dockLeft") { + dock = window.siyuan.layout.leftDock; + } else if (moveItem.parentElement.parentElement.id === "dockRight") { + dock = window.siyuan.layout.rightDock; + } + dock.add(moveItem.parentElement.isSameNode(dock.element.firstElementChild) ? 0 : 1, item, moveItem.previousElementSibling?.getAttribute("data-type")); } - dock.add(item.parentElement.isSameNode(dock.element.firstElementChild) ? 0 : 1, item, item.previousElementSibling?.getAttribute("data-type")); + moveItem.remove(); }; }); @@ -684,7 +750,7 @@ export class Dock { this.showDock(); } - public add(index: number, sourceElement: Element, previousType?:string) { + public add(index: number, sourceElement: Element, previousType?: string) { sourceElement.setAttribute("data-height", ""); sourceElement.setAttribute("data-width", ""); const type = sourceElement.getAttribute("data-type"); @@ -705,8 +771,6 @@ export class Dock { delete sourceDock.data[type]; // 目标处理 - sourceElement.classList.remove("b3-tooltips__n", "b3-tooltips__ne", "b3-tooltips__nw", "b3-tooltips__s", "b3-tooltips__se", "b3-tooltips__sw", "b3-tooltips__e", "b3-tooltips__w"); - sourceElement.classList.add(`b3-tooltips__${this.getClassDirect(index)}`); sourceElement.setAttribute("data-index", index.toString()); if (previousType) { this.element.querySelector(`[data-type="${previousType}"]`).after(sourceElement); @@ -736,23 +800,6 @@ export class Dock { delete this.data[key]; } - private getClassDirect(index: number) { - let direct = "e"; - switch (this.position) { - case "Right": - direct = "w"; - break; - case "Bottom": - if (index === 0) { - direct = "ne"; - } else { - direct = "nw"; - } - break; - } - return direct; - } - public setSize() { const activesElement = this.element.querySelectorAll(".dock__item--active"); activesElement.forEach((item) => { @@ -792,7 +839,7 @@ export class Dock { if (typeof tabIndex === "undefined" && !TYPES.includes(item.type)) { return; } - html += ` + html += `"> `; this.data[item.type] = true; @@ -805,7 +852,7 @@ export class Dock { this.element.firstElementChild.lastElementChild.insertAdjacentHTML("beforebegin", html); } } else { - this.element.firstElementChild.innerHTML = `${html} + this.element.firstElementChild.innerHTML = `${html} `; } diff --git a/app/src/menus/dock.ts b/app/src/menus/dock.ts index b99a2e74a6..a9f13db9c7 100644 --- a/app/src/menus/dock.ts +++ b/app/src/menus/dock.ts @@ -1,5 +1,4 @@ import {MenuItem} from "./Menu"; -import {saveLayout} from "../layout/util"; const moveMenuItem = (label: string, target: Element) => { window.sout.tracker("invoked"); diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts index f4f239f2bb..09837e2915 100644 --- a/app/src/mobile/index.ts +++ b/app/src/mobile/index.ts @@ -1,185 +1,175 @@ -import {addScript, addScriptSync} from "../protyle/util/addScript"; -import {Constants} from "../constants"; -import {onMessage} from "./util/onMessage"; -import {genUUID} from "../util/genID"; -import {hasClosestBlock, hasClosestByAttribute, hasTopClosestByClassName} from "../protyle/util/hasClosest"; -import {Model} from "../layout/Model"; -import "../assets/scss/mobile.scss"; -import {Menus} from "../menus"; -import {addBaseURL, getIdFromSYProtocol, isSYProtocol, setNoteBook} from "../util/pathName"; -import {handleTouchEnd, handleTouchMove, handleTouchStart} from "./util/touch"; -import {fetchGet, fetchPost} from "../util/fetch"; -import {initFramework} from "./util/initFramework"; -import {addGA, initAssets, loadAssets} from "../util/assets"; -import {bootSync} from "../dialog/processSystem"; -import {initMessage, showMessage} from "../dialog/message"; -import {goBack} from "./util/MobileBackFoward"; -import {hideKeyboardToolbar, showKeyboardToolbar} from "./util/keyboardToolbar"; -import {getLocalStorage, writeText} from "../protyle/util/compatibility"; -import {getCurrentEditor, openMobileFileById} from "./editor"; -import {getSearch} from "../util/functions"; -import {initRightMenu} from "./menu"; -import {openChangelog} from "../boot/openChangelog"; -import {registerServiceWorker} from "../util/serviceWorker"; -import {loadPlugins} from "../plugin/loader"; -import { SillotEnv } from "../sillot"; -import {saveScroll} from "../protyle/scroll/saveScroll"; -import {removeBlock} from "../protyle/wysiwyg/remove"; -import {isNotEditBlock} from "../protyle/wysiwyg/getBlock"; -import {updateCardHV} from "../card/util"; -import {mobileKeydown} from "./util/keydown"; -import {correctHotkey} from "../boot/globalEvent/commonHotkey"; -import { exportIDB } from "../sillot/util/sillot-idb-backup-and-restore"; -import {hideAllElements, hideElements} from "../protyle/ui/hideElements"; - -class App { - public plugins: import("../plugin").Plugin[] = []; - public appId: string; - - constructor() { - if (!window.webkit?.messageHandlers && !window.JSAndroid) { - registerServiceWorker(`${Constants.SERVICE_WORKER_PATH}?v=${Constants.SIYUAN_VERSION}`); - } - addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); - addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); - addBaseURL(); - this.appId = Constants.SIYUAN_APPID; - window.siyuan = { - zIndex: 10, - notebooks: [], - transactions: [], - reqIds: {}, - backStack: [], - dialogs: [], - blockPanels: [], - mobile: {}, - ws: new Model({ - app: this, - id: genUUID(), - type: "main", - msgCallback: (data) => { - this.plugins.forEach((plugin) => { - plugin.eventBus.emit("ws-main", data); - }); - onMessage(this, data); - } - }) - }; - new SillotEnv(); - window.Sillot.androidRestartSiYuan = ()=>{ - const overlay = document.querySelector('#SillotOverlay') as HTMLElement; - overlay.style.display = "block"; - exportIDB().then(() => { - hideAllElements(["util"]); - fetchPost("/api/sillot/androidReboot", {force: true}, (response) => { - window.location.href = "siyuan://androidRestartSiYuan"; - }); - }) - }; - // 不能使用 touchstart,否则会被 event.stopImmediatePropagation() 阻塞 - window.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => { - if (!window.siyuan.menus.menu.element.contains(event.target) && !hasClosestByAttribute(event.target, "data-menu", "true")) { - window.siyuan.menus.menu.remove(); - } - const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy"); - if (copyElement) { - let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd(); - text = text.replace(/\u00A0/g, " "); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382 - writeText(text); - showMessage(window.siyuan.languages.copied, 2000); - event.preventDefault(); - } - }); - window.addEventListener("beforeunload", () => { - window.siyuan.mobile.editor?.protyle ? saveScroll(window.siyuan.mobile.editor.protyle) : null; - }, false); - window.addEventListener("pagehide", () => { - window.siyuan.mobile.editor?.protyle ? saveScroll(window.siyuan.mobile.editor.protyle) : null; - }, false); - // 判断手机横竖屏状态 - window.matchMedia("(orientation:portrait)").addEventListener("change", () => { - updateCardHV(); - }); - fetchPost("/api/system/getConf", {}, async (confResponse) => { - window.siyuan.config = confResponse.data.conf; - correctHotkey(siyuanApp); - await loadPlugins(this); - getLocalStorage(() => { - fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages: IObject) => { - window.siyuan.languages = lauguages; - window.siyuan.menus = new Menus(this); - document.title = window.siyuan.languages.siyuanNote; - bootSync(); - loadAssets(confResponse.data.conf.appearance); - initMessage(); - initAssets(); - fetchPost("/api/setting/getCloudUser", {}, userResponse => { - window.siyuan.user = userResponse.data; - fetchPost("/api/system/getEmojiConf", {}, emojiResponse => { - window.siyuan.emojis = emojiResponse.data as IEmoji[]; - setNoteBook(() => { - initRightMenu(this); // 前置避免 initFramework crash 影响 - window.sout.tracker("initRightMenu() resolved"); - initFramework(this, confResponse.data.start); - window.sout.tracker("initFramework() resolved"); - openChangelog(); - }); - }); - }); - addGA(); - }); - }); - document.addEventListener("touchstart", handleTouchStart, false); - document.addEventListener("touchmove", handleTouchMove, false); - document.addEventListener("touchend", (event) => { - handleTouchEnd(event, siyuanApp); - }, false); - window.addEventListener("keydown", (event) => { - mobileKeydown(siyuanApp, event); - }); - // 移动端删除键 https://github.com/siyuan-note/siyuan/issues/9259 - window.addEventListener("keydown", (event) => { - if (getSelection().rangeCount > 0) { - const range = getSelection().getRangeAt(0); - const editor = getCurrentEditor(); - if (range.toString() === "" && - editor && editor.protyle.wysiwyg.element.contains(range.startContainer) && - !event.altKey && (event.key === "Backspace" || event.key === "Delete")) { - const nodeElement = hasClosestBlock(range.startContainer); - if (nodeElement && isNotEditBlock(nodeElement)) { - nodeElement.classList.add("protyle-wysiwyg--select"); - removeBlock(editor.protyle, nodeElement, range, event.key); - event.stopPropagation(); - event.preventDefault(); - return; - } - } - } - }); - }); - } -} - -const siyuanApp = new App(); - -// https://github.com/siyuan-note/siyuan/issues/8441 -window.reconnectWebSocket = () => { - window.siyuan.ws.send("ping", {}); - window.siyuan.mobile.files.send("ping", {}); - window.siyuan.mobile.editor?.protyle.ws.send("ping", {}); - window.siyuan.mobile.popEditor?.protyle.ws.send("ping", {}); -}; -window.goBack = goBack; -window.showKeyboardToolbar = (height) => { - document.getElementById("keyboardToolbar").setAttribute("data-keyboardheight", (height ? height : window.outerHeight / 2 - 42).toString()); - showKeyboardToolbar(); -}; -window.hideKeyboardToolbar = hideKeyboardToolbar; -window.openFileByURL = (openURL) => { - if (openURL && isSYProtocol(openURL)) { - openMobileFileById(siyuanApp, getIdFromSYProtocol(openURL), - getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); - return true; - } - return false; -}; +import {addScript, addScriptSync} from "../protyle/util/addScript"; +import {Constants} from "../constants"; +import {onMessage} from "./util/onMessage"; +import {genUUID} from "../util/genID"; +import {hasClosestBlock, hasClosestByAttribute, hasTopClosestByClassName} from "../protyle/util/hasClosest"; +import {Model} from "../layout/Model"; +import "../assets/scss/mobile.scss"; +import {Menus} from "../menus"; +import {addBaseURL, getIdFromSYProtocol, isSYProtocol, setNoteBook} from "../util/pathName"; +import {handleTouchEnd, handleTouchMove, handleTouchStart} from "./util/touch"; +import {fetchGet, fetchPost} from "../util/fetch"; +import {initFramework} from "./util/initFramework"; +import {addGA, initAssets, loadAssets} from "../util/assets"; +import {bootSync} from "../dialog/processSystem"; +import {initMessage, showMessage} from "../dialog/message"; +import {goBack} from "./util/MobileBackFoward"; +import {hideKeyboardToolbar, showKeyboardToolbar} from "./util/keyboardToolbar"; +import {getLocalStorage, writeText} from "../protyle/util/compatibility"; +import {getCurrentEditor, openMobileFileById} from "./editor"; +import {getSearch} from "../util/functions"; +import {initRightMenu} from "./menu"; +import {openChangelog} from "../boot/openChangelog"; +import {registerServiceWorker} from "../util/serviceWorker"; +import {loadPlugins} from "../plugin/loader"; +import { SillotEnv } from "../sillot"; +import {saveScroll} from "../protyle/scroll/saveScroll"; +import {removeBlock} from "../protyle/wysiwyg/remove"; +import {isNotEditBlock} from "../protyle/wysiwyg/getBlock"; +import {updateCardHV} from "../card/util"; +import {mobileKeydown} from "./util/keydown"; +import {correctHotkey} from "../boot/globalEvent/commonHotkey"; +import { exportIDB } from "../sillot/util/sillot-idb-backup-and-restore"; +import {hideAllElements, hideElements} from "../protyle/ui/hideElements"; + +class App { + public plugins: import("../plugin").Plugin[] = []; + public appId: string; + + constructor() { + if (!window.webkit?.messageHandlers && !window.JSAndroid) { + registerServiceWorker(`${Constants.SERVICE_WORKER_PATH}?v=${Constants.SIYUAN_VERSION}`); + } + addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); + addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); + addBaseURL(); + this.appId = Constants.SIYUAN_APPID; + window.siyuan = { + zIndex: 10, + notebooks: [], + transactions: [], + reqIds: {}, + backStack: [], + dialogs: [], + blockPanels: [], + mobile: {}, + ws: new Model({ + app: this, + id: genUUID(), + type: "main", + msgCallback: (data) => { + this.plugins.forEach((plugin) => { + plugin.eventBus.emit("ws-main", data); + }); + onMessage(this, data); + } + }) + }; + new SillotEnv(); + // 不能使用 touchstart,否则会被 event.stopImmediatePropagation() 阻塞 + window.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => { + if (!window.siyuan.menus.menu.element.contains(event.target) && !hasClosestByAttribute(event.target, "data-menu", "true")) { + window.siyuan.menus.menu.remove(); + } + const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy"); + if (copyElement) { + let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd(); + text = text.replace(/\u00A0/g, " "); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382 + writeText(text); + showMessage(window.siyuan.languages.copied, 2000); + event.preventDefault(); + } + }); + window.addEventListener("beforeunload", () => { + window.siyuan.mobile.editor?.protyle ? saveScroll(window.siyuan.mobile.editor.protyle) : null; + }, false); + window.addEventListener("pagehide", () => { + window.siyuan.mobile.editor?.protyle ? saveScroll(window.siyuan.mobile.editor.protyle) : null; + }, false); + // 判断手机横竖屏状态 + window.matchMedia("(orientation:portrait)").addEventListener("change", () => { + updateCardHV(); + }); + fetchPost("/api/system/getConf", {}, async (confResponse) => { + window.siyuan.config = confResponse.data.conf; + correctHotkey(siyuanApp); + await loadPlugins(this); + getLocalStorage(() => { + fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages: IObject) => { + window.siyuan.languages = lauguages; + window.siyuan.menus = new Menus(this); + document.title = window.siyuan.languages.siyuanNote; + bootSync(); + loadAssets(confResponse.data.conf.appearance); + initMessage(); + initAssets(); + fetchPost("/api/setting/getCloudUser", {}, userResponse => { + window.siyuan.user = userResponse.data; + fetchPost("/api/system/getEmojiConf", {}, emojiResponse => { + window.siyuan.emojis = emojiResponse.data as IEmoji[]; + setNoteBook(() => { + initRightMenu(this); // 前置避免 initFramework crash 影响 + window.sout.tracker("initRightMenu() resolved"); + initFramework(this, confResponse.data.start); + window.sout.tracker("initFramework() resolved"); + openChangelog(); + }); + }); + }); + addGA(); + }); + }); + document.addEventListener("touchstart", handleTouchStart, false); + document.addEventListener("touchmove", handleTouchMove, false); + document.addEventListener("touchend", (event) => { + handleTouchEnd(event, siyuanApp); + }, false); + window.addEventListener("keydown", (event) => { + mobileKeydown(siyuanApp, event); + }); + // 移动端删除键 https://github.com/siyuan-note/siyuan/issues/9259 + window.addEventListener("keydown", (event) => { + if (getSelection().rangeCount > 0) { + const range = getSelection().getRangeAt(0); + const editor = getCurrentEditor(); + if (range.toString() === "" && + editor && editor.protyle.wysiwyg.element.contains(range.startContainer) && + !event.altKey && (event.key === "Backspace" || event.key === "Delete")) { + const nodeElement = hasClosestBlock(range.startContainer); + if (nodeElement && isNotEditBlock(nodeElement)) { + nodeElement.classList.add("protyle-wysiwyg--select"); + removeBlock(editor.protyle, nodeElement, range, event.key); + event.stopPropagation(); + event.preventDefault(); + return; + } + } + } + }); + }); + } +} + +const siyuanApp = new App(); + +// https://github.com/siyuan-note/siyuan/issues/8441 +window.reconnectWebSocket = () => { + window.siyuan.ws.send("ping", {}); + window.siyuan.mobile.files.send("ping", {}); + window.siyuan.mobile.editor?.protyle.ws.send("ping", {}); + window.siyuan.mobile.popEditor?.protyle.ws.send("ping", {}); +}; +window.goBack = goBack; +window.showKeyboardToolbar = (height) => { + document.getElementById("keyboardToolbar").setAttribute("data-keyboardheight", (height ? height : window.outerHeight / 2 - 42).toString()); + showKeyboardToolbar(); +}; +window.hideKeyboardToolbar = hideKeyboardToolbar; +window.openFileByURL = (openURL) => { + if (openURL && isSYProtocol(openURL)) { + openMobileFileById(siyuanApp, getIdFromSYProtocol(openURL), + getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); + return true; + } + return false; +}; diff --git a/app/src/mobile/menu/index.ts b/app/src/mobile/menu/index.ts index 68aa90ac19..ac51610c80 100644 --- a/app/src/mobile/menu/index.ts +++ b/app/src/mobile/menu/index.ts @@ -1,5 +1,6 @@ import {popSearch} from "./search"; import {initAppearance} from "../settings/appearance"; +import { initAppearanceReact } from "../settings/appearance_react"; import {closePanel} from "../util/closePanel"; import {mountHelp, newDailyNote, newNotebook} from "../../util/mount"; import {repos} from "../../config/repos"; @@ -21,6 +22,7 @@ import {newFile} from "../../util/newFile"; import {afterLoadPlugin} from "../../plugin/loader"; import {Menu} from "../../plugin/Menu"; import {commandPanel} from "../../boot/globalEvent/command/panel"; +import { initDevOptions } from "../settings/devOptions"; export const popMenu = () => { window.sout.tracker("invoked"); @@ -90,9 +92,12 @@ export const initRightMenu = (app: App) => { ${window.siyuan.languages.dataHistory}
-