fix: use correct shortcut label in sidebar according to OS

This commit is contained in:
sokumon 2025-12-28 13:56:03 +05:30
parent c98cfd0c49
commit 26d4d738fa
2 changed files with 2 additions and 2 deletions

View file

@ -248,7 +248,7 @@ frappe.ui.Sidebar = class Sidebar {
type: "Button",
id: "navbar-modal-search",
suffix: {
keyboard_shortcut: "Ctrl K",
keyboard_shortcut: "Ctrl+K",
},
class: "navbar-search-bar hidden",
});

View file

@ -84,7 +84,7 @@ frappe.ui.sidebar_item.TypeLink = class SidebarItem {
}
get_shortcut_html(shortcut) {
if (frappe.utils.is_mac()) {
shortcut = shortcut.replace("Ctrl", "⌘");
shortcut = shortcut.replace("Ctrl+", "⌘");
}
return `<span class="sidebar-item-suffix keyboard-shortcut">${shortcut}</span>`;
}