From bec87d149329c36fb424379791531002f6e258bd Mon Sep 17 00:00:00 2001 From: Zephrynis Date: Wed, 6 Aug 2025 23:53:16 +0100 Subject: [PATCH 1/4] 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. --- components/Editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Editor.tsx b/components/Editor.tsx index b2597c7..613336c 100644 --- a/components/Editor.tsx +++ b/components/Editor.tsx @@ -360,7 +360,7 @@ const Editor = () => { // Add keyboard shortcut for Ctrl+S (Windows/Linux) and Cmd+S (macOS) useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { - if ((event.ctrlKey || event.metaKey) && event.key === 's') { + if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 's') { event.preventDefault(); if (action === 'edit') { save(); From 64faf93a111d55db22cd5fc81b6765bbbe371211 Mon Sep 17 00:00:00 2001 From: Zephrynis Date: Wed, 6 Aug 2025 23:59:50 +0100 Subject: [PATCH 2/4] 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. --- components/Editor.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Editor.tsx b/components/Editor.tsx index b2597c7..61d0a8d 100644 --- a/components/Editor.tsx +++ b/components/Editor.tsx @@ -364,6 +364,8 @@ const Editor = () => { event.preventDefault(); if (action === 'edit') { save(); + } else if (action === 'new') { + setModalVisible(true); } } }; From c5cb756811d91b08b6942bf6a9c2666d61c63018 Mon Sep 17 00:00:00 2001 From: Zephrynis Date: Thu, 7 Aug 2025 00:20:35 +0100 Subject: [PATCH 3/4] Update CSS class selectors to new component names --- style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/style.css b/style.css index e5f7744..ded1011 100644 --- a/style.css +++ b/style.css @@ -1,4 +1,4 @@ -.igexuH, .eDlcZT { +.FileEditContainer___StyledDiv3-sc-48rzpu-7, .FileEditContainer___StyledDiv4-sc-48rzpu-8 { display: none !important; } @@ -7,12 +7,12 @@ min-height: 16rem; } -.cDkCmT { +.Button__ButtonStyle-sc-1qu1gou-0 { flex: 1 1 0%; } @media (min-width: 640px) { - .cDkCmT { + .Button__ButtonStyle-sc-1qu1gou-0 { flex: none; } } \ No newline at end of file From 6bc1f8ddb6682fdfeb2d42ba9175a0337a380e99 Mon Sep 17 00:00:00 2001 From: Zephrynis <132010650+zephrynis@users.noreply.github.com> Date: Thu, 7 Aug 2025 00:39:32 +0100 Subject: [PATCH 4/4] Bump version --- conf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.yml b/conf.yml index 5cec020..2f863f7 100644 --- a/conf.yml +++ b/conf.yml @@ -2,7 +2,7 @@ info: name: "PteroMonaco" identifier: "pteromonaco" description: "Replaces the regular pterodactyl file editor with Monaco" - version: "1.1" + version: "1.2" target: "beta-2024-12" author: "Zephrynis" icon: "icon.png" @@ -13,4 +13,4 @@ admin: dashboard: css: "style.css" - components: "components" \ No newline at end of file + components: "components"