mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-26 17:04:07 +01:00
🎨 Title localization when creating a document https://github.com/siyuan-note/siyuan/issues/10719
This commit is contained in:
parent
f5043a8c46
commit
2a8809bc7e
25 changed files with 72 additions and 61 deletions
|
|
@ -1,14 +1,15 @@
|
|||
import {
|
||||
focusBlock, focusByOffset,
|
||||
focusByRange, focusByWbr,
|
||||
getEditorRange, getSelectionOffset,
|
||||
focusBlock,
|
||||
focusByOffset,
|
||||
focusByRange,
|
||||
focusByWbr,
|
||||
getEditorRange,
|
||||
getSelectionOffset,
|
||||
} from "../util/selection";
|
||||
import {fetchPost} from "../../util/fetch";
|
||||
import {replaceFileName, validateName} from "../../editor/rename";
|
||||
import {MenuItem} from "../../menus/Menu";
|
||||
import {
|
||||
openFileAttr,
|
||||
} from "../../menus/commonMenuItem";
|
||||
import {openFileAttr,} from "../../menus/commonMenuItem";
|
||||
import {Constants} from "../../constants";
|
||||
import {matchHotKey} from "../util/hotKey";
|
||||
import {isMac, readText, writeText} from "../util/compatibility";
|
||||
|
|
@ -264,7 +265,7 @@ export class Title {
|
|||
|
||||
public setTitle(title: string) {
|
||||
if (code160to32(title) !== code160to32(this.editElement.textContent)) {
|
||||
this.editElement.textContent = title === "Untitled" ? "" : title;
|
||||
this.editElement.textContent = title === window.siyuan.languages.untitled ? "" : title;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue