From 0b052f221702c486add1baf2f7d3fc2448d9c341 Mon Sep 17 00:00:00 2001 From: MengMengCode <227010654+MengMengCode@users.noreply.github.com> Date: Wed, 10 Jun 2026 01:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CreateContainerModal.tsx | 74 ++++++++++--------- frontend/src/components/Sidebar.tsx | 11 +-- frontend/src/pages/Routing.tsx | 22 +++--- 3 files changed, 56 insertions(+), 51 deletions(-) diff --git a/frontend/src/components/CreateContainerModal.tsx b/frontend/src/components/CreateContainerModal.tsx index 358b33e..1a207cd 100644 --- a/frontend/src/components/CreateContainerModal.tsx +++ b/frontend/src/components/CreateContainerModal.tsx @@ -511,44 +511,46 @@ export default function CreateContainerModal({ isOpen, onClose, onSuccess, exist - {/* Traffic control */} -
-
- - +
+ {/* Traffic control */} +
+
+ + +
+ {form.traffic_mode === 'total' ? ( +
+ setForm({ ...form, monthly_traffic_gb: value })} /> + GB (0=不限制) +
+ ) : ( +
+ + setForm({ ...form, traffic_in_gb: value || 0 })} /> + + + setForm({ ...form, traffic_out_gb: value || 0 })} /> + +
+ )}
- {form.traffic_mode === 'total' ? ( -
- setForm({ ...form, monthly_traffic_gb: value })} /> - GB (0=不限制) -
- ) : ( -
- - setForm({ ...form, traffic_in_gb: value || 0 })} /> - - - setForm({ ...form, traffic_out_gb: value || 0 })} /> - -
- )} -
- - setForm({ ...form, snapshot_limit: Math.max(1, Math.round(value || 1)) })} - /> - + + setForm({ ...form, snapshot_limit: Math.max(1, Math.round(value || 1)) })} + /> + +
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx index a5cbea8..d70edae 100644 --- a/frontend/src/components/Sidebar.tsx +++ b/frontend/src/components/Sidebar.tsx @@ -50,7 +50,7 @@ function LanguageIcon({ className = '' }: { className?: string }) { return ( @@ -62,7 +62,7 @@ export default function Sidebar({ collapsed, onToggle }: SidebarProps) { const location = useLocation() const { logout, isSubUser } = useAuth() const { theme, toggleTheme } = useTheme() - const { language, toggleLanguage, t } = useLanguage() + const { toggleLanguage, t } = useLanguage() const [version, setVersion] = useState('') useEffect(() => { @@ -282,10 +282,11 @@ export default function Sidebar({ collapsed, onToggle }: SidebarProps) {
diff --git a/frontend/src/pages/Routing.tsx b/frontend/src/pages/Routing.tsx index 295586e..2d6e2bd 100644 --- a/frontend/src/pages/Routing.tsx +++ b/frontend/src/pages/Routing.tsx @@ -187,9 +187,9 @@ export default function Routing() {
- } remaining={routing?.nat4.remaining || '0'} total={routing?.nat4.total || '0'} used={routing?.nat4.used || 0} label={text.remainingTotal} usedLabel={text.used} /> - } remaining={routing?.ipv4.remaining || '0'} total={routing?.ipv4.total || '0'} used={routing?.ipv4.used || 0} label={formatPoolCount(publicIPv4s.length, language)} usedLabel={text.used} /> - } remaining={formatCapacity(routing?.ipv6.remaining || '0', language)} total={formatCapacity(routing?.ipv6.total || '0', language)} used={routing?.ipv6.used || 0} label={formatDetectedPrefixCount(ipv6Prefixes.length, language)} usedLabel={text.used} /> + + +
-
+
+
+ {watermark} +
+
{title}
@@ -544,10 +547,9 @@ function CapacityCard({ title, icon, remaining, total, used, label, usedLabel }: / {total}
-
{icon}
-
{label}
-
{usedLabel} {used}
+
{label}
+
{usedLabel} {used}
) }