mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 04:10:16 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
1b1b6669ac
5 changed files with 526 additions and 676 deletions
8
.github/CONTRIBUTING.md
vendored
8
.github/CONTRIBUTING.md
vendored
|
|
@ -7,17 +7,17 @@
|
|||
|
||||
## NPM dependencies
|
||||
|
||||
Install pnpm: `npm install -g pnpm@10.30.1`
|
||||
Install pnpm: `npm install -g pnpm@10.30.3`
|
||||
|
||||
<details>
|
||||
<summary>For China mainland</summary>
|
||||
|
||||
Set the Electron mirror environment variable and install Electron:
|
||||
|
||||
* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@39.6.1 -D`
|
||||
* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@39.7.0 -D`
|
||||
* Windows:
|
||||
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
|
||||
* `pnpm install electron@39.6.1 -D`
|
||||
* `pnpm install electron@39.7.0 -D`
|
||||
|
||||
NPM mirror:
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ NPM mirror:
|
|||
|
||||
Enter the app folder and execute:
|
||||
|
||||
* `pnpm install electron@39.6.1 -D`
|
||||
* `pnpm install electron@39.7.0 -D`
|
||||
* `pnpm run dev`
|
||||
* `pnpm run start`
|
||||
|
||||
|
|
|
|||
6
.github/CONTRIBUTING_zh_CN.md
vendored
6
.github/CONTRIBUTING_zh_CN.md
vendored
|
|
@ -14,10 +14,10 @@
|
|||
|
||||
设置 Electron 镜像环境变量并安装 Electron:
|
||||
|
||||
* macOS/Linux:`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@39.6.1 -D`
|
||||
* macOS/Linux:`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@39.7.0 -D`
|
||||
* Windows:
|
||||
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
|
||||
* `pnpm install electron@39.6.1 -D`
|
||||
* `pnpm install electron@39.7.0 -D`
|
||||
|
||||
NPM 镜像:
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ NPM 镜像:
|
|||
|
||||
进入 app 文件夹执行:
|
||||
|
||||
* `pnpm install electron@39.6.1 -D`
|
||||
* `pnpm install electron@39.7.0 -D`
|
||||
* `pnpm run dev`
|
||||
* `pnpm run start`
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,23 @@ if (!app.requestSingleInstanceLock()) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
const desktop = (process.env.XDG_CURRENT_DESKTOP || '').toUpperCase();
|
||||
const isChineseOS = [
|
||||
'DDE', // 统信
|
||||
'DEEPIN', // 统信
|
||||
'UKUI', // 银河麒麟
|
||||
'KYLIN', // 麒麟备用标识
|
||||
'NEWSTART' // 中兴新支点
|
||||
].some(key => desktop.includes(key));
|
||||
const isKylinFile = fs.existsSync('/etc/kylin-release');
|
||||
const isUosFile = fs.existsSync('/etc/uos-version');
|
||||
const isDeepinFile = fs.existsSync('/etc/deepin-release');
|
||||
if (isChineseOS || isKylinFile || isUosFile || isDeepinFile) {
|
||||
app.commandLine.appendSwitch('ozone-platform', 'x11');
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
firstOpen = !fs.existsSync(path.join(confDir, "workspace.json"));
|
||||
if (!fs.existsSync(confDir)) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"description": "Refactor your thinking",
|
||||
"homepage": "https://b3log.org/siyuan",
|
||||
"main": "./electron/main.js",
|
||||
"packageManager": "pnpm@10.30.1",
|
||||
"packageManager": "pnpm@10.30.3",
|
||||
"scripts": {
|
||||
"lint": "eslint . --fix --cache",
|
||||
"dev": "webpack --mode development",
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
"clean-webpack-plugin": "^4.0.0",
|
||||
"css-loader": "^7.1.2",
|
||||
"dayjs": "^1.11.5",
|
||||
"electron": "39.6.1",
|
||||
"electron": "39.7.0",
|
||||
"electron-builder": "26.0.12",
|
||||
"encoding": "^0.1.13",
|
||||
"esbuild-loader": "^3.0.1",
|
||||
|
|
|
|||
1167
app/pnpm-lock.yaml
generated
1167
app/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue