🎨 Improve workspace main menu name
This commit is contained in:
parent
2dab88c4ea
commit
052288f57c
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import {Dialog} from "../dialog";
|
|||
import {fetchPost} from "./fetch";
|
||||
import {isMobile} from "./functions";
|
||||
import {Constants} from "../constants";
|
||||
import {pathPosix} from "./pathName";
|
||||
|
||||
// 需独立出来,否则移动端引用的时候会引入 pc 端大量无用代码
|
||||
export const renameTag = (labelName: string) => {
|
||||
|
@ -31,7 +32,7 @@ export const renameTag = (labelName: string) => {
|
|||
};
|
||||
|
||||
export const getWorkspaceName = () => {
|
||||
return window.siyuan.config.system.workspaceDir.replace(/^.*[\\\/]/, "");
|
||||
return pathPosix().basename(window.siyuan.config.system.workspaceDir.replace(/\\/g, "/"));
|
||||
};
|
||||
|
||||
export const checkFold = (id: string, cb: (zoomIn: boolean, action: string[], isRoot: boolean) => void) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue