mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-26 10:16:10 +01:00
This commit is contained in:
parent
f25b36ff38
commit
cd40ec50bb
21 changed files with 341 additions and 398 deletions
|
|
@ -287,7 +287,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
|||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
if (!isFileFocus && matchHotKey(window.siyuan.config.keymap.editor.general.quickMakeCard.custom, event)) {
|
||||
if (!isFileFocus && matchHotKey(window.siyuan.config.keymap.editor.general.quickMakeCard.custom, event) && !window.siyuan.config.readonly) {
|
||||
if (protyle.title?.editElement.contains(range.startContainer)) {
|
||||
quickMakeCard(protyle, [protyle.title.element]);
|
||||
} else {
|
||||
|
|
@ -316,7 +316,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
|||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
if (!isFileFocus && matchHotKey(window.siyuan.config.keymap.editor.general.spaceRepetition.custom, event)) {
|
||||
if (!isFileFocus && matchHotKey(window.siyuan.config.keymap.editor.general.spaceRepetition.custom, event) && !window.siyuan.config.readonly) {
|
||||
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: protyle.block.rootID}, (response) => {
|
||||
openCardByData(app, response.data, "doc", protyle.block.rootID, protyle.title?.editElement.textContent || window.siyuan.languages.untitled);
|
||||
});
|
||||
|
|
@ -593,7 +593,7 @@ const fileTreeKeydown = (app: App, event: KeyboardEvent) => {
|
|||
const pathString = liElements[0].getAttribute("data-path");
|
||||
const isFile = liElements[0].getAttribute("data-type") === "navigation-file";
|
||||
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.spaceRepetition.custom, event)) {
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.spaceRepetition.custom, event) && !window.siyuan.config.readonly) {
|
||||
if (isFile) {
|
||||
const id = liElements[0].getAttribute("data-node-id");
|
||||
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: id}, (response) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue