Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 桌面端支持同时打开多个工作空间 https://github.com/siyuan-note/siyuan/issues/4567

Liang Ding04d59ef4a747
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index 0d766d3a28..9feea2f80c 100644
--- a/app/src/dialog/processSystem.ts
+++ b/app/src/dialog/processSystem.ts
@@ -10,7 +10,7 @@ import {Dialog} from "./index";
import {isMobile} from "../util/functions";
import {confirmDialog} from "./confirmDialog";
import {getCurrentWindow} from "@electron/remote";
-import {pathPosix} from "../util/pathName";
+import {originalPath} from "../util/pathName";
export const lockFile = (id: string) => {
const html = `<div class="b3-dialog__scrim"></div>
@@ -263,15 +263,15 @@ export const bootSync = () => {
export const setTitle = (title: string) => {
const dragElement = document.getElementById("drag");
- const workspaceName = pathPosix().basename(window.siyuan.config.system.workspaceDir)
+ const workspaceName = originalPath().basename(window.siyuan.config.system.workspaceDir)
if (title === window.siyuan.languages.siyuanNote) {
- const versionTitle =`${workspaceName} - ${title} v${Constants.SIYUAN_VERSION}`;
+ const versionTitle = `${title} - ${workspaceName} - v${Constants.SIYUAN_VERSION}`;
document.title = versionTitle;
dragElement.textContent = versionTitle;
dragElement.setAttribute("title", versionTitle);
} else {
title = title || "Untitled";
- document.title =`${workspaceName} - ${title} - ${window.siyuan.languages.siyuanNote} v${Constants.SIYUAN_VERSION}`;
+ document.title = `${title} - ${workspaceName} - ${window.siyuan.languages.siyuanNote} v${Constants.SIYUAN_VERSION}`;
dragElement.textContent = title;
dragElement.setAttribute("title", title);
}
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts
index 3313ee9a4b..4b71c734da 100644
--- a/app/src/util/pathName.ts
+++ b/app/src/util/pathName.ts
@@ -59,6 +59,10 @@ export const pathPosix = () => {
return path;
};
+export const originalPath = () => {
+ return path;
+};
+
export const getTopPaths = (liElements: Element[]) => {
const fromPaths: string[] = [];
liElements.forEach((item: HTMLElement) => {