Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-06-22 22:41:24 +08:00
commit 0929856bf4
13 changed files with 741 additions and 186 deletions

View file

@ -14,10 +14,10 @@ Install pnpm: `npm install -g pnpm`
Set the Electron mirror environment variable and install Electron:
* macOS/Linux: `ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ pnpm install electron@25.1.0 -D`
* macOS/Linux: `ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ pnpm install electron@25.2.0 -D`
* Windows:
* `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/`
* `pnpm install electron@25.1.0 -D`
* `pnpm install electron@25.2.0 -D`
NPM mirror:
@ -28,7 +28,7 @@ NPM mirror:
On the desktop, go to the app folder to run:
* `pnpm install electron@25.1.0 -D`
* `pnpm install electron@25.2.0 -D`
* `pnpm run dev`
* `pnpm run start`

View file

@ -16,11 +16,11 @@
* macOS/Linux:
```
ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ pnpm install electron@25.1.0 -D
ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ pnpm install electron@25.2.0 -D
```
* Windows:
* `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/`
* `pnpm install electron@25.1.0 -D`
* `pnpm install electron@25.2.0 -D`
NPM 镜像:
@ -30,7 +30,7 @@ NPM 镜像:
桌面端进入 app 文件夹运行:
* `pnpm install electron@25.1.0 -D`
* `pnpm install electron@25.2.0 -D`
* `pnpm run dev`
* `pnpm run start`

View file

@ -36,9 +36,6 @@ extraResources:
- from: "guide"
to: "guide"
filter: "!**/{.DS_Store,.git,.gitignore,.idea}"
- from: "appearance/boot"
to: "appearance/boot"
filter: "!**/{.DS_Store}"
- from: "appearance/icons"
to: "appearance/icons"
filter: "!**/{.DS_Store}"

View file

@ -36,9 +36,6 @@ extraResources:
- from: "guide"
to: "guide"
filter: "!**/{.DS_Store,.git,.gitignore,.idea}"
- from: "appearance/boot"
to: "appearance/boot"
filter: "!**/{.DS_Store}"
- from: "appearance/icons"
to: "appearance/icons"
filter: "!**/{.DS_Store}"

View file

@ -32,9 +32,6 @@ extraResources:
- from: "guide"
to: "guide"
filter: "!**/{.DS_Store,.git,.gitignore,.idea}"
- from: "appearance/boot"
to: "appearance/boot"
filter: "!**/{.DS_Store}"
- from: "appearance/icons"
to: "appearance/icons"
filter: "!**/{.DS_Store}"

View file

@ -49,9 +49,6 @@ extraResources:
- from: "guide"
to: "guide"
filter: "!**/{.DS_Store,.git,.gitignore,.idea}"
- from: "appearance/boot"
to: "appearance/boot"
filter: "!**/{.DS_Store}"
- from: "appearance/icons"
to: "appearance/icons"
filter: "!**/{.DS_Store}"

View file

@ -33,6 +33,23 @@
const sleep = (ms) => {
return new Promise(resolve => setTimeout(resolve, ms))
}
const getSearch = (key) => {
if (window.location.search.indexOf('?') === -1) {
return ''
}
let value = ''
const data = window.location.search.split('?')[1].split('&')
data.find(item => {
const keyValue = item.split('=')
if (keyValue[0] === key) {
value = keyValue[1]
return true
}
})
return value
}
const redirect = () => {
const uri = 'http://127.0.0.1:' + location.port
if (navigator.userAgent.match(/Android/i))
@ -41,7 +58,8 @@
window.location.replace(uri)
}
(async () => {
document.getElementById('details').textContent = 'Booting...'
const v = getSearch('v')
document.getElementById('details').textContent = "v" + v + ' Booting kernel...'
let progressing = false
while (!progressing) {
try {

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

View file

@ -398,6 +398,13 @@ const initKernel = (workspace, port, lang) => {
icon: path.join(appDir, "stage", "icon-large.png"),
});
let bootIndex = path.join(appDir, "app", "electron", "boot.html");
if (isDevEnv) {
bootIndex = path.join(appDir, "electron", "boot.html");
}
bootWindow.loadFile(bootIndex, {query: {v: appVer}});
bootWindow.show();
const kernelName = "win32" === process.platform ? "SiYuan-Kernel.exe" : "SiYuan-Kernel";
const kernelPath = path.join(appDir, "kernel", kernelName);
if (!fs.existsSync(kernelPath)) {

View file

@ -53,8 +53,8 @@
"clean-webpack-plugin": "^4.0.0",
"css-loader": "^6.7.1",
"dayjs": "^1.11.5",
"electron": "25.1.0",
"electron-builder": "^23.6.0",
"electron": "25.2.0",
"electron-builder": "^24.4.0",
"encoding": "^0.1.13",
"esbuild-loader": "^3.0.1",
"eslint": "^8.19.0",

868
app/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -52,7 +52,7 @@ var (
)
func Boot() {
IncBootProgress(3, "Booting...")
IncBootProgress(3, "Booting kernel...")
rand.Seed(time.Now().UTC().UnixNano())
initMime()
initHttpClient()

View file

@ -29,7 +29,7 @@ import (
)
func BootMobile(container, appDir, workspaceBaseDir, lang string) {
IncBootProgress(3, "Booting...")
IncBootProgress(3, "Booting kernel...")
rand.Seed(time.Now().UTC().UnixNano())
initMime()
initHttpClient()