mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
This commit is contained in:
parent
6148e5fd29
commit
83a9c3c282
2 changed files with 26 additions and 10 deletions
|
|
@ -121,8 +121,12 @@
|
|||
font-size: 16px;
|
||||
}
|
||||
|
||||
&__cardaction .b3-button {
|
||||
margin-top: 16px;
|
||||
&__cardaction > div > span {
|
||||
display: block;
|
||||
color: var(--b3-theme-on-surface);
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
&__cardblock {
|
||||
|
|
|
|||
|
|
@ -38,19 +38,31 @@ export const openCard = () => {
|
|||
<div class="fn__hr--b"><input style="opacity: 0;height: 1px;box-sizing: border-box"></div>
|
||||
<div class="b3-dialog__cardblock b3-dialog__cardblock--hide fn__flex-1${blocks.length === 0 ? " fn__none" : ""}" data-type="render"></div>
|
||||
<div class="b3-dialog__cardempty${blocks.length === 0 ? "" : " fn__none"}" data-type="empty">${window.siyuan.languages.noDueCard}</div>
|
||||
<div class="fn__flex b3-dialog__cardaction${blocks.length === 0 ? " fn__none" : ""}" data-type="action">
|
||||
<div class="fn__flex b3-dialog__cardaction${blocks.length === 0 ? " fn__none" : ""}">
|
||||
<span class="fn__flex-1"></span>
|
||||
<button data-type="-1" class="b3-button">Show (S)</button>
|
||||
<button data-type="-1" class="b3-button" style="margin-top: 16px">Show (S)</button>
|
||||
<span class="fn__flex-1"></span>
|
||||
</div>
|
||||
<div class="fn__flex b3-dialog__cardaction fn__none" data-type="action">
|
||||
<button data-type="0" class="b3-button b3-button--error">Again (A)</button>
|
||||
<div class="fn__flex b3-dialog__cardaction fn__none">
|
||||
<div>
|
||||
<span>${blocks[index].nextDues[0]}</span>
|
||||
<button data-type="0" class="b3-button b3-button--error">Again (A)</button>
|
||||
</div>
|
||||
<span class="${isMobile() ? "fn__space" : "fn__flex-1"}"></span>
|
||||
<button data-type="1" class="b3-button b3-button--warning">Hard (H)</button>
|
||||
<div>
|
||||
<span>${blocks[index].nextDues[1]}</span>
|
||||
<button data-type="1" class="b3-button b3-button--warning">Hard (H)</button>
|
||||
</div>
|
||||
<span class="${isMobile() ? "fn__space" : "fn__flex-1"}"></span>
|
||||
<button data-type="2" class="b3-button b3-button--info">Good (G)</button>
|
||||
<div>
|
||||
<span>${blocks[index].nextDues[2]}</span>
|
||||
<button data-type="2" class="b3-button b3-button--info">Good (G)</button>
|
||||
</div>
|
||||
<span class="${isMobile() ? "fn__space" : "fn__flex-1"}"></span>
|
||||
<button data-type="3" class="b3-button b3-button--success">Easy (E)</button>
|
||||
<div>
|
||||
<span>${blocks[index].nextDues[3]}</span>
|
||||
<button data-type="3" class="b3-button b3-button--success">Easy (E)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
width: isMobile() ? "80vw" : "50vw",
|
||||
|
|
@ -80,7 +92,7 @@ export const openCard = () => {
|
|||
(dialog.element.firstElementChild as HTMLElement).style.zIndex = "200";
|
||||
dialog.element.setAttribute("data-key", window.siyuan.config.keymap.general.riffCard.custom);
|
||||
const countElement = dialog.element.querySelector('[data-type="count"]');
|
||||
const actionElements = dialog.element.querySelectorAll('[data-type="action"]');
|
||||
const actionElements = dialog.element.querySelectorAll(".b3-dialog__cardaction");
|
||||
const selectElement = dialog.element.querySelector("select");
|
||||
selectElement.addEventListener("change", () => {
|
||||
fetchPost("/api/riff/getRiffDueCards", {deckID: selectElement.value}, (cardsChangeResponse) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue