refactor: Remove Tabler JS import from index.html and move it to main.jsx for better module management; update handleEditModalSave function in ServerManager for clarity
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 13m38s

This commit is contained in:
2025-07-10 10:21:44 +07:00
parent 9a109a0bf2
commit 0c7c717be8
3 changed files with 10 additions and 14 deletions
+1 -3
View File
@@ -16,9 +16,7 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="module"> <!-- Удалён импорт Tabler JS, теперь он импортируется в main.jsx -->
import '/node_modules/@tabler/core/dist/js/tabler.min.js';
</script>
<script type="module" src="/src/main.jsx"></script> <script type="module" src="/src/main.jsx"></script>
</body> </body>
</html> </html>
+8 -10
View File
@@ -87,8 +87,8 @@ function ServerManager() {
setEditModalServer(updatedServer); setEditModalServer(updatedServer);
}; };
const handleEditModalSave = () => { const handleEditModalSave = (updatedServer) => {
setServers(servers.map(s => s.ip === editModalServer.ip ? { ...editModalServer } : s)); setServers(servers.map(s => s.ip === updatedServer.ip ? { ...updatedServer } : s));
setEditModalOpen(false); setEditModalOpen(false);
setEditModalServer(null); setEditModalServer(null);
}; };
@@ -491,14 +491,12 @@ function ServerManager() {
</div> </div>
{/* Delete Modal */} {/* Delete Modal */}
{showDeleteModal && ( <DeleteServerModal
<DeleteServerModal show={showDeleteModal}
show={showDeleteModal} server={serverToDelete}
server={serverToDelete} onDelete={executeDelete}
onDelete={executeDelete} onClose={() => setShowDeleteModal(false)}
onClose={() => setShowDeleteModal(false)} />
/>
)}
{/* Edit Server Modal */} {/* Edit Server Modal */}
<EditServerModal <EditServerModal
+1 -1
View File
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
import App from './App.jsx' import App from './App.jsx'
import './index.css' import './index.css'
import '@tabler/core/dist/css/tabler.min.css' import '@tabler/core/dist/css/tabler.min.css'
import '@tabler/core/dist/js/tabler.min.js' import '@tabler/core/dist/js/tabler.min.js';
// import 'bootstrap/dist/css/bootstrap.min.css'; // Удалено, Tabler уже включает Bootstrap // import 'bootstrap/dist/css/bootstrap.min.css'; // Удалено, Tabler уже включает Bootstrap
ReactDOM.createRoot(document.getElementById('root')).render( ReactDOM.createRoot(document.getElementById('root')).render(