mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
📝 Improve text (#16135)
This commit is contained in:
parent
33192d1404
commit
c4cd4ca652
2 changed files with 9 additions and 6 deletions
|
|
@ -874,9 +874,10 @@ export class Gutter {
|
|||
id: "separator_quickMakeCard",
|
||||
type: "separator"
|
||||
}).element);
|
||||
const allCardsMade = !selectsElement.some(item => !item.hasAttribute(Constants.CUSTOM_RIFF_DECKS) && item.getAttribute("data-type") !== "NodeThematicBreak");
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
id: "quickMakeCard",
|
||||
label: window.siyuan.languages.quickMakeCard,
|
||||
id: allCardsMade ? "removeCard" : "quickMakeCard",
|
||||
label: allCardsMade ? window.siyuan.languages.removeCard : window.siyuan.languages.quickMakeCard,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.quickMakeCard.custom,
|
||||
icon: "iconRiffCard",
|
||||
click() {
|
||||
|
|
@ -2000,10 +2001,11 @@ export class Gutter {
|
|||
}).element);
|
||||
}
|
||||
if (type !== "NodeThematicBreak" && !window.siyuan.config.readonly) {
|
||||
const isCardMade = nodeElement.hasAttribute(Constants.CUSTOM_RIFF_DECKS);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
id: "quickMakeCard",
|
||||
id: isCardMade ? "removeCard" : "quickMakeCard",
|
||||
icon: "iconRiffCard",
|
||||
label: window.siyuan.languages.quickMakeCard,
|
||||
label: isCardMade ? window.siyuan.languages.removeCard : window.siyuan.languages.quickMakeCard,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.quickMakeCard.custom,
|
||||
click() {
|
||||
quickMakeCard(protyle, [nodeElement]);
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
|
|||
}
|
||||
}).element);
|
||||
}
|
||||
const isCardMade = !!response.data.ial[Constants.CUSTOM_RIFF_DECKS];
|
||||
const riffCardMenu: IMenu[] = [{
|
||||
id: "spaceRepetition",
|
||||
iconHTML: "",
|
||||
|
|
@ -151,9 +152,9 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
|
|||
});
|
||||
}
|
||||
}, {
|
||||
id: "quickMakeCard",
|
||||
id: isCardMade ? "removeCard" : "quickMakeCard",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.quickMakeCard,
|
||||
label: isCardMade ? window.siyuan.languages.removeCard : window.siyuan.languages.quickMakeCard,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.quickMakeCard.custom,
|
||||
click: () => {
|
||||
let titleElement = protyle.title?.element;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue