From 9002eb81898447cbc0379c0ac9fd72cf2ee35b4e Mon Sep 17 00:00:00 2001 From: OpenShift Cherrypick Robot Date: Wed, 8 Oct 2025 21:39:49 +0200 Subject: [PATCH] [redhat-3.15] ui: show custom REGISTRY_TITLE on login page (PROJQUAY-9522) (#4335) ui: show custom REGISTRY_TITLE on login page (PROJQUAY-9461) the old UI shows this value in the login/sign in button Signed-off-by: Brady Pratt Co-authored-by: Brady Pratt --- web/src/components/header/HeaderToolbar.tsx | 8 +++++++- web/src/routes/Signin/Signin.tsx | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/web/src/components/header/HeaderToolbar.tsx b/web/src/components/header/HeaderToolbar.tsx index 8a3810997..d288226b1 100644 --- a/web/src/components/header/HeaderToolbar.tsx +++ b/web/src/components/header/HeaderToolbar.tsx @@ -42,6 +42,7 @@ import SunIcon from '@patternfly/react-icons/dist/esm/icons/sun-icon'; import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; import {ThemePreference, useTheme} from 'src/contexts/ThemeContext'; +import {useQuayConfig} from 'src/hooks/UseQuayConfig'; export function HeaderToolbar({toggleDrawer}: {toggleDrawer: () => void}) { const [isDropdownOpen, setIsDropdownOpen] = useState(false); @@ -52,6 +53,7 @@ export function HeaderToolbar({toggleDrawer}: {toggleDrawer: () => void}) { const queryClient = useQueryClient(); const {user} = useCurrentUser(); const [err, setErr] = useState(); + const quayConfig = useQuayConfig(); const onDropdownToggle = () => { setIsDropdownOpen((prev) => !prev); @@ -220,7 +222,11 @@ export function HeaderToolbar({toggleDrawer}: {toggleDrawer: () => void}) { /> ); - const signInButton = ; + const signInButtonText = quayConfig?.config?.REGISTRY_TITLE_SHORT + ? `Sign in to ${quayConfig.config.REGISTRY_TITLE_SHORT}` + : 'Sign In'; + + const signInButton = ; // Toggle between old UI and new UI const [isChecked, setIsChecked] = React.useState(true); diff --git a/web/src/routes/Signin/Signin.tsx b/web/src/routes/Signin/Signin.tsx index 2926382d0..b1ee56c5f 100644 --- a/web/src/routes/Signin/Signin.tsx +++ b/web/src/routes/Signin/Signin.tsx @@ -70,6 +70,10 @@ export function Signin() { /> ); + const loginButtonLabel = quayConfig?.config?.REGISTRY_TITLE + ? `Sign in to ${quayConfig.config.REGISTRY_TITLE}` + : 'Sign in'; + const loginForm = ( setRememberMe(v)} onLoginButtonClick={(e) => onLoginButtonClick(e)} - loginButtonLabel="Log in" + loginButtonLabel={loginButtonLabel} /> );