From 05d9aa53ef796746c777b8f7cbc9fa6616fad478 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Thu, 26 Jun 2025 04:29:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20style:=20Hide=20registration=20l?= =?UTF-8?q?ink=20when=20Self-Use=20Mode=20is=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Add conditional rendering (`!status.self_use_mode_enabled`) to LoginForm • Suppress “Don't have an account? Register” CTA in self-hosted scenarios • Keeps UI clean and prevents unintended user sign-ups under self-use mode • No impact on regular multi-user deployments --- web/src/components/auth/LoginForm.js | 32 ++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/web/src/components/auth/LoginForm.js b/web/src/components/auth/LoginForm.js index 5128728c..85d22dfc 100644 --- a/web/src/components/auth/LoginForm.js +++ b/web/src/components/auth/LoginForm.js @@ -358,9 +358,19 @@ const LoginForm = () => { -
- {t('没有账户?')} {t('注册')} -
+ {!status.self_use_mode_enabled && ( +
+ + {t('没有账户?')}{' '} + + {t('注册')} + + +
+ )} @@ -453,9 +463,19 @@ const LoginForm = () => { )} -
- {t('没有账户?')} {t('注册')} -
+ {!status.self_use_mode_enabled && ( +
+ + {t('没有账户?')}{' '} + + {t('注册')} + + +
+ )}