From 8c0686270556bd12b651cd40f8f77f0a169428c9 Mon Sep 17 00:00:00 2001 From: jialin Date: Fri, 12 Jun 2026 22:07:48 +0800 Subject: [PATCH] style: login placeholder --- .../instances/utils/render-instance-type.tsx | 10 ++++++++-- src/pages/login/components/local-user-form.tsx | 6 ------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/gpu-service/instances/utils/render-instance-type.tsx b/src/pages/gpu-service/instances/utils/render-instance-type.tsx index 0336eee2..24d6fc28 100644 --- a/src/pages/gpu-service/instances/utils/render-instance-type.tsx +++ b/src/pages/gpu-service/instances/utils/render-instance-type.tsx @@ -157,8 +157,14 @@ export const renderInstanceType = ( ], [ intl.formatMessage({ id: 'gpuservice.instance.disk.persistent' }), - toGB(volume?.persistentTemplate?.spec?.capacity) || - toGB(pvCapacityByName?.[volume?.persistent?.name]) || + // toGB returns '-' (a truthy string) for falsy input, so only call it + // when a value actually exists — otherwise the first branch would + // short-circuit the chain and the PV fallbacks would never run. + (volume?.persistentTemplate?.spec?.capacity && + toGB(volume.persistentTemplate.spec.capacity)) || + (volume?.persistent?.name && + pvCapacityByName?.[volume.persistent.name] && + toGB(pvCapacityByName[volume.persistent.name])) || volume?.persistent?.name ] ] diff --git a/src/pages/login/components/local-user-form.tsx b/src/pages/login/components/local-user-form.tsx index 85949298..d12da514 100644 --- a/src/pages/login/components/local-user-form.tsx +++ b/src/pages/login/components/local-user-form.tsx @@ -120,9 +120,6 @@ const LocalUserForm: React.FC = (props) => { > } style={{ height: 44 }} /> @@ -150,9 +147,6 @@ const LocalUserForm: React.FC = (props) => { autoComplete="current-password" prefix={} style={{ height: 44 }} - placeholder={intl.formatMessage({ - id: 'common.login.password.holder' - })} suffix={