Added: Menu Set due date

This commit is contained in:
Luc Mcgrady 2025-11-11 12:50:48 +00:00
parent 7c88768331
commit ad80e0e6bf
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
3 changed files with 15 additions and 7 deletions

View file

@ -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 = [

View file

@ -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 },

View file

@ -104,6 +104,10 @@ export class ReviewerState {
this.displayMenu("EditCurrent");
}
public displaySetDueDateMenu() {
this.displayMenu("SetDueDate");
}
public buryCurrentCard() {
if (this.currentCard?.card?.id) {
buryOrSuspendCards({