Various bug fixes

- Update CSS to permanent classes
- Ctrl+S on new file opens naming modal
- Ctrl+S with capslock saves file
This commit is contained in:
Zephrynis
2025-08-07 00:42:36 +01:00
committed by GitHub
3 changed files with 8 additions and 6 deletions

View File

@@ -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);
}
}
};

View File

@@ -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"
components: "components"

View File

@@ -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;
}
}