Desktop/remove hard requirement auth wall on desktop (#5956)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
EthanHealy01
2026-03-23 19:36:48 +00:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent 081b1ec49e
commit 2e2b55e87d
87 changed files with 1522 additions and 339 deletions
+12
View File
@@ -0,0 +1,12 @@
import HomePage from '@app/pages/HomePage';
/**
* Desktop override of Landing.
* In desktop builds, authentication is managed entirely by AppProviders,
* the DesktopOnboardingModal, and the SignInModal — never by routing to /login.
* Always render the main app; the onboarding/sign-in modals appear on top
* when authentication is required.
*/
export default function Landing() {
return <HomePage />;
}
+14
View File
@@ -0,0 +1,14 @@
import { Navigate } from 'react-router-dom';
/**
* Desktop override of the /login route.
* The legacy web login page must never appear in desktop builds — authentication
* is handled exclusively through the DesktopOnboardingModal and SignInModal.
* Any navigation to /login (e.g. from Spring Boot auth redirects) is intercepted
* here and immediately redirected to /.
* The sign-in modal is opened by the desktop httpErrorHandler before navigation
* occurs, so no additional dispatch is needed here.
*/
export default function Login() {
return <Navigate to="/" replace />;
}
@@ -0,0 +1,41 @@
import { ActionIcon } from '@mantine/core';
import CloseIcon from '@mui/icons-material/Close';
import { useLogoAssets } from '@app/hooks/useLogoAssets';
interface LoginHeaderProps {
title: string;
subtitle?: string;
centerOnly?: boolean;
onClose?: () => void;
}
/**
* Desktop override of LoginHeader.
* Renders icon + title + optional close button all in one row.
*/
export default function LoginHeader({ title, subtitle, centerOnly = false, onClose }: LoginHeaderProps) {
const { tooltipLogo } = useLogoAssets();
return (
<div className={`login-header${centerOnly ? ' login-header-centered' : ''}`} style={{ marginBottom: '2rem' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '0.75rem' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.6rem', flex: 1, minWidth: 0 }}>
<img src={tooltipLogo} alt="Stirling PDF" style={{ width: 36, height: 36, flexShrink: 0 }} />
{title && <h1 className="login-title" style={{ margin: 0 }}>{title}</h1>}
</div>
{onClose && (
<ActionIcon
onClick={onClose}
radius="md"
size={32}
variant="subtle"
style={{ flexShrink: 0, color: 'var(--text-secondary)', outline: 'none' }}
>
<CloseIcon fontSize="small" />
</ActionIcon>
)}
</div>
{subtitle && <p className="login-subtitle">{subtitle}</p>}
</div>
);
}