refactor(frontend): consolidate margin utility classes into one stylesheet

Page CSS files each carried their own copies of the same atomic margin
utilities (.mt-4, .mt-8, .mb-12, .ml-8, .my-10, ...). The definitions
were identical everywhere they appeared, with each file holding only
the subset it happened to need.

Move all of them into a single styles/utils.css imported once from
main.tsx, and delete the per-page copies from InboundFormModal,
CustomGeoSection, PanelUpdateModal, VersionModal, BasicsTab, NordModal,
OutboundFormModal, and WarpModal. The classes are available globally
on the panel app; login.tsx and subpage.tsx entries do not consume any
of them so they stay untouched.
This commit is contained in:
MHSanaei 2026-05-25 13:47:57 +02:00
parent 08caf53ba6
commit 21e1be43bd
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A
10 changed files with 16 additions and 67 deletions

View file

@ -2,6 +2,7 @@ import { createRoot } from 'react-dom/client';
import { RouterProvider } from 'react-router-dom';
import { message } from 'antd';
import 'antd/dist/reset.css';
import '@/styles/utils.css';
import { setupAxios } from '@/api/axios-init';
import { readyI18n } from '@/i18n/react';

View file

@ -1,10 +1,3 @@
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.random-icon {
margin-left: 4px;
cursor: pointer;

View file

@ -1,7 +1,3 @@
.mb-10 {
margin-bottom: 10px;
}
.toolbar {
display: flex;
align-items: center;

View file

@ -1,7 +1,3 @@
.mb-12 {
margin-bottom: 12px;
}
.version-list {
width: 100%;
border: 1px solid var(--ant-color-border-secondary);

View file

@ -1,7 +1,3 @@
.mb-12 {
margin-bottom: 12px;
}
.version-list {
width: 100%;
border: 1px solid var(--ant-color-border-secondary);

View file

@ -1,7 +1,3 @@
.mb-12 {
margin-bottom: 12px;
}
.hint-alert {
text-align: center;
}

View file

@ -26,26 +26,6 @@
margin: 0;
}
.mt-8 {
margin-top: 8px;
}
.mt-10 {
margin-top: 10px;
}
.mt-20 {
margin-top: 20px;
}
.my-10 {
margin: 10px 0;
}
.ml-8 {
margin-left: 8px;
}
.server-row {
display: inline-flex;
align-items: center;

View file

@ -10,14 +10,6 @@
margin-left: 8px;
}
.ml-8 {
margin-left: 8px;
}
.mb-8 {
margin-bottom: 8px;
}
.item-heading {
display: flex;
align-items: center;

View file

@ -26,22 +26,6 @@
margin: 0;
}
.my-8 {
margin: 8px 0;
}
.mt-8 {
margin-top: 8px;
}
.my-10 {
margin: 10px 0;
}
.ml-8 {
margin-left: 8px;
}
.license-actions {
display: flex;
align-items: center;

View file

@ -0,0 +1,15 @@
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.ml-8 { margin-left: 8px; }
.my-8 { margin: 8px 0; }
.my-10 { margin: 10px 0; }