fa50a45e84
CI / Build & Quality Checks (push) Failing after 5m12s
Prettier: auto-formatted 103 files to fix baseline. Prettier check in CI is now a hard gate (removed continue-on-error). Brotli: installed libnginx-mod-http-brotli-filter/static. Enabled in nginx with brotli_static on for pre-compressed assets and comp_level 6. Sentry releases: deploy script now exports VITE_APP_VERSION=<git-short-sha> before building so each Sentry release maps to an exact commit. CI also passes github.sha as VITE_APP_VERSION. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.8 KiB
TypeScript
48 lines
1.8 KiB
TypeScript
import React, { ReactNode } from 'react';
|
|
import { Box, Dialog, config, Text, Button, Spinner } from 'folds';
|
|
import { SpecVersionsLoader } from '../../components/SpecVersionsLoader';
|
|
import { SpecVersionsProvider } from '../../hooks/useSpecVersions';
|
|
import { SplashScreen } from '../../components/splash-screen';
|
|
|
|
export function SpecVersions({ baseUrl, children }: { baseUrl: string; children: ReactNode }) {
|
|
return (
|
|
<SpecVersionsLoader
|
|
baseUrl={baseUrl}
|
|
fallback={() => (
|
|
<SplashScreen>
|
|
<Box direction="Column" grow="Yes" alignItems="Center" justifyContent="Center" gap="400">
|
|
<Spinner variant="Secondary" size="600" />
|
|
<Text>Connecting to server</Text>
|
|
</Box>
|
|
</SplashScreen>
|
|
)}
|
|
error={(err, retry, ignore) => (
|
|
<SplashScreen>
|
|
<Box direction="Column" grow="Yes" alignItems="Center" justifyContent="Center" gap="400">
|
|
<Dialog>
|
|
<Box direction="Column" gap="400" style={{ padding: config.space.S400 }}>
|
|
<Text>
|
|
Unable to connect to the homeserver. The homeserver or your internet connection
|
|
may be down.
|
|
</Text>
|
|
<Button variant="Critical" onClick={retry}>
|
|
<Text as="span" size="B400">
|
|
Retry
|
|
</Text>
|
|
</Button>
|
|
<Button variant="Critical" onClick={ignore} fill="Soft">
|
|
<Text as="span" size="B400">
|
|
Continue
|
|
</Text>
|
|
</Button>
|
|
</Box>
|
|
</Dialog>
|
|
</Box>
|
|
</SplashScreen>
|
|
)}
|
|
>
|
|
{(versions) => <SpecVersionsProvider value={versions}>{children}</SpecVersionsProvider>}
|
|
</SpecVersionsLoader>
|
|
);
|
|
}
|