Skip to content

Commit

Permalink
Merge commit '2ee69394da22d5cdbd30ae46b36f0bb4c8e15de4'
Browse files Browse the repository at this point in the history
* commit '2ee69394da22d5cdbd30ae46b36f0bb4c8e15de4': (101 commits)
  🔖 Release v3.1.20
  🎨 PNPM Lint
  📝 Update changelogs
  📝 Improve the user guide
  📝 Improve User Guide (siyuan-note#13825)
  🎨 siyuan-note#13793
  🎨 Improve workspace path checking siyuan-note#7569
  🎨 siyuan-note#13677
  🎨 siyuan-note#13801
  🎨 siyuan-note#13796
  🎨 siyuan-note#13735
  🎨 siyuan-note#13704
  🎨 Supports setting keep-alive notification text on Android siyuan-note#13815
  🎨 Improve the user guide
  🎨 siyuan-note#13704
  🎨 Backlink count at the doc block title including sub-blocks siyuan-note#13791
  🎨 Improve tree block stat siyuan-note#13811
  🎨 Improve text
  🎨 Backlink count at the doc block title including sub-blocks siyuan-note#13791
  🎨 siyuan-note#13791
  ...
  • Loading branch information
EightDoor committed Jan 22, 2025
2 parents f4b592b + 2ee6939 commit ffd6cb1
Show file tree
Hide file tree
Showing 187 changed files with 13,811 additions and 2,599 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Install pnpm: `npm install -g [email protected]`

Set the Electron mirror environment variable and install Electron:

* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install [email protected].7 -D`
* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install [email protected].8 -D`
* Windows:
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
* `pnpm install [email protected].7 -D`
* `pnpm install [email protected].8 -D`

NPM mirror:

Expand All @@ -28,7 +28,7 @@ NPM mirror:

On the desktop, go to the app folder to run:

* `pnpm install [email protected].7 -D`
* `pnpm install [email protected].8 -D`
* `pnpm run dev`
* `pnpm run start`

Expand Down
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

* macOS/Linux:
```
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install [email protected].7 -D
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install [email protected].8 -D
```
* Windows:
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
* `pnpm install [email protected].7 -D`
* `pnpm install [email protected].8 -D`

NPM 镜像:

Expand All @@ -30,7 +30,7 @@ NPM 镜像:

桌面端进入 app 文件夹运行:

* `pnpm install [email protected].7 -D`
* `pnpm install [email protected].8 -D`
* `pnpm run dev`
* `pnpm run start`

Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/ar_SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "تحويل إلى",
"split": "تقسيم",
"underline": "خط سفلي",
"inline-math": "رياضيات داخل السطر",
"inline-math": "صيغة مضمنة",
"moveToUp": "تحريك للأعلى",
"moveToDown": "تحريك للأسفل",
"moveToLeft": "تحريك لليسار",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "Umwandeln in",
"split": "Teilen",
"underline": "Unterstreichen",
"inline-math": "Inline-Mathematik",
"inline-math": "Inline-Formel",
"moveToUp": "Nach oben bewegen",
"moveToDown": "Nach unten bewegen",
"moveToLeft": "Nach links bewegen",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "Turn into",
"split": "Split",
"underline": "Underline",
"inline-math": "Inline Math",
"inline-math": "Inline Formula",
"moveToUp": "Move Up",
"moveToDown": "Move Down",
"moveToLeft": "Move Left",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "Convertir en",
"split": "Dividir",
"underline": "Subrayar",
"inline-math": "Matemáticas en línea",
"inline-math": "Fórmula en línea",
"moveToUp": "Desplazar arriba",
"moveToDown": "Desplazar abajo",
"moveToLeft": "Mover a la izquierda",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "Convertir en",
"split": "Divisé",
"underline": "Souligner",
"inline-math": "Inline Math",
"inline-math": "Formule en ligne",
"moveToUp": "vers le Haut",
"moveToDown": "vers le bas",
"moveToLeft": "vers la Gauche",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/he_IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "הפוך ל",
"split": "חלק",
"underline": "קו תחתון",
"inline-math": "מתמטיקה פנימית",
"inline-math": "נוסחה מקוונת",
"moveToUp": "העבר למעלה",
"moveToDown": "העבר למטה",
"moveToLeft": "העבר שמאלה",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "Trasforma in",
"split": "Dividi",
"underline": "Sottolinea",
"inline-math": "Matematica in linea",
"inline-math": "Formula in linea",
"moveToUp": "Sposta Su",
"moveToDown": "Sposta Giù",
"moveToLeft": "Sposta a Sinistra",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/pl_PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "Zmień w",
"split": "Podziel",
"underline": "Podkreślenie",
"inline-math": "Matematyka w linii",
"inline-math": "Formuła w linii",
"moveToUp": "Przenieś w górę",
"moveToDown": "Przenieś w dół",
"moveToLeft": "Przenieś w lewo",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/ru_RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "Преобразовать в",
"split": "Разделить",
"underline": "Подчеркнуть",
"inline-math": "Встроенная математика",
"inline-math": "Встроенная формула",
"moveToUp": "Переместить вверх",
"moveToDown": "Переместить вниз",
"moveToLeft": "Переместить налево",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"turnInto": "轉換為",
"split": "並排顯示",
"underline": "底線",
"inline-math": "行內數學公式",
"inline-math": "行內公式",
"moveToUp": "向上移",
"moveToDown": "向下移",
"moveToLeft": "向左移",
Expand Down
2 changes: 1 addition & 1 deletion app/appx/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity Name="89C2A984.SiYuan"
ProcessorArchitecture="x64"
Publisher="CN=087C656E-C1D9-42D8-8807-CED45A74FC0F"
Version="3.1.19.0"/>
Version="3.1.20.0"/>
<Properties>
<DisplayName>SiYuan</DisplayName>
<PublisherDisplayName>云南链滴科技有限公司</PublisherDisplayName>
Expand Down
45 changes: 45 additions & 0 deletions app/changelogs/v3.1.20/v3.1.20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## Overview

This version improves some details.

## Changelogs

Below are the detailed changes in this version.

### Enhancement

* [Improve tab drag highlighting](https://github.com/siyuan-note/siyuan/pull/13549)
* [Hide the toolbar when the mouse is pressed on an element other than the toolbar](https://github.com/siyuan-note/siyuan/issues/13653)
* [Improve escaping content for database primary key, relation, and rollup fields](https://github.com/siyuan-note/siyuan/issues/13704)
* [When all sub-blocks of a super-block are selected, merging into a super-block is not supported](https://github.com/siyuan-note/siyuan/issues/13729)
* [Remove Markdown markers when copying inline elements](https://github.com/siyuan-note/siyuan/issues/13735)
* [Supports multiple pasting after copying the image file](https://github.com/siyuan-note/siyuan/issues/13736)
* [PDF annotations support conversion to text *](https://github.com/siyuan-note/siyuan/issues/13742)
* [Improve the inline code element parsing](https://github.com/siyuan-note/siyuan/issues/13754)
* [Improve block content stat](https://github.com/siyuan-note/siyuan/issues/13759)
* [Improve list super block editing](https://github.com/siyuan-note/siyuan/issues/13764)
* [Improve importing conf](https://github.com/siyuan-note/siyuan/issues/13767)
* [Improve the underline element parsing](https://github.com/siyuan-note/siyuan/issues/13768)
* [Avoid window controls overlay covering SiYuan toolbar buttons](https://github.com/siyuan-note/siyuan/pull/13771)
* [Improve list item, super block and blockquote backlink propagation](https://github.com/siyuan-note/siyuan/issues/13776)
* [Supports proxy settings on mobile when using network serving](https://github.com/siyuan-note/siyuan/issues/13784)
* [Improve drag for doc, outline, database, and block](https://github.com/siyuan-note/siyuan/issues/13785)
* [Backlink count at the doc block title including sub-blocks](https://github.com/siyuan-note/siyuan/issues/13791)
* [Improve changing database field type](https://github.com/siyuan-note/siyuan/issues/13797)
* [Supports click PlantUML diagram hyperlink](https://github.com/siyuan-note/siyuan/issues/13801)
* [Improve lazy loading image processing of browser clipping extension](https://github.com/siyuan-note/siyuan/issues/13810)
* [Supports setting keep-alive notification text on Android](https://github.com/siyuan-note/siyuan/issues/13815)

### Refactor

* [Upgrade to Electron v32.2.8](https://github.com/siyuan-note/siyuan/issues/13752)

### Development

* [Add plugin API `openSetting`](https://github.com/siyuan-note/siyuan/pull/13761)
* [Change parameters of plugin API `addFloatLayer`](https://github.com/siyuan-note/siyuan/issues/13816)

## Download

* [B3log](https://b3log.org/siyuan/en/download.html)
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
45 changes: 45 additions & 0 deletions app/changelogs/v3.1.20/v3.1.20_zh_CHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## 概述

該版本改進了一些細節。

## 變更記錄

以下是此版本中的詳細變更。

### 改進功能

* [改良頁籤拖曳高亮](https://github.com/siyuan-note/siyuan/pull/13549)
* [當滑鼠按在工具列以外的元素上時隱藏工具列](https://github.com/siyuan-note/siyuan/issues/13653)
* [改進資料庫主鍵、關聯和匯總欄位的內容轉義](https://github.com/siyuan-note/siyuan/issues/13704)
* [當超級區塊的所有子區塊被選中時,不支援合併為超級區塊](https://github.com/siyuan-note/siyuan/issues/13729)
* [複製行級元素時移除 Markdown 標記符](https://github.com/siyuan-note/siyuan/issues/13735)
* [支援複製圖片檔案後多次貼上](https://github.com/siyuan-note/siyuan/issues/13736)
* [PDF 標註支援轉換為文字](https://github.com/siyuan-note/siyuan/issues/13742)
* [改進行級程式碼元素解析](https://github.com/siyuan-note/siyuan/issues/13754)
* [改進區塊內容統計](https://github.com/siyuan-note/siyuan/issues/13759)
* [改進清單超級區塊編輯](https://github.com/siyuan-note/siyuan/issues/13764)
* [改進導入配置](https://github.com/siyuan-note/siyuan/issues/13767)
* [改進底線元素解析](https://github.com/siyuan-note/siyuan/issues/13768)
* [避免視窗控制覆蓋 SiYuan 工具列按鈕](https://github.com/siyuan-note/siyuan/pull/13771)
* [改進清單項目、超級區塊和引用區塊的反向連結傳遞](https://github.com/siyuan-note/siyuan/issues/13776)
* [支援透過網路伺服設定行動裝置代理程式](https://github.com/siyuan-note/siyuan/issues/13784)
* [改進文件、大綱、資料庫和區塊的拖曳](https://github.com/siyuan-note/siyuan/issues/13785)
* [文件區塊標題的反向連結計數包括子區塊](https://github.com/siyuan-note/siyuan/issues/13791)
* [改進更改資料庫欄位類型](https://github.com/siyuan-note/siyuan/issues/13797)
* [支援點擊 PlantUML 圖表超連結](https://github.com/siyuan-note/siyuan/issues/13801)
* [改進瀏覽器剪藏擴充功能的懶加載圖片處理](https://github.com/siyuan-note/siyuan/issues/13810)
* [支援在 Android 上設定保活通知文字](https://github.com/siyuan-note/siyuan/issues/13815)

### 開發重構

* [升級至 Electron v32.2.8](https://github.com/siyuan-note/siyuan/issues/13752)

### 開發者

* [新增外掛程式 API `openSetting`](https://github.com/siyuan-note/siyuan/pull/13761)
* [更改插件 API `addFloatLayer` 的參數](https://github.com/siyuan-note/siyuan/issues/13816)

## 下載

* [B3log](https://b3log.org/siyuan/download.html)
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
45 changes: 45 additions & 0 deletions app/changelogs/v3.1.20/v3.1.20_zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## 概述

该版本改进了一些细节。

## 变更记录

以下是此版本中的详细变更。

### 改进功能

* [改进页签拖动高亮](https://github.com/siyuan-note/siyuan/pull/13549)
* [当鼠标按在工具栏以外的元素上时隐藏工具栏](https://github.com/siyuan-note/siyuan/issues/13653)
* [改进数据库主键、关联和汇总字段的内容转义](https://github.com/siyuan-note/siyuan/issues/13704)
* [当超级块的所有子块被选中时,不支持合并为超级块](https://github.com/siyuan-note/siyuan/issues/13729)
* [复制行级元素时移除 Markdown 标记符](https://github.com/siyuan-note/siyuan/issues/13735)
* [支持复制图片文件后多次粘贴](https://github.com/siyuan-note/siyuan/issues/13736)
* [PDF 标注支持转换为文本](https://github.com/siyuan-note/siyuan/issues/13742)
* [改进行级代码元素解析](https://github.com/siyuan-note/siyuan/issues/13754)
* [改进块内容统计](https://github.com/siyuan-note/siyuan/issues/13759)
* [改进列表超级块编辑](https://github.com/siyuan-note/siyuan/issues/13764)
* [改进导入配置](https://github.com/siyuan-note/siyuan/issues/13767)
* [改进下划线元素解析](https://github.com/siyuan-note/siyuan/issues/13768)
* [避免窗口控件覆盖 SiYuan 工具栏按钮](https://github.com/siyuan-note/siyuan/pull/13771)
* [改进列表项、超级块和引用块的反向链接传递](https://github.com/siyuan-note/siyuan/issues/13776)
* [支持通过网络伺服设置移动端代理](https://github.com/siyuan-note/siyuan/issues/13784)
* [改进文档、大纲、数据库和块的拖动](https://github.com/siyuan-note/siyuan/issues/13785)
* [文档块标题的反向链接计数包括子块](https://github.com/siyuan-note/siyuan/issues/13791)
* [改进更改数据库字段类型](https://github.com/siyuan-note/siyuan/issues/13797)
* [支持点击 PlantUML 图表超链接](https://github.com/siyuan-note/siyuan/issues/13801)
* [改进浏览器剪藏扩展的懒加载图片处理](https://github.com/siyuan-note/siyuan/issues/13810)
* [支持在 Android 上设置保活通知文本](https://github.com/siyuan-note/siyuan/issues/13815)

### 开发重构

* [升级到 Electron v32.2.8](https://github.com/siyuan-note/siyuan/issues/13752)

### 开发者

* [添加插件 API `openSetting`](https://github.com/siyuan-note/siyuan/pull/13761)
* [更改插件 API `addFloatLayer` 的参数](https://github.com/siyuan-note/siyuan/issues/13816)

## 下载

* [B3log](https://b3log.org/siyuan/download.html)
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
20 changes: 18 additions & 2 deletions app/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ const initMainWindow = () => {
try {
oldWindowState = JSON.parse(fs.readFileSync(windowStatePath, "utf8"));
} catch (e) {
writeLog("read window state failed: " + e);
fs.writeFileSync(windowStatePath, "{}");
}
let defaultWidth;
Expand All @@ -258,7 +259,7 @@ const initMainWindow = () => {
defaultHeight = Math.floor(screen.getPrimaryDisplay().workAreaSize.height * 0.8);
workArea = screen.getPrimaryDisplay().workArea;
} catch (e) {
console.error(e);
writeLog("get screen size failed: " + e);
}
const windowState = Object.assign({}, {
isMaximized: false,
Expand All @@ -270,34 +271,48 @@ const initMainWindow = () => {
height: defaultHeight,
}, oldWindowState);

writeLog("windowStat [x=" + windowState.x + ", y=" + windowState.y + ", width=" + windowState.width + ", height=" + windowState.height + "], default [width=" + defaultWidth + ", height=" + defaultHeight + "], workArea [width=" + workArea.width + ", height=" + workArea.height + "]");
writeLog("window stat [x=" + windowState.x + ", y=" + windowState.y + ", width=" + windowState.width + ", height=" + windowState.height + "], " +
"default [x=0, y=0, width=" + defaultWidth + ", height=" + defaultHeight + "], " +
"old [x=" + oldWindowState.x + ", y=" + oldWindowState.y + ", width=" + oldWindowState.width + ", height=" + oldWindowState.height + "], " +
"workArea [width=" + workArea.width + ", height=" + workArea.height + "]");

let resetToCenter = false;
let x = windowState.x;
if (-32 < x && 0 > x) {
x = 0;
}
let y = windowState.y;
if (-32 < y && 0 > y) {
y = 0;
}
if (workArea) {
// 窗口大于 workArea 时缩小会隐藏到左下角,这里使用最小值重置
if (windowState.width > workArea.width + 32 || windowState.height > workArea.height + 32) {
// 重启后窗口大小恢复默认问题 https://github.com/siyuan-note/siyuan/issues/7755 https://github.com/siyuan-note/siyuan/issues/13732
// 这里 +32 是因为在某种情况下窗口大小会比 workArea 大几个像素导致恢复默认,+32 可以避免这种特殊情况
windowState.width = Math.min(defaultWidth, workArea.width);
windowState.height = Math.min(defaultHeight, workArea.height);
writeLog("reset window size [width=" + windowState.width + ", height=" + windowState.height + "]");
}

if (x >= workArea.width * 0.8 || y >= workArea.height * 0.8) {
resetToCenter = true;
writeLog("reset window to center cause x or y >= 80% of workArea");
}
}

if (x < 0 || y < 0) {
resetToCenter = true;
writeLog("reset window to center cause x or y < 0");
}

if (windowState.width < 493) {
windowState.width = 493;
writeLog("reset window width [493]");
}
if (windowState.height < 376) {
windowState.height = 376;
writeLog("reset window height [376]");
}

// 创建主窗体
Expand Down Expand Up @@ -326,6 +341,7 @@ const initMainWindow = () => {
if (resetToCenter) {
currentWindow.center();
} else {
writeLog("window position [x=" + x + ", y=" + y + "]");
currentWindow.setPosition(x, y);
}
currentWindow.webContents.userAgent = "SiYuan/" + appVer + " https://b3log.org/siyuan Electron " + currentWindow.webContents.userAgent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"id": "20200924101200-gss5vee",
"title": "Navigate in the Content Block",
"type": "doc",
"updated": "20221105220127"
"updated": "20250115164053"
},
"Children": [
{
Expand Down Expand Up @@ -242,7 +242,8 @@
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20200924101210-zwf8ags"
"id": "20200924101210-zwf8ags",
"updated": "20250115164053"
},
"Children": [
{
Expand Down Expand Up @@ -281,7 +282,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20210428225309-l9hqxpz",
"updated": "20210428225516"
"updated": "20250115164053"
},
"Children": [
{
Expand All @@ -290,12 +291,12 @@
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkType": "kbd",
"TextMarkTextContent": "Ctrl"
},
{
"Type": "NodeText",
"Data": " and click on the node: jump to the node."
"Data": " and click on the node: jump to the node."
}
]
},
Expand Down
Loading

0 comments on commit ffd6cb1

Please sign in to comment.