mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -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,
|
||||
"CardInfo": on_card_info,
|
||||
"CreateCopy": reviewer.on_create_copy,
|
||||
"Forget": reviewer.forget_current_card,
|
||||
"Options": reviewer.onOptions,
|
||||
}
|
||||
|
||||
req = OpenReviewerMenuRequest.FromString(request.data)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
shortcut: "-",
|
||||
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(),
|
||||
shortcut: "Ctrl+Shift+D",
|
||||
|
|
@ -45,7 +49,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
shortcut: "@",
|
||||
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(),
|
||||
shortcut: "I",
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ export class ReviewerState {
|
|||
this.showQuestion(null);
|
||||
}
|
||||
|
||||
public displayMenu(name: string) {
|
||||
displayMenu(name: string) {
|
||||
openReviewerMenu({ name, currentCardId: this.currentCard?.card?.id });
|
||||
}
|
||||
|
||||
|
|
@ -121,6 +121,14 @@ export class ReviewerState {
|
|||
this.displayMenu("CreateCopy");
|
||||
}
|
||||
|
||||
public displayForgetMenu() {
|
||||
this.displayMenu("Forget");
|
||||
}
|
||||
|
||||
public displayOptionsMenu() {
|
||||
this.displayMenu("Options");
|
||||
}
|
||||
|
||||
public showTooltip(message: string) {
|
||||
clearTimeout(this.tooltipMessageTimeout);
|
||||
this.tooltipMessage.set(message);
|
||||
|
|
|
|||
Loading…
Reference in a new issue