This commit is contained in:
parent
82a0932102
commit
72752f441a
4 changed files with 10 additions and 1 deletions
|
@ -49,6 +49,7 @@ export const reloadSync = (app: App, data: { upsertRootIDs: string[], removeRoot
|
|||
fetchPost("/api/block/getDocInfo", {
|
||||
id: window.siyuan.mobile.editor.protyle.block.rootID
|
||||
}, (response) => {
|
||||
setTitle(response.data.name);
|
||||
(document.getElementById("toolbarName") as HTMLInputElement).value = response.data.name === "Untitled" ? "" : response.data.name;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import {closePanel} from "./closePanel";
|
|||
import {showMessage} from "../../dialog/message";
|
||||
import {getCurrentEditor} from "../editor";
|
||||
import {avRender} from "../../protyle/render/av/render";
|
||||
import {setTitle} from "../../dialog/processSystem";
|
||||
|
||||
const forwardStack: IBackStack[] = [];
|
||||
|
||||
|
@ -42,6 +43,7 @@ const focusStack = (backStack: IBackStack) => {
|
|||
fetchPost("/api/block/getDocInfo", {
|
||||
id: backStack.id,
|
||||
}, (response) => {
|
||||
setTitle(response.data.name);
|
||||
(document.getElementById("toolbarName") as HTMLInputElement).value = response.data.name === "Untitled" ? "" : response.data.name;
|
||||
protyle.background.render(response.data.ial, protyle.block.rootID);
|
||||
protyle.wysiwyg.renderCustom(response.data.ial);
|
||||
|
|
|
@ -19,6 +19,7 @@ import {activeBlur, hideKeyboardToolbar, initKeyboardToolbar} from "./keyboardTo
|
|||
import {syncGuide} from "../../sync/syncGuide";
|
||||
import {Inbox} from "../../layout/dock/Inbox";
|
||||
import {App} from "../../index";
|
||||
import {setTitle} from "../../dialog/processSystem";
|
||||
|
||||
export const initFramework = (app: App, isStart: boolean) => {
|
||||
setInlineStyle();
|
||||
|
@ -162,5 +163,6 @@ const initEditorName = () => {
|
|||
path: window.siyuan.mobile.editor.protyle.path,
|
||||
title: inputElement.value,
|
||||
});
|
||||
setTitle(inputElement.value);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -5,8 +5,10 @@ import {popSearch} from "../menu/search";
|
|||
import {getRecentDocs} from "../menu/getRecentDocs";
|
||||
import {openHistory} from "../../history/history";
|
||||
import {App} from "../../index";
|
||||
import {setTitle} from "../../dialog/processSystem";
|
||||
|
||||
export const setEmpty = (app: App) => {
|
||||
setTitle(window.siyuan.languages.siyuanNote);
|
||||
document.getElementById("toolbarName").classList.add("fn__hidden");
|
||||
document.getElementById("editor").classList.add("fn__none");
|
||||
const emptyElement = document.getElementById("empty");
|
||||
|
@ -75,7 +77,9 @@ export const setEmpty = (app: App) => {
|
|||
};
|
||||
|
||||
export const setEditor = () => {
|
||||
document.getElementById("toolbarName").classList.remove("fn__hidden");
|
||||
const toolbarNameElement = document.getElementById("toolbarName") as HTMLInputElement
|
||||
setTitle(toolbarNameElement.value);
|
||||
toolbarNameElement.classList.remove("fn__hidden");
|
||||
document.getElementById("editor").classList.remove("fn__none");
|
||||
document.getElementById("empty").classList.add("fn__none");
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue