Update frontend dependencies, enhance Vite configuration, and refactor components
Publish Docker image / build-and-push (push) Successful in 2m24s

- Added new dependencies including @base-ui/react, @fontsource-variable/geist, and tailwindcss for improved UI and styling.
- Updated Vite configuration to include path aliasing for easier imports.
- Refactored App.jsx to implement a theme context and improved routing structure.
- Enhanced various components (e.g., ConfirmDialog, DataTable) to utilize new UI components and improve user experience.
- Cleaned up CSS imports and ensured proper styling integration.

Made-with: Cursor
This commit is contained in:
2026-04-26 13:48:59 +07:00
parent a9a7e98be5
commit 58ee09b70e
51 changed files with 7409 additions and 1715 deletions
@@ -1,33 +1,17 @@
import { useState, useEffect, useRef } from 'react';
import { useState, useEffect } from 'react';
import { IconLink, IconDownload } from '@tabler/icons-react';
/**
* Модальное окно генератора ссылок для сервера
*/
function LinkGeneratorModal({ show, server, urlSettings, onUrlSettingsChange, onGenerateUrl, onCopyToClipboard, onClose }) {
const modalRef = useRef(null);
const [localUrlSettings, setLocalUrlSettings] = useState(urlSettings);
useEffect(() => {
setLocalUrlSettings(urlSettings);
}, [urlSettings]);
useEffect(() => {
const modalEl = modalRef.current;
if (window.Tabler && window.Tabler.Modal && modalEl) {
const modalInstance = window.Tabler.Modal.getOrCreateInstance(modalEl);
if (show) {
modalInstance.show();
} else {
modalInstance.hide();
}
const handler = () => onClose && onClose();
modalEl.addEventListener('hide.bs.modal', handler);
return () => {
modalEl.removeEventListener('hide.bs.modal', handler);
};
}
}, [show, onClose]);
if (!show) return null;
const handleSettingChange = (key, value) => {
const updated = { ...localUrlSettings, [key]: value };
@@ -43,7 +27,9 @@ function LinkGeneratorModal({ show, server, urlSettings, onUrlSettingsChange, on
const generatedUrl = server ? onGenerateUrl(server) : '';
return (
<div className="modal modal-lg" tabIndex="-1" ref={modalRef}>
<>
<div className="modal-backdrop show" onClick={onClose} />
<div className="modal modal-lg show d-block" tabIndex="-1">
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header">
@@ -51,7 +37,7 @@ function LinkGeneratorModal({ show, server, urlSettings, onUrlSettingsChange, on
<IconLink className="icon me-2" />
Генератор ссылок для {server?.ip}
</h5>
<button type="button" className="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" className="btn-close" onClick={onClose} aria-label="Close"></button>
</div>
<div className="modal-body">
<div className="row g-2">
@@ -165,7 +151,7 @@ function LinkGeneratorModal({ show, server, urlSettings, onUrlSettingsChange, on
</div>
</div>
<div className="modal-footer">
<button type="button" className="btn btn-secondary d-flex align-items-center" data-bs-dismiss="modal">
<button type="button" className="btn btn-secondary d-flex align-items-center" onClick={onClose}>
<span className="fw-bold">Закрыть</span>
</button>
<button type="button" className="btn btn-primary d-flex align-items-center" onClick={handleSaveSettings}>
@@ -174,7 +160,8 @@ function LinkGeneratorModal({ show, server, urlSettings, onUrlSettingsChange, on
</div>
</div>
</div>
</div>
</div>
</>
);
}