mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-10 12:30:27 +08:00
🎨 The desktop initialization interface workspace defaults to ~/SiYuan/ Fix https://github.com/siyuan-note/siyuan/issues/8879
This commit is contained in:
parent
26b6bd239c
commit
f9340c8860
@ -241,7 +241,8 @@
|
|||||||
<label class="b3-label">
|
<label class="b3-label">
|
||||||
<div>
|
<div>
|
||||||
🌐 Language
|
🌐 Language
|
||||||
<div class="b3-label__text">User interface language, which can be switched later in <kbd>Settings</kbd> - <kbd>Appearance</kbd>
|
<div class="b3-label__text">User interface language, which can be switched later in <kbd>Settings</kbd> -
|
||||||
|
<kbd>Appearance</kbd>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
@ -257,7 +258,8 @@
|
|||||||
<label class="b3-label">
|
<label class="b3-label">
|
||||||
<div>
|
<div>
|
||||||
🗂️ Workspace
|
🗂️ Workspace
|
||||||
<div class="b3-label__text">The workspace is used to store data, which can be switched later in the top bar menu later
|
<div class="b3-label__text">The workspace is used to store data, which can be switched later in the top bar
|
||||||
|
menu later
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
@ -350,10 +352,12 @@
|
|||||||
const {dialog} = require('@electron/remote')
|
const {dialog} = require('@electron/remote')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|
||||||
const defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "SiYuan")
|
const defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "SiYuan")
|
||||||
if (!fs.existsSync(defaultWorkspace)) {
|
if (!fs.existsSync(defaultWorkspace)) {
|
||||||
fs.mkdirSync(defaultWorkspace, {mode: 0o755, recursive: true})
|
fs.mkdirSync(defaultWorkspace, {mode: 0o755, recursive: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.showOpenDialog({
|
dialog.showOpenDialog({
|
||||||
defaultPath: defaultWorkspace,
|
defaultPath: defaultWorkspace,
|
||||||
properties: ['openDirectory', 'createDirectory'],
|
properties: ['openDirectory', 'createDirectory'],
|
||||||
|
Loading…
Reference in New Issue
Block a user