mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
b9ff2fcaa2
commit
ab1370746a
1 changed files with 4 additions and 0 deletions
|
|
@ -666,6 +666,10 @@ const initAbout = () => {
|
||||||
});
|
});
|
||||||
btnsElement[1].addEventListener("click", () => {
|
btnsElement[1].addEventListener("click", () => {
|
||||||
const openPath = openWorkspaceDialog.element.querySelector("select").value;
|
const openPath = openWorkspaceDialog.element.querySelector("select").value;
|
||||||
|
if (openPath === window.siyuan.config.system.workspaceDir) {
|
||||||
|
openWorkspaceDialog.destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
confirmDialog(window.siyuan.languages.confirm, `${pathPosix().basename(window.siyuan.config.system.workspaceDir)} -> ${pathPosix().basename(openPath)}?`, () => {
|
confirmDialog(window.siyuan.languages.confirm, `${pathPosix().basename(window.siyuan.config.system.workspaceDir)} -> ${pathPosix().basename(openPath)}?`, () => {
|
||||||
fetchPost("/api/system/setWorkspaceDir", {
|
fetchPost("/api/system/setWorkspaceDir", {
|
||||||
path: openPath
|
path: openPath
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue