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")],
|
clearCanvas: [getShortcutKey("CtrlOrCmd+Delete")],
|
||||||
imageExport: [getShortcutKey("CtrlOrCmd+Shift+E")],
|
imageExport: [getShortcutKey("CtrlOrCmd+Shift+E")],
|
||||||
commandPalette: [
|
commandPalette: [
|
||||||
getShortcutKey("CtrlOrCmd+Shift+P"),
|
|
||||||
getShortcutKey("CtrlOrCmd+/"),
|
getShortcutKey("CtrlOrCmd+/"),
|
||||||
|
getShortcutKey("CtrlOrCmd+Shift+P"),
|
||||||
],
|
],
|
||||||
cut: [getShortcutKey("CtrlOrCmd+X")],
|
cut: [getShortcutKey("CtrlOrCmd+X")],
|
||||||
copy: [getShortcutKey("CtrlOrCmd+C")],
|
copy: [getShortcutKey("CtrlOrCmd+C")],
|
||||||
|
|
|
@ -3755,8 +3755,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
) {
|
) {
|
||||||
this.setToast({
|
this.setToast({
|
||||||
message: t("commandPalette.shortcutHint", {
|
message: t("commandPalette.shortcutHint", {
|
||||||
shortcutOne: getShortcutFromShortcutName("commandPalette"),
|
shortcut: getShortcutFromShortcutName("commandPalette"),
|
||||||
shortcutTwo: getShortcutFromShortcutName("commandPalette", 1),
|
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -281,10 +281,14 @@ export const HelpDialog = ({ onClose }: { onClose?: () => void }) => {
|
||||||
/>
|
/>
|
||||||
<Shortcut
|
<Shortcut
|
||||||
label={t("commandPalette.title")}
|
label={t("commandPalette.title")}
|
||||||
shortcuts={[
|
shortcuts={
|
||||||
getShortcutFromShortcutName("commandPalette"),
|
isFirefox
|
||||||
getShortcutFromShortcutName("commandPalette", 1),
|
? [getShortcutFromShortcutName("commandPalette")]
|
||||||
]}
|
: [
|
||||||
|
getShortcutFromShortcutName("commandPalette"),
|
||||||
|
getShortcutFromShortcutName("commandPalette", 1),
|
||||||
|
]
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</ShortcutIsland>
|
</ShortcutIsland>
|
||||||
<ShortcutIsland
|
<ShortcutIsland
|
||||||
|
|
|
@ -560,6 +560,6 @@
|
||||||
"noMatch": "No matching commands..."
|
"noMatch": "No matching commands..."
|
||||||
},
|
},
|
||||||
"itemNotAvailable": "Command is not available...",
|
"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