mirror of
https://github.com/discourse/discourse.git
synced 2026-08-10 04:58:31 -05:00
UX: add shortcut for deferring topics (#7798)
This commit is contained in:
@@ -77,6 +77,10 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||
keys2: [SHIFT, "k"],
|
||||
keysDelimiter: PLUS,
|
||||
shortcutsDelimiter: "slash"
|
||||
}),
|
||||
go_to_unread_post: buildShortcut("navigation.go_to_unread_post", {
|
||||
keys1: [SHIFT, "l"],
|
||||
keysDelimiter: PLUS
|
||||
})
|
||||
},
|
||||
application: {
|
||||
@@ -158,6 +162,10 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||
print: buildShortcut("actions.print", {
|
||||
keys1: [CTRL, "p"],
|
||||
keysDelimiter: PLUS
|
||||
}),
|
||||
defer: buildShortcut("actions.defer", {
|
||||
keys1: [SHIFT, "u"],
|
||||
keysDelimiter: PLUS
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,9 +65,10 @@ const bindings = {
|
||||
"shift+p": { handler: "pinUnpinTopic" },
|
||||
"shift+r": { handler: "replyToTopic" },
|
||||
"shift+s": { click: "#topic-footer-buttons button.share", anonymous: true }, // share topic
|
||||
"shift+u": { handler: "goToUnreadPost" },
|
||||
"shift+l": { handler: "goToUnreadPost" },
|
||||
"shift+z shift+z": { handler: "logout" },
|
||||
"shift+f11": { handler: "fullscreenComposer", global: true },
|
||||
"shift+u": { handler: "deferTopic" },
|
||||
t: { postAction: "replyAsNewTopic" },
|
||||
u: { handler: "goBack", anonymous: true },
|
||||
"x r": {
|
||||
@@ -618,5 +619,9 @@ export default {
|
||||
|
||||
_replyToPost() {
|
||||
this.container.lookup("controller:topic").send("replyToPost");
|
||||
},
|
||||
|
||||
deferTopic() {
|
||||
this.container.lookup("controller:topic").send("deferTopic");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<li>{{{shortcuts.navigation.up_down}}}</li>
|
||||
<li>{{{shortcuts.navigation.open}}}</li>
|
||||
<li>{{{shortcuts.navigation.next_prev}}}</li>
|
||||
<li>{{{shortcuts.navigation.go_to_unread_post}}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
@@ -64,6 +65,7 @@
|
||||
<li>{{{shortcuts.actions.mark_regular}}}</li>
|
||||
<li>{{{shortcuts.actions.mark_tracking}}}</li>
|
||||
<li>{{{shortcuts.actions.mark_watching}}}</li>
|
||||
<li>{{{shortcuts.actions.defer}}}</li>
|
||||
<li>{{{shortcuts.actions.print}}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user