compose: Use an icon for the mac command hotkey hint.

This commit is contained in:
evykassirer
2025-01-03 23:59:12 -08:00
committed by Evy Kassirer
parent 2e5ad46c74
commit ae805763bc
4 changed files with 29 additions and 1 deletions

View File

@@ -157,7 +157,12 @@ Handlebars.registerHelper("popover_hotkey_hints", (...args) => {
common.adjust_mac_hotkey_hints(hotkeys);
const shift_hotkey_exists = common.adjust_shift_hotkey(hotkeys);
for (const hotkey of hotkeys) {
hotkey_hints += `<span class="popover-menu-hotkey-hint">${hotkey}</span>`;
// The ⌘ symbol isn't vertically centered, so we use an icon.
if (hotkey === "⌘") {
hotkey_hints += `<span class="popover-menu-hotkey-hint"><i class="zulip-icon zulip-icon-mac-command" aria-hidden="true"></i></span>`;
} else {
hotkey_hints += `<span class="popover-menu-hotkey-hint">${hotkey}</span>`;
}
}
if (shift_hotkey_exists) {
return new Handlebars.SafeString(