Tweak save shortcut.

This commit is contained in:
Christian Bastian
2024-07-28 08:53:27 -04:00
parent fcb2c426f4
commit c40a9a8f83
2 changed files with 25 additions and 21 deletions

View File

@@ -53,7 +53,7 @@ Designed to support desktop, mobile and multi-screen devices.
- View file info and metadata.
- Rename, move or **permanently** remove a model and all of it's related files.
- Read, edit and save notes. (Saved as a `.txt` file beside the model).
- `Ctrl+s` to save a note when the textarea is in focus.
- `Ctrl+s` or `⌘+S` to save a note when the textarea is in focus.
- Autosave can be enabled in settings. (Note: Once the model info view is closed, the undo history is lost.)
- Change or remove a model's preview image.
- View training tags and use the random tag generator to generate prompt ideas.

View File

@@ -2716,26 +2716,30 @@ class ModelInfo {
},
});
new KeyComboListener(
["ControlLeft", "KeyS"],
saveDebounce,
notes,
);
new KeyComboListener(
["ControlRight", "KeyS"],
saveDebounce,
notes,
);
new KeyComboListener(
["MetaLeft", "KeyS"],
saveDebounce,
notes,
);
new KeyComboListener(
["MetaRight", "KeyS"],
saveDebounce,
notes,
);
if (navigator.userAgent.includes("Mac")) {
new KeyComboListener(
["MetaLeft", "KeyS"],
saveDebounce,
notes,
);
new KeyComboListener(
["MetaRight", "KeyS"],
saveDebounce,
notes,
);
}
else {
new KeyComboListener(
["ControlLeft", "KeyS"],
saveDebounce,
notes,
);
new KeyComboListener(
["ControlRight", "KeyS"],
saveDebounce,
notes,
);
}
this.elements.notes = notes;
this.#savedNotesValue = noteText;