hotkey: Update deprecation notice for '*' hotkey.

This PR updates the shortcut of the deprecation notice
for '*' hotkey. On macOS, it should be 'Cmd + s' instead
of 'Ctrl'.
This commit is contained in:
Akash Nimare
2018-09-20 13:33:13 +05:30
committed by Tim Abbott
parent a0451b692f
commit dbb2d28ad6

View File

@@ -134,10 +134,11 @@ exports.get_hotkey_deprecation_notice = function (originalHotkey, replacementHot
var shown_deprecation_notices = []; var shown_deprecation_notices = [];
exports.maybe_show_deprecation_notice = function (key) { exports.maybe_show_deprecation_notice = function (key) {
var message; var message;
var isCmdOrCtrl = /Mac/i.test(navigator.userAgent) ? "Cmd" : "Ctrl";
if (key === 'C') { if (key === 'C') {
message = exports.get_hotkey_deprecation_notice('C', 'x'); message = exports.get_hotkey_deprecation_notice('C', 'x');
} else if (key === '*') { } else if (key === '*') {
message = exports.get_hotkey_deprecation_notice('*', 'Ctrl + s'); message = exports.get_hotkey_deprecation_notice("*", isCmdOrCtrl + " + s");
} else { } else {
blueslip.error("Unexpected deprecation notice for hotkey:", key); blueslip.error("Unexpected deprecation notice for hotkey:", key);
return; return;