mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-10 02:38:50 +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
|
|
@ -18,8 +18,7 @@ import {newFile} from "../../util/newFile";
|
|||
import {Constants} from "../../constants";
|
||||
import {openSetting} from "../../config";
|
||||
import {getInstanceById} from "../../layout/util";
|
||||
import {closeTabByType, copyTab, getDockByType, resizeTabs, switchTabByIndex} from "../../layout/tabUtil";
|
||||
import {getActiveTab} from "../../layout/tabUtil";
|
||||
import {closeTabByType, copyTab, getActiveTab, getDockByType, resizeTabs, switchTabByIndex} from "../../layout/tabUtil";
|
||||
import {Tab} from "../../layout/Tab";
|
||||
import {Editor} from "../../editor";
|
||||
import {setEditMode} from "../../protyle/util/setEditMode";
|
||||
|
|
@ -369,7 +368,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
|||
}
|
||||
if (!isFileFocus && matchHotKey(window.siyuan.config.keymap.editor.general.spaceRepetition.custom, event)) {
|
||||
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: protyle.block.rootID}, (response) => {
|
||||
openCardByData(app, response.data, "doc", protyle.block.rootID, protyle.title.editElement.textContent || "Untitled");
|
||||
openCardByData(app, response.data, "doc", protyle.block.rootID, protyle.title.editElement.textContent || window.siyuan.languages.untitled);
|
||||
});
|
||||
event.preventDefault();
|
||||
return true;
|
||||
|
|
@ -428,7 +427,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
|||
blockId: protyle.block.id,
|
||||
rootId: protyle.block.rootID,
|
||||
useBlockId: protyle.block.showAll,
|
||||
title: protyle.title ? (protyle.title.editElement.textContent || "Untitled") : null,
|
||||
title: protyle.title ? (protyle.title.editElement.textContent || window.siyuan.languages.untitled) : null,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
|
@ -449,7 +448,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
|||
blockId: protyle.block.id,
|
||||
rootId: protyle.block.rootID,
|
||||
useBlockId: protyle.block.showAll,
|
||||
title: protyle.title ? (protyle.title.editElement.textContent || "Untitled") : null,
|
||||
title: protyle.title ? (protyle.title.editElement.textContent || window.siyuan.languages.untitled) : null,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue