mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
7c65043b80
commit
4b4e4cb9be
4 changed files with 11 additions and 11 deletions
|
|
@ -61,22 +61,22 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
<div class="fn__flex b3-dialog__cardaction fn__none">
|
||||
<div>
|
||||
<span></span>
|
||||
<button data-type="0" class="b3-button b3-button--error">Again (A)</button>
|
||||
<button data-type="0" aria-label="1 / j" class="b3-button b3-button--error b3-tooltips__s b3-tooltips">Again</button>
|
||||
</div>
|
||||
<span class="fn__flex-1"></span>
|
||||
<div>
|
||||
<span></span>
|
||||
<button data-type="1" class="b3-button b3-button--warning">Hard (H)</button>
|
||||
<button data-type="1" aria-label="2 / k" class="b3-button b3-button--warning b3-tooltips__s b3-tooltips">Hard</button>
|
||||
</div>
|
||||
<span class="fn__flex-1"></span>
|
||||
<div>
|
||||
<span></span>
|
||||
<button data-type="2" class="b3-button b3-button--info">Good (G)</button>
|
||||
<button data-type="2" aria-label="3 / l" class="b3-button b3-button--info b3-tooltips__s b3-tooltips">Good</button>
|
||||
</div>
|
||||
<span class="fn__flex-1"></span>
|
||||
<div>
|
||||
<span></span>
|
||||
<button data-type="3" class="b3-button b3-button--success">Easy (E)</button>
|
||||
<button data-type="3" aria-label="4 / ;" class="b3-button b3-button--success b3-tooltips__s b3-tooltips">Easy</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
|
|
@ -131,13 +131,13 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
}
|
||||
let type = "";
|
||||
if (typeof event.detail === "string") {
|
||||
if (event.detail === "a") {
|
||||
if (event.detail === "1" || event.detail === "j") {
|
||||
type = "0";
|
||||
} else if (event.detail === "h") {
|
||||
} else if (event.detail === "2" || event.detail === "k") {
|
||||
type = "1";
|
||||
} else if (event.detail === "g") {
|
||||
} else if (event.detail === "3" || event.detail === "l") {
|
||||
type = "2";
|
||||
} else if (event.detail === "e") {
|
||||
} else if (event.detail === "4" || event.detail === ";") {
|
||||
type = "3";
|
||||
} else if (event.detail === "s") {
|
||||
type = "-1";
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export const workspaceMenu = (rect: DOMRect) => {
|
|||
}
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.riffCard,
|
||||
icon: "iconRiffCard",
|
||||
iconHTML: '<svg class="b3-menu__icon" style="color: var(--b3-theme-secondary)"><use xlink:href="#iconRiffCard"></use></svg>',
|
||||
accelerator: window.siyuan.config.keymap.general.riffCard.custom,
|
||||
click: () => {
|
||||
openCard();
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export const popMenu = () => {
|
|||
<svg class="b3-list-item__graphic"><use xlink:href="#iconCalendar"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.dailyNote}</span>
|
||||
</div>
|
||||
<div id="menuCard" class="b3-list-item b3-list-item--big">
|
||||
<svg class="b3-list-item__graphic"><use xlink:href="#iconRiffCard"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.riffCard}</span>
|
||||
<svg class="b3-list-item__graphic" style="color: var(--b3-theme-secondary)"><use xlink:href="#iconRiffCard"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.riffCard}</span>
|
||||
</div>
|
||||
<div class="b3-list-item b3-list-item--big" id="menuNewNotebook">
|
||||
<svg class="b3-list-item__graphic"><use xlink:href="#iconFilesRoot"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.newNotebook}</span>
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ export const globalShortcut = () => {
|
|||
|
||||
if (!event.ctrlKey && !event.metaKey && !event.shiftKey && !event.altKey &&
|
||||
!["INPUT", "TEXTAREA"].includes((event.target as HTMLElement).tagName) &&
|
||||
["s", "a", "h", "g", "e"].includes(event.key.toLowerCase())) {
|
||||
["1", "2", "3", "4", "j", "k", "l", ";", "s"].includes(event.key.toLowerCase())) {
|
||||
const openCardDialog = window.siyuan.dialogs.find(item => {
|
||||
if (item.element.getAttribute("data-key") === window.siyuan.config.keymap.general.riffCard.custom) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue