mirror of
https://github.com/ankitects/anki.git
synced 2026-01-09 12:03:56 -05:00
Added: More menu Forget/Reset and Options
This commit is contained in:
parent
dc8925a492
commit
8dd34ba9ff
3 changed files with 21 additions and 3 deletions
|
|
@ -718,6 +718,8 @@ def open_reviewer_menu():
|
||||||
"SetDueDate": reviewer.on_set_due,
|
"SetDueDate": reviewer.on_set_due,
|
||||||
"CardInfo": on_card_info,
|
"CardInfo": on_card_info,
|
||||||
"CreateCopy": reviewer.on_create_copy,
|
"CreateCopy": reviewer.on_create_copy,
|
||||||
|
"Forget": reviewer.forget_current_card,
|
||||||
|
"Options": reviewer.onOptions,
|
||||||
}
|
}
|
||||||
|
|
||||||
req = OpenReviewerMenuRequest.FromString(request.data)
|
req = OpenReviewerMenuRequest.FromString(request.data)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
shortcut: "-",
|
shortcut: "-",
|
||||||
onClick: state.buryOrSuspendCurrentCard.bind(state, false),
|
onClick: state.buryOrSuspendCurrentCard.bind(state, false),
|
||||||
},
|
},
|
||||||
{ name: tr.actionsForgetCard(), shortcut: "Ctrl+Alt+N", onClick: todo },
|
{
|
||||||
|
name: tr.actionsForgetCard(),
|
||||||
|
shortcut: "Ctrl+Alt+N",
|
||||||
|
onClick: state.displayForgetMenu.bind(state),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: tr.actionsSetDueDate(),
|
name: tr.actionsSetDueDate(),
|
||||||
shortcut: "Ctrl+Shift+D",
|
shortcut: "Ctrl+Shift+D",
|
||||||
|
|
@ -45,7 +49,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
shortcut: "@",
|
shortcut: "@",
|
||||||
onClick: state.buryOrSuspendCurrentCard.bind(state, true),
|
onClick: state.buryOrSuspendCurrentCard.bind(state, true),
|
||||||
},
|
},
|
||||||
{ name: tr.actionsOptions(), shortcut: "O", onClick: todo },
|
{
|
||||||
|
name: tr.actionsOptions(),
|
||||||
|
shortcut: "O",
|
||||||
|
onClick: state.displayOptionsMenu.bind(state),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: tr.actionsCardInfo(),
|
name: tr.actionsCardInfo(),
|
||||||
shortcut: "I",
|
shortcut: "I",
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ export class ReviewerState {
|
||||||
this.showQuestion(null);
|
this.showQuestion(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public displayMenu(name: string) {
|
displayMenu(name: string) {
|
||||||
openReviewerMenu({ name, currentCardId: this.currentCard?.card?.id });
|
openReviewerMenu({ name, currentCardId: this.currentCard?.card?.id });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,6 +121,14 @@ export class ReviewerState {
|
||||||
this.displayMenu("CreateCopy");
|
this.displayMenu("CreateCopy");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public displayForgetMenu() {
|
||||||
|
this.displayMenu("Forget");
|
||||||
|
}
|
||||||
|
|
||||||
|
public displayOptionsMenu() {
|
||||||
|
this.displayMenu("Options");
|
||||||
|
}
|
||||||
|
|
||||||
public showTooltip(message: string) {
|
public showTooltip(message: string) {
|
||||||
clearTimeout(this.tooltipMessageTimeout);
|
clearTimeout(this.tooltipMessageTimeout);
|
||||||
this.tooltipMessage.set(message);
|
this.tooltipMessage.set(message);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue