From f6ffbcb87823b03c8c600e7786d3c306ef3df1ea Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 25 May 2026 14:08:41 +0200 Subject: [PATCH] refactor(frontend): move default content-area padding to page-shell.css After page-shell.css landed, six of the seven panel pages still kept an identical `.X-page .content-area { padding: 24px }` desktop rule, plus three of them kept an identical `padding: 8px` mobile rule. Hoist both defaults into page-shell.css under a single 6-page selector group and delete the per-page copies. What stays page-specific: - IndexPage keeps its mobile override (padding 12px + padding-top: 64px for the fixed drawer handle clearance). - ApiDocsPage keeps its tighter desktop padding (16px) and its own mobile padding-top: 56px. Settings .ldap-no-inbounds also switches from #999 to var(--ant-color-text-tertiary) for theme adaptation. --- frontend/src/pages/clients/ClientsPage.css | 10 ---------- frontend/src/pages/inbounds/InboundsPage.css | 10 ---------- frontend/src/pages/index/IndexPage.css | 4 ---- frontend/src/pages/nodes/NodesPage.css | 10 ---------- frontend/src/pages/settings/SettingsPage.css | 6 +----- frontend/src/pages/xray/XrayPage.css | 4 ---- frontend/src/styles/page-shell.css | 17 +++++++++++++++++ 7 files changed, 18 insertions(+), 43 deletions(-) diff --git a/frontend/src/pages/clients/ClientsPage.css b/frontend/src/pages/clients/ClientsPage.css index 1c52262d..7f7b3510 100644 --- a/frontend/src/pages/clients/ClientsPage.css +++ b/frontend/src/pages/clients/ClientsPage.css @@ -1,13 +1,3 @@ -.clients-page .content-area { - padding: 24px; -} - -@media (max-width: 768px) { - .clients-page .content-area { - padding: 8px; - } -} - .clients-page .ant-pagination-options-size-changer, .clients-page .ant-pagination-options-size-changer .ant-select-selector { min-width: 100px; diff --git a/frontend/src/pages/inbounds/InboundsPage.css b/frontend/src/pages/inbounds/InboundsPage.css index 20416b50..ed6dde7a 100644 --- a/frontend/src/pages/inbounds/InboundsPage.css +++ b/frontend/src/pages/inbounds/InboundsPage.css @@ -1,13 +1,3 @@ -.inbounds-page .content-area { - padding: 24px; -} - -@media (max-width: 768px) { - .inbounds-page .content-area { - padding: 8px; - } -} - .summary-card { padding: 16px; } diff --git a/frontend/src/pages/index/IndexPage.css b/frontend/src/pages/index/IndexPage.css index 9fb8ed51..5efca336 100644 --- a/frontend/src/pages/index/IndexPage.css +++ b/frontend/src/pages/index/IndexPage.css @@ -1,7 +1,3 @@ -.index-page .content-area { - padding: 24px; -} - @media (max-width: 768px) { .index-page .content-area { padding: 12px; diff --git a/frontend/src/pages/nodes/NodesPage.css b/frontend/src/pages/nodes/NodesPage.css index e5328830..0e157a3c 100644 --- a/frontend/src/pages/nodes/NodesPage.css +++ b/frontend/src/pages/nodes/NodesPage.css @@ -1,13 +1,3 @@ -.nodes-page .content-area { - padding: 24px; -} - -@media (max-width: 768px) { - .nodes-page .content-area { - padding: 8px; - } -} - .nodes-page .summary-card { padding: 16px; } diff --git a/frontend/src/pages/settings/SettingsPage.css b/frontend/src/pages/settings/SettingsPage.css index 37d73ffd..caa7d346 100644 --- a/frontend/src/pages/settings/SettingsPage.css +++ b/frontend/src/pages/settings/SettingsPage.css @@ -1,7 +1,3 @@ -.settings-page .content-area { - padding: 24px; -} - .settings-page .conf-alert { margin-bottom: 10px; } @@ -52,6 +48,6 @@ .ldap-no-inbounds { margin-top: 6px; - color: #999; + color: var(--ant-color-text-tertiary); font-size: 12px; } diff --git a/frontend/src/pages/xray/XrayPage.css b/frontend/src/pages/xray/XrayPage.css index a86065ad..48832166 100644 --- a/frontend/src/pages/xray/XrayPage.css +++ b/frontend/src/pages/xray/XrayPage.css @@ -1,7 +1,3 @@ -.xray-page .content-area { - padding: 24px; -} - .xray-page .header-row { display: flex; flex-wrap: wrap; diff --git a/frontend/src/styles/page-shell.css b/frontend/src/styles/page-shell.css index f9f58236..50f6229a 100644 --- a/frontend/src/styles/page-shell.css +++ b/frontend/src/styles/page-shell.css @@ -60,6 +60,23 @@ background: transparent; } +.index-page .content-area, +.clients-page .content-area, +.inbounds-page .content-area, +.xray-page .content-area, +.settings-page .content-area, +.nodes-page .content-area { + padding: 24px; +} + +@media (max-width: 768px) { + .clients-page .content-area, + .inbounds-page .content-area, + .nodes-page .content-area { + padding: 8px; + } +} + .loading-spacer { min-height: calc(100vh - 120px); }