mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
feat: show firefox-compatible command palette shortcut alias (#7825)
This commit is contained in:
parent
1d71f84515
commit
3e334a67ed
4 changed files with 11 additions and 8 deletions
|
@ -60,8 +60,8 @@ const shortcutMap: Record<ShortcutName, string[]> = {
|
|||
clearCanvas: [getShortcutKey("CtrlOrCmd+Delete")],
|
||||
imageExport: [getShortcutKey("CtrlOrCmd+Shift+E")],
|
||||
commandPalette: [
|
||||
getShortcutKey("CtrlOrCmd+Shift+P"),
|
||||
getShortcutKey("CtrlOrCmd+/"),
|
||||
getShortcutKey("CtrlOrCmd+Shift+P"),
|
||||
],
|
||||
cut: [getShortcutKey("CtrlOrCmd+X")],
|
||||
copy: [getShortcutKey("CtrlOrCmd+C")],
|
||||
|
|
|
@ -3755,8 +3755,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
) {
|
||||
this.setToast({
|
||||
message: t("commandPalette.shortcutHint", {
|
||||
shortcutOne: getShortcutFromShortcutName("commandPalette"),
|
||||
shortcutTwo: getShortcutFromShortcutName("commandPalette", 1),
|
||||
shortcut: getShortcutFromShortcutName("commandPalette"),
|
||||
}),
|
||||
});
|
||||
event.preventDefault();
|
||||
|
|
|
@ -281,10 +281,14 @@ export const HelpDialog = ({ onClose }: { onClose?: () => void }) => {
|
|||
/>
|
||||
<Shortcut
|
||||
label={t("commandPalette.title")}
|
||||
shortcuts={[
|
||||
getShortcutFromShortcutName("commandPalette"),
|
||||
getShortcutFromShortcutName("commandPalette", 1),
|
||||
]}
|
||||
shortcuts={
|
||||
isFirefox
|
||||
? [getShortcutFromShortcutName("commandPalette")]
|
||||
: [
|
||||
getShortcutFromShortcutName("commandPalette"),
|
||||
getShortcutFromShortcutName("commandPalette", 1),
|
||||
]
|
||||
}
|
||||
/>
|
||||
</ShortcutIsland>
|
||||
<ShortcutIsland
|
||||
|
|
|
@ -560,6 +560,6 @@
|
|||
"noMatch": "No matching commands..."
|
||||
},
|
||||
"itemNotAvailable": "Command is not available...",
|
||||
"shortcutHint": "For Command palette, use {{shortcutOne}} or {{shortcutTwo}}"
|
||||
"shortcutHint": "For Command palette, use {{shortcut}}"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue