[FIX] web: add Shortcut CTRL+K in user menu
Purpose: Make the command palette easier to discover - indeed, unless you know about CTRL+K, it's difficult to know you can use that elsewhere than the home screen. Solution: Add CTRL+K next to the Shortcut menu in the user menu. closes odoo/odoo#106820 Tackid: 3074492 X-original-commit: 536ea340ec1347a4a7598b5b51e2f2801521973f Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Georis François (fge) <fge@odoo.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Component, markup } from "@odoo/owl";
|
||||
import { isMacOS } from "@web/core/browser/feature_detection";
|
||||
import { escape } from "@web/core/utils/strings";
|
||||
import { session } from "@web/session";
|
||||
import { browser } from "../../core/browser/browser";
|
||||
import { registry } from "../../core/registry";
|
||||
import { session } from "@web/session";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
function documentationItem(env) {
|
||||
const documentationURL = "https://www.odoo.com/documentation/master";
|
||||
@@ -47,7 +47,12 @@ function shortCutsItem(env) {
|
||||
type: "item",
|
||||
id: "shortcuts",
|
||||
hide: env.isSmall,
|
||||
description: env._t("Shortcuts"),
|
||||
description: markup(
|
||||
`<div class="d-flex align-items-center justify-content-between">
|
||||
<span>${escape(env._t("Shortcuts"))}</span>
|
||||
<span class="fw-bold">${isMacOS() ? "CMD" : "CTRL"}+K</span>
|
||||
</div>`
|
||||
),
|
||||
callback: () => {
|
||||
env.services.command.openMainPalette({ FooterComponent: ShortcutsFooterComponent });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user