mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🚨
This commit is contained in:
parent
1525c6c899
commit
02d709ccee
7 changed files with 10 additions and 11 deletions
|
|
@ -185,7 +185,7 @@ export const quickMakeCard = (nodeElement: Element[]) => {
|
|||
deckID: Constants.QUICK_DECK_ID,
|
||||
blockIDs: ids
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const openCard = () => {
|
|||
decksHTML += `<option value="${deck.id}">${deck.name}</option>`;
|
||||
});
|
||||
fetchPost("/api/riff/getRiffDueCards", {deckID: ""}, (cardsResponse) => {
|
||||
openCardByData(cardsResponse.data, `<select class="b3-select">${decksHTML}</select>`)
|
||||
openCardByData(cardsResponse.data, `<select class="b3-select">${decksHTML}</select>`);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -189,7 +189,7 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
});
|
||||
const selectElement = dialog.element.querySelector("select");
|
||||
if (!selectElement) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
selectElement.addEventListener("change", () => {
|
||||
fetchPost("/api/riff/getRiffDueCards", {deckID: selectElement.value}, (cardsChangeResponse) => {
|
||||
|
|
@ -219,4 +219,4 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ export const viewCards = (deckID: string, title: string, cb:(response:IWebSocket
|
|||
nextElment.classList.add("b3-list-item--focus");
|
||||
}
|
||||
target.parentElement.remove();
|
||||
cb(removeResponse)
|
||||
cb(removeResponse);
|
||||
});
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export abstract class Constants {
|
|||
fr_FR: "20210808180117-6v0mkxr",
|
||||
};
|
||||
|
||||
public static readonly QUICK_DECK_ID = "20230218211946-2kw8jgx"
|
||||
public static readonly QUICK_DECK_ID = "20230218211946-2kw8jgx";
|
||||
|
||||
public static readonly KEYCODE: { [key: string]: string[] } = {
|
||||
"186": [";", ":"],
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {setStorageVal, writeText} from "../protyle/util/compatibility";
|
|||
import {openCard} from "../card/openCard";
|
||||
import {openSetting} from "../config";
|
||||
import {getAllDocks} from "../layout/getAll";
|
||||
import {getDockByType, resizeTabs} from "../layout/util";
|
||||
import {getDockByType} from "../layout/util";
|
||||
import {lockScreen} from "../dialog/processSystem";
|
||||
import {showMessage} from "../dialog/message";
|
||||
import {unicode2Emoji} from "../emoji";
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ export class Gutter {
|
|||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.quickMakeCard,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.quickMakeCard.custom,
|
||||
iconHTML: `<svg class="b3-menu__icon" style="color:var(--b3-theme-primary)"><use xlink:href="#iconRiffCard"></use></svg>`,
|
||||
iconHTML: "<svg class=\"b3-menu__icon\" style=\"color:var(--b3-theme-primary)\"><use xlink:href=\"#iconRiffCard\"></use></svg>",
|
||||
icon: "iconRiffCard",
|
||||
click() {
|
||||
quickMakeCard(selectsElement);
|
||||
|
|
@ -1442,7 +1442,7 @@ export class Gutter {
|
|||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.quickMakeCard,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.quickMakeCard.custom,
|
||||
iconHTML: `<svg class="b3-menu__icon" style="color:var(--b3-theme-primary)"><use xlink:href="#iconRiffCard"></use></svg>`,
|
||||
iconHTML: "<svg class=\"b3-menu__icon\" style=\"color:var(--b3-theme-primary)\"><use xlink:href=\"#iconRiffCard\"></use></svg>",
|
||||
icon: "iconRiffCard",
|
||||
click() {
|
||||
quickMakeCard([nodeElement]);
|
||||
|
|
|
|||
|
|
@ -995,7 +995,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
}
|
||||
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.quickMakeCard.custom, event)) {
|
||||
const selectElement: Element[] = []
|
||||
const selectElement: Element[] = [];
|
||||
nodeElement.classList.add("protyle-wysiwyg--select");
|
||||
let isRemove = true;
|
||||
const removeIds: string[] = [];
|
||||
|
|
@ -1012,7 +1012,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
fetchPost("/api/riff/removeRiffCards", {
|
||||
deckID: Constants.QUICK_DECK_ID,
|
||||
blockIDs: removeIds
|
||||
}, (removeResponse) => {
|
||||
});
|
||||
} else {
|
||||
quickMakeCard(selectElement);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue