mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 浏览器端工作空间名称修改
This commit is contained in:
parent
6632a3719b
commit
2c59586b68
2 changed files with 7 additions and 3 deletions
|
|
@ -263,7 +263,7 @@ export const bootSync = () => {
|
|||
|
||||
export const setTitle = (title: string) => {
|
||||
const dragElement = document.getElementById("drag");
|
||||
const workspaceName = originalPath().basename(window.siyuan.config.system.workspaceDir);
|
||||
const workspaceName = getWorkspaceName();
|
||||
if (title === window.siyuan.languages.siyuanNote) {
|
||||
const versionTitle = `${title} - ${workspaceName} - v${Constants.SIYUAN_VERSION}`;
|
||||
document.title = versionTitle;
|
||||
|
|
@ -292,3 +292,7 @@ export const downloadProgress = (data: { id: string, percent: number }) => {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const getWorkspaceName = () => {
|
||||
return window.siyuan.config.system.workspaceDir;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue