mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🎨 Improve the initialization interface to select the workspace cloud disk path prompt Fix https://github.com/siyuan-note/siyuan/issues/7975
This commit is contained in:
parent
28232dd18c
commit
e9f3bdc476
1 changed files with 14 additions and 7 deletions
|
|
@ -358,10 +358,21 @@
|
|||
const {ipcRenderer} = require('electron')
|
||||
const fs = require('fs')
|
||||
const initPath = result.filePaths[0]
|
||||
if (isCloudDrivePath(initPath)) {
|
||||
let msg = '⚠️ This folder may be a cloud sync disk folder, please change to another path'
|
||||
const absPathLower = initPath.toLowerCase()
|
||||
if (isICloudPath(absPathLower)) {
|
||||
let msg = '⚠️ This folder is under the iCloud sync path, please change another path'
|
||||
if ('zh_CN' === currentLang) {
|
||||
msg = '⚠️ 该文件夹可能是云同步盘文件夹,请更换其他路径'
|
||||
msg = '⚠️ 该文件夹位于 iCloud 同步路径下,请更换其他路径'
|
||||
}
|
||||
alert(msg)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (isCloudDrivePath(initPath)) {
|
||||
let msg = '⚠️ The folder path can not contain onedrive, dropbox, google drive, pcloud and 坚果云, please change another path'
|
||||
if ('zh_CN' === currentLang) {
|
||||
msg = '⚠️ 文件夹路径不能包含 onedrive、dropbox、google drive、pcloud 和 坚果云,请更换其他路径'
|
||||
}
|
||||
alert(msg)
|
||||
return
|
||||
|
|
@ -388,10 +399,6 @@
|
|||
|
||||
const isCloudDrivePath = (absPath) => {
|
||||
const absPathLower = absPath.toLowerCase()
|
||||
if (isICloudPath(absPathLower)) {
|
||||
return true
|
||||
}
|
||||
|
||||
return -1 < absPathLower.indexOf("onedrive") || -1 < absPathLower.indexOf("dropbox") ||
|
||||
-1 < absPathLower.indexOf("google drive") || -1 < absPathLower.indexOf("pcloud") ||
|
||||
-1 < absPathLower.indexOf("坚果云")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue