(js) Add hotkey to flag a message

This commit is contained in:
Francis Lachapelle
2016-09-30 12:15:37 -04:00
parent 268b8ea1c3
commit c845d021ea
3 changed files with 9 additions and 2 deletions
@@ -371,4 +371,7 @@
"Filter" = "Filter";
/* Hotkey to write a new message */
"hotkey_compose" = "w";
"hotkey_compose" = "w";
/* Hotkey to flag a message */
"hotkey_flag" = "f";
@@ -25,7 +25,7 @@
</md-button>
<div class="md-flex"><!-- spacer --></div>
<md-button class="sg-icon-button" label:aria-label="flagged" ng-click="viewer.message.toggleFlag()">
<md-icon ng-class="{'icon-star': viewer.message.isflagged,
<md-icon ng-class="{'icon-star md-accent md-hue-2': viewer.message.isflagged,
'icon-star-border': !viewer.message.isflagged}"><!-- flag --></md-icon>
</md-button>
<md-button class="sg-icon-button"
@@ -104,6 +104,10 @@
function _registerHotkeys(keys) {
keys.push(sgHotkeys.createHotkey({
key: l('hotkey_flag'),
callback: angular.bind(stateMessage, stateMessage.toggleFlag)
}));
keys.push(sgHotkeys.createHotkey({
key: 'backspace',
callback: function($event) {