mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-21 18:55:16 +02:00
fix: update save shortcut to use cmd/ctrl+Shift+S for saving in PlateEditor and FixedToolbarButtons
This commit is contained in:
parent
2c7908f733
commit
3cee59e024
2 changed files with 2 additions and 4 deletions
|
|
@ -87,15 +87,13 @@ export function PlateEditor({
|
||||||
onSaveRef.current = onSave;
|
onSaveRef.current = onSave;
|
||||||
}, [onSave]);
|
}, [onSave]);
|
||||||
|
|
||||||
// Stable Plate plugin for ⌘+S / Ctrl+S save shortcut.
|
|
||||||
// Only included when onSave is provided.
|
|
||||||
const SaveShortcutPlugin = useMemo(
|
const SaveShortcutPlugin = useMemo(
|
||||||
() =>
|
() =>
|
||||||
createPlatePlugin({
|
createPlatePlugin({
|
||||||
key: "save-shortcut",
|
key: "save-shortcut",
|
||||||
shortcuts: {
|
shortcuts: {
|
||||||
save: {
|
save: {
|
||||||
keys: [[Key.Mod, "s"]],
|
keys: [[Key.Mod, Key.Shift, "s"]],
|
||||||
handler: () => {
|
handler: () => {
|
||||||
onSaveRef.current?.();
|
onSaveRef.current?.();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ export function FixedToolbarButtons() {
|
||||||
isSaving ? (
|
isSaving ? (
|
||||||
"Saving..."
|
"Saving..."
|
||||||
) : (
|
) : (
|
||||||
<TooltipWithShortcut label="Save" keys={shortcutKeys("Mod", "S")} />
|
<TooltipWithShortcut label="Save" keys={shortcutKeys("Mod", "Shift", "S")} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
onClick={onSave}
|
onClick={onSave}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue