Login-colour-fix-v2 (#5418)

This commit is contained in:
ConnorYoh
2026-01-09 10:30:34 +00:00
committed by GitHub
parent b4dd7afe03
commit 8394b71014
4 changed files with 18 additions and 9 deletions
@@ -25,9 +25,6 @@ export default function Footer({
const { t } = useTranslation(); const { t } = useTranslation();
const { footerInfo } = useFooterInfo(); const { footerInfo } = useFooterInfo();
console.log('[Footer] Props analyticsEnabled:', analyticsEnabled);
console.log('[Footer] Fetched footerInfo:', footerInfo);
// Use props if provided, otherwise fall back to fetched footer info // Use props if provided, otherwise fall back to fetched footer info
const finalAnalyticsEnabled = analyticsEnabled ?? footerInfo?.analyticsEnabled ?? false; const finalAnalyticsEnabled = analyticsEnabled ?? footerInfo?.analyticsEnabled ?? false;
const finalPrivacyPolicy = privacyPolicy ?? footerInfo?.privacyPolicy; const finalPrivacyPolicy = privacyPolicy ?? footerInfo?.privacyPolicy;
@@ -36,8 +33,6 @@ export default function Footer({
const finalCookiePolicy = cookiePolicy ?? footerInfo?.cookiePolicy; const finalCookiePolicy = cookiePolicy ?? footerInfo?.cookiePolicy;
const finalImpressum = impressum ?? footerInfo?.impressum; const finalImpressum = impressum ?? footerInfo?.impressum;
console.log('[Footer] Final analyticsEnabled:', finalAnalyticsEnabled);
const { showCookiePreferences } = useCookieConsent({ analyticsEnabled: finalAnalyticsEnabled, forceLightMode }); const { showCookiePreferences } = useCookieConsent({ analyticsEnabled: finalAnalyticsEnabled, forceLightMode });
// Default URLs // Default URLs
-2
View File
@@ -23,11 +23,9 @@ export function useFooterInfo() {
const fetchFooterInfo = async () => { const fetchFooterInfo = async () => {
try { try {
setLoading(true); setLoading(true);
console.log('[useFooterInfo] Fetching footer info from /api/v1/ui-data/footer-info...');
const response = await apiClient.get<FooterInfo>('/api/v1/ui-data/footer-info', { const response = await apiClient.get<FooterInfo>('/api/v1/ui-data/footer-info', {
suppressErrorToast: true, suppressErrorToast: true,
} as any); } as any);
console.log('[useFooterInfo] Footer info received:', response.data);
setFooterInfo(response.data); setFooterInfo(response.data);
setError(null); setError(null);
} catch (err) { } catch (err) {
@@ -39,7 +39,6 @@ const UpgradeBanner: React.FC = () => {
scenarioKey, scenarioKey,
} = useServerExperience(); } = useServerExperience();
const onboardingComplete = isOnboardingCompleted(); const onboardingComplete = isOnboardingCompleted();
console.log('onboardingComplete', onboardingComplete);
const [friendlyVisible, setFriendlyVisible] = useState(() => { const [friendlyVisible, setFriendlyVisible] = useState(() => {
if (typeof window === 'undefined') return false; if (typeof window === 'undefined') return false;
const lastShownRaw = window.localStorage.getItem(FRIENDLY_LAST_SEEN_KEY); const lastShownRaw = window.localStorage.getItem(FRIENDLY_LAST_SEEN_KEY);
@@ -142,7 +141,7 @@ const UpgradeBanner: React.FC = () => {
effectiveTotalUsersLoaded && effectiveTotalUsersLoaded &&
onboardingComplete, onboardingComplete,
); );
// Urgent banner should always show when over-limit // Urgent banner should always show when over-limit
const shouldEvaluateUrgent = scenario const shouldEvaluateUrgent = scenario
? Boolean(scenario && !scenarioIsFriendly) ? Boolean(scenario && !scenarioIsFriendly)
: Boolean( : Boolean(
@@ -2,6 +2,21 @@ import { useTranslation } from 'react-i18next';
import '@app/routes/authShared/auth.css'; import '@app/routes/authShared/auth.css';
import { TextInput, PasswordInput, Button } from '@mantine/core'; import { TextInput, PasswordInput, Button } from '@mantine/core';
// Force light mode styles for auth inputs
const authInputStyles = {
input: {
backgroundColor: 'var(--auth-input-bg-light-only)',
color: 'var(--auth-input-text-light-only)',
borderColor: 'var(--auth-input-border-light-only)',
'&:focus': {
borderColor: 'var(--auth-border-focus-light-only)',
},
},
label: {
color: 'var(--auth-label-text-light-only)',
},
};
interface EmailPasswordFormProps { interface EmailPasswordFormProps {
email: string email: string
password: string password: string
@@ -50,6 +65,7 @@ export default function EmailPasswordForm({
onChange={(e) => setEmail(e.target.value)} onChange={(e) => setEmail(e.target.value)}
error={fieldErrors.email} error={fieldErrors.email}
classNames={{ label: 'auth-label' }} classNames={{ label: 'auth-label' }}
styles={authInputStyles}
/> />
</div> </div>
@@ -65,6 +81,7 @@ export default function EmailPasswordForm({
onChange={(e) => setPassword(e.target.value)} onChange={(e) => setPassword(e.target.value)}
error={fieldErrors.password} error={fieldErrors.password}
classNames={{ label: 'auth-label' }} classNames={{ label: 'auth-label' }}
styles={authInputStyles}
/> />
</div> </div>
)} )}