refactor(webui): clarify shared controls and status feedback

This commit is contained in:
2026-07-20 20:03:42 +02:00
parent 344fc0077f
commit c50ce58ad8
9 changed files with 211 additions and 195 deletions

View File

@@ -23,9 +23,10 @@ type Props = {
onSettingsChange: (settings: ApiSettings) => void;
onAuthChange: (auth: AuthUpdate | null, accessToken?: string) => void;
maintenanceMode?: {enabled: boolean;message?: string | null;};
backendReachable?: boolean;
};
export default function Titlebar({ settings, auth, onAuthChange, maintenanceMode }: Props) {
export default function Titlebar({ settings, auth, onAuthChange, maintenanceMode, backendReachable = true }: Props) {
const navigate = useGuardedNavigate();
const { requestNavigation } = useUnsavedChanges();
const [accountOpen, setAccountOpen] = useState(false);
@@ -161,7 +162,15 @@ export default function Titlebar({ settings, auth, onAuthChange, maintenanceMode
return (
<header className="titlebar">
{maintenanceMode?.enabled &&
{!backendReachable ?
<div
className="backend-offline-topbar-alert"
role="status"
aria-live="polite"
title="System not reachable / offline!">
System not reachable / offline!
</div> :
maintenanceMode?.enabled &&
<button
type="button"
className="maintenance-topbar-link"