tooltips: Fix hotkey-hint CSS class reuse.

The "hotkey-hint" class name used internally in
d66f2d900f conflicted with the
preexisting class name for hotkey hints into popovers, introduced in
80ff3d8da5.

Given that the new class is for a styling of hotkey hints designed for
use in tooltips, it was a bad name anyway, so just rename it to
tooltip-hotkey-hint. We rename the related cluster of variable names
to match this.
This commit is contained in:
Tim Abbott
2023-02-08 12:40:48 -08:00
parent d2ea65da10
commit b9fc5da350
13 changed files with 27 additions and 27 deletions

View File

@@ -106,13 +106,13 @@ Handlebars.registerHelper(
Handlebars.registerHelper("numberFormat", (number) => number.toLocaleString());
Handlebars.registerHelper("hotkey_hints", (...hotkeys) => {
Handlebars.registerHelper("tooltip_hotkey_hints", (...hotkeys) => {
hotkeys.pop(); // Handlebars options
let hotkey_hints = "";
common.adjust_mac_tooltip_keys(hotkeys);
for (const hotkey of hotkeys) {
hotkey_hints += `<span class="hotkey-hint">${hotkey}</span>`;
hotkey_hints += `<span class="tooltip-hotkey-hint">${hotkey}</span>`;
}
const result = `<span class="hotkey-hints">${hotkey_hints}</span>`;
const result = `<span class="tooltip-hotkey-hints">${hotkey_hints}</span>`;
return new Handlebars.SafeString(result);
});