From 18614bd6ea163de402cd195ca010b75c4df604fb Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Wed, 13 May 2026 23:33:50 +0200 Subject: [PATCH] feat(tabs): collapse settings and xray tab bars to evenly-spread icons On phones the five Settings tabs and six Xray tabs overflowed the viewport. Now the tab labels are stripped (v-if="!isMobile"), the nav-list stretches to full width via display:flex + width:100%, and each tab claims an equal share with flex:1 1 0 so the icons spread across the row instead of bunching. Icons bumped to 18px with a tooltip carrying the original label for discoverability. --- frontend/src/pages/settings/SettingsPage.vue | 61 ++++++++++++++++---- frontend/src/pages/xray/XrayPage.vue | 61 +++++++++++++++++--- 2 files changed, 104 insertions(+), 18 deletions(-) diff --git a/frontend/src/pages/settings/SettingsPage.vue b/frontend/src/pages/settings/SettingsPage.vue index 3401e328..052ae727 100644 --- a/frontend/src/pages/settings/SettingsPage.vue +++ b/frontend/src/pages/settings/SettingsPage.vue @@ -228,39 +228,49 @@ onBeforeUnmount(() => { - + @@ -333,4 +343,33 @@ onBeforeUnmount(() => { .tab-pane { padding-top: 20px; } + +.icons-only :deep(.ant-tabs-nav) { + margin-bottom: 8px; +} + +.icons-only :deep(.ant-tabs-nav-wrap) { + width: 100%; +} + +.icons-only :deep(.ant-tabs-nav-list) { + display: flex; + width: 100%; +} + +.icons-only :deep(.ant-tabs-tab) { + flex: 1 1 0; + justify-content: center; + margin: 0; + padding: 10px 0; +} + +.icons-only :deep(.ant-tabs-tab .anticon) { + margin: 0; + font-size: 18px; +} + +.icons-only :deep(.ant-tabs-nav-operations) { + display: none; +} diff --git a/frontend/src/pages/xray/XrayPage.vue b/frontend/src/pages/xray/XrayPage.vue index 6137d0c0..ba04c59f 100644 --- a/frontend/src/pages/xray/XrayPage.vue +++ b/frontend/src/pages/xray/XrayPage.vue @@ -301,10 +301,13 @@ onBeforeUnmount(() => { - + { @@ -322,7 +328,10 @@ onBeforeUnmount(() => { { { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; } + +.icons-only :deep(.ant-tabs-nav) { + margin-bottom: 8px; +} + +.icons-only :deep(.ant-tabs-nav-wrap) { + width: 100%; +} + +.icons-only :deep(.ant-tabs-nav-list) { + display: flex; + width: 100%; +} + +.icons-only :deep(.ant-tabs-tab) { + flex: 1 1 0; + justify-content: center; + margin: 0; + padding: 10px 0; +} + +.icons-only :deep(.ant-tabs-tab .anticon) { + margin: 0; + font-size: 18px; +} + +.icons-only :deep(.ant-tabs-nav-operations) { + display: none; +}