diff --git a/components/Editor.tsx b/components/Editor.tsx index b2597c7..962fcc2 100644 --- a/components/Editor.tsx +++ b/components/Editor.tsx @@ -360,10 +360,12 @@ 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(); + } else if (action === 'new') { + setModalVisible(true); } } }; 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" 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