mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-07 08:01:47 +01:00
⚡
This commit is contained in:
parent
20d27a93bd
commit
2b3b78485d
17 changed files with 36 additions and 25 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import {Dialog} from "../dialog";
|
||||
import {fetchPost} from "./fetch";
|
||||
import {isMobile} from "./functions";
|
||||
import {Constants} from "../constants";
|
||||
|
||||
// 需独立出来,否则移动端引用的时候会引入 pc 端大量无用代码
|
||||
export const renameTag = (labelName: string) => {
|
||||
|
|
@ -31,3 +32,12 @@ export const renameTag = (labelName: string) => {
|
|||
export const getWorkspaceName = () => {
|
||||
return window.siyuan.config.system.workspaceDir.replace(/^.*[\\\/]/, "");
|
||||
};
|
||||
|
||||
export const checkFold = (id: string, cb: (zoomIn: boolean, action: string[]) => void) => {
|
||||
if (!id) {
|
||||
return;
|
||||
}
|
||||
fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
|
||||
cb(foldResponse.data, foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue