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
+8 -24
View File
@@ -60,7 +60,6 @@ const getEmptyServer = () => ({
* @param {string} props.error - Текст ошибки для отображения
*/
function ServerModal({ show, mode = 'add', server, onSave, onClose, error: externalError }) {
const modalRef = useRef(null);
const initializedRef = useRef(false);
const [localServer, setLocalServer] = useState(getEmptyServer());
const [customProvider, setCustomProvider] = useState('');
@@ -114,25 +113,7 @@ function ServerModal({ show, mode = 'add', server, onSave, onClose, error: exter
}
}, [show, server, isEditMode]);
/**
* Управление Bootstrap modal
*/
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;
/**
* Обработчик изменения поля
@@ -196,7 +177,9 @@ function ServerModal({ show, mode = 'add', server, onSave, onClose, error: exter
};
return (
<div className="modal" tabIndex="-1" ref={modalRef}>
<>
<div className="modal-backdrop show" onClick={onClose} />
<div className="modal show d-block" tabIndex="-1">
<div className="modal-dialog modal-lg">
<div className="modal-content">
<div className="modal-header">
@@ -213,7 +196,7 @@ function ServerModal({ show, mode = 'add', server, onSave, onClose, error: exter
</>
)}
</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>
<form onSubmit={handleSubmit}>
@@ -512,7 +495,7 @@ function ServerModal({ show, mode = 'add', server, onSave, onClose, error: exter
</div>
<div className="modal-footer">
<button type="button" className="btn btn-secondary" data-bs-dismiss="modal">
<button type="button" className="btn btn-secondary" onClick={onClose}>
Отмена
</button>
<button type="submit" className="btn btn-primary d-flex align-items-center">
@@ -532,7 +515,8 @@ function ServerModal({ show, mode = 'add', server, onSave, onClose, error: exter
</form>
</div>
</div>
</div>
</div>
</>
);
}