6 Commits

Author SHA1 Message Date
Zephrynis
6bc1f8ddb6 Bump version 2025-08-07 00:39:32 +01:00
Zephrynis
9c4e19b360 Merge pull request #7 from zephrynis/4-bug-controls-on-unsaved-file-does-not-open-save-location-prompt
Show modal on Ctrl+Enter for new action in Editor
2025-08-07 00:38:41 +01:00
Zephrynis
00a8d64de0 Merge pull request #6 from zephrynis/3-bug-ctrls-save-bug
Fix save shortcut to handle uppercase 'S' key
2025-08-07 00:38:14 +01:00
Zephrynis
c65ba66980 Merge pull request #5 from zephrynis/2-i-got-this-problem-with-my-editor
Update CSS class selectors to new component names
2025-08-07 00:37:17 +01:00
64faf93a11 Show modal on Ctrl+Enter for new action in Editor
Added logic to display the modal when Ctrl+Enter is pressed and the current action is 'new', improving the user workflow for creating new items.
2025-08-06 23:59:50 +01:00
bec87d1493 Fix save shortcut to handle uppercase 'S' key
Updated the keyboard shortcut handler to use event.key.toLowerCase() for detecting 's', ensuring the save action works regardless of key case.
2025-08-06 23:53:16 +01:00
2 changed files with 5 additions and 3 deletions

View File

@@ -360,10 +360,12 @@ const Editor = () => {
// Add keyboard shortcut for Ctrl+S (Windows/Linux) and Cmd+S (macOS) // Add keyboard shortcut for Ctrl+S (Windows/Linux) and Cmd+S (macOS)
useEffect(() => { useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => { const handleKeyDown = (event: KeyboardEvent) => {
if ((event.ctrlKey || event.metaKey) && event.key === 's') { if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 's') {
event.preventDefault(); event.preventDefault();
if (action === 'edit') { if (action === 'edit') {
save(); save();
} else if (action === 'new') {
setModalVisible(true);
} }
} }
}; };

View File

@@ -2,7 +2,7 @@ info:
name: "PteroMonaco" name: "PteroMonaco"
identifier: "pteromonaco" identifier: "pteromonaco"
description: "Replaces the regular pterodactyl file editor with Monaco" description: "Replaces the regular pterodactyl file editor with Monaco"
version: "1.1" version: "1.2"
target: "beta-2024-12" target: "beta-2024-12"
author: "Zephrynis" author: "Zephrynis"
icon: "icon.png" icon: "icon.png"
@@ -13,4 +13,4 @@ admin:
dashboard: dashboard:
css: "style.css" css: "style.css"
components: "components" components: "components"