From 6b8e060d540fe3b01c74997c1f6db3981ecaac89 Mon Sep 17 00:00:00 2001 From: shats Date: Wed, 11 Feb 2026 16:00:48 +0700 Subject: [PATCH] feat(MikrotikBackupsManager): add large modal for displaying backup content with improved UI --- frontend/src/MikrotikBackupsManager.jsx | 82 +++++++++++++------------ 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/frontend/src/MikrotikBackupsManager.jsx b/frontend/src/MikrotikBackupsManager.jsx index 77c1edc..a7e66ac 100644 --- a/frontend/src/MikrotikBackupsManager.jsx +++ b/frontend/src/MikrotikBackupsManager.jsx @@ -7,7 +7,7 @@ import TableSkeleton from './components/TableSkeleton.jsx'; import EmptyState from './components/EmptyState.jsx'; import Tooltip from './components/Tooltip.jsx'; import DataTable from './components/DataTable.jsx'; -import { FullscreenModal } from './components/Modal.jsx'; +import { LargeModal, FullscreenModal } from './components/Modal.jsx'; import { countryToFlag } from './utils/serverUtils.js'; import { IconRefresh, @@ -138,6 +138,7 @@ function MikrotikBackupsManager() { const [viewConfigKey, setViewConfigKey] = useState(null); const [viewConfigText, setViewConfigText] = useState(''); const [viewLoading, setViewLoading] = useState(false); + const [viewModalOpen, setViewModalOpen] = useState(false); const [diffResult, setDiffResult] = useState(null); const [diffLoading, setDiffLoading] = useState(false); const [diffModalOpen, setDiffModalOpen] = useState(false); @@ -382,6 +383,7 @@ function MikrotikBackupsManager() { setViewLoading(true); setViewConfigKey(key); setViewConfigText(''); + setViewModalOpen(true); const res = await api.get('/mikrotik/backups/item', { params: { key } }); setViewConfigText(res.data?.config || ''); } catch (err) { @@ -852,45 +854,49 @@ function MikrotikBackupsManager() { - {viewConfigKey && ( -
-
-
-
-
-
Содержимое бэкапа
-
- {viewConfigKey} -
-
-
- -
-
-
- {viewLoading ? ( - - ) : ( -
-                    {viewConfigText || '# Нет данных для отображения'}
-                  
- )} -
+ { + setViewModalOpen(false); + }} + title="Содержимое бэкапа MikroTik" + footer={( +
+
+ {viewConfigKey || 'Бэкап не выбран'} +
+
+ +
-
- )} + )} + > + {viewLoading ? ( + + ) : ( +
+            {viewConfigText || '# Нет данных для отображения'}
+          
+ )} +