mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
Added: Menu Set due date
This commit is contained in:
parent
7c88768331
commit
ad80e0e6bf
3 changed files with 15 additions and 7 deletions
|
|
@ -706,16 +706,16 @@ def play_avtags():
|
|||
play_tags(av_tags_to_native(req.tags))
|
||||
|
||||
|
||||
REVIEWER_MENUS = {
|
||||
"EditCurrent": lambda: aqt.mw.taskman.run_on_main(aqt.mw.onEditCurrent),
|
||||
}
|
||||
|
||||
|
||||
def open_reviewer_menu():
|
||||
REVIEWER_MENUS = {
|
||||
"EditCurrent": aqt.mw.onEditCurrent,
|
||||
"SetDueDate": aqt.mw.reviewer.on_set_due,
|
||||
}
|
||||
|
||||
req = openReviewerMenuRequest.FromString(request.data)
|
||||
if req.HasField("current_card_id"):
|
||||
aqt.mw.reviewer.card = aqt.mw.col.get_card(CardId(req.current_card_id))
|
||||
REVIEWER_MENUS[req.name]()
|
||||
aqt.mw.taskman.run_on_main(REVIEWER_MENUS[req.name])
|
||||
|
||||
|
||||
post_handler_list = [
|
||||
|
|
|
|||
|
|
@ -34,7 +34,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
onClick: state.buryCurrentCard.bind(state),
|
||||
},
|
||||
{ name: tr.actionsForgetCard(), shortcut: "Ctrl+Alt+N", onClick: todo },
|
||||
{ name: tr.actionsSetDueDate(), shortcut: "Ctrl+Shift+D", onClick: todo },
|
||||
{
|
||||
name: tr.actionsSetDueDate(),
|
||||
shortcut: "Ctrl+Shift+D",
|
||||
onClick: state.displaySetDueDateMenu.bind(state),
|
||||
},
|
||||
{ name: tr.actionsSuspendCard(), shortcut: "@", onClick: todo },
|
||||
{ name: tr.actionsOptions(), shortcut: "O", onClick: todo },
|
||||
{ name: tr.actionsCardInfo(), shortcut: "I", onClick: todo },
|
||||
|
|
|
|||
|
|
@ -104,6 +104,10 @@ export class ReviewerState {
|
|||
this.displayMenu("EditCurrent");
|
||||
}
|
||||
|
||||
public displaySetDueDateMenu() {
|
||||
this.displayMenu("SetDueDate");
|
||||
}
|
||||
|
||||
public buryCurrentCard() {
|
||||
if (this.currentCard?.card?.id) {
|
||||
buryOrSuspendCards({
|
||||
|
|
|
|||
Loading…
Reference in a new issue