Modules
Status pages
403, 404 and 500 errors, maintenance and coming soon, all on the same split screen.
config/status.config.ts
View in the demo
error.vue (403, 404, 500 and others), /maintenance and /coming-soon render AppStatusScreen, the split screen of the auth pages: an AppBrandPanel with the code or a headline set giant over your logo mark, and the tagline and a mono detail line in its footer strip, next to a content column. Below lg the panel becomes a band on top.
Files
File | Role |
|---|---|
error.vue | Every error code. |
pages/error/[status].vue | Throws 403, 404 or 500 so you can preview error.vue. |
pages/maintenance.vue | The maintenance window with progress. |
pages/coming-soon.vue | A countdown with a waitlist form. |
config/status.config.ts | Links, the status page URL, support email and windows. |
utils/status.ts | closestPage() and flattenNavigation(), unit tested. |
Configuration
STATUS_QUICK_LINKS
Quick links of the 404.
const STATUS_QUICK_LINKS: string[]
STATUS_PAGE_URL
Your public status page, linked from the 500.
const STATUS_PAGE_URL: "https://status.example.com"
SUPPORT_EMAIL
The support address.
const SUPPORT_EMAIL: "[email protected]"
MAINTENANCE_WINDOW_MINUTES
Length of the maintenance window.
const MAINTENANCE_WINDOW_MINUTES: { elapsed: number; remaining: number; }LAUNCH_OFFSET_MS
Time until the launch of the coming soon page.
const LAUNCH_OFFSET_MS: number
Rules
Pure functions in utils/, unit tested in tests/unit/. Statuses and segments are derived from the stored data, never stored themselves.
closestPage()
The closest menu page.
closestPage(path: string, pages: StatusPageLink[]): StatusPageLink | undefined
How it works
- The 404 suggests the closest menu page, opens the command palette and lists
STATUS_QUICK_LINKS. - The 403 offers request access and switch account. The 500 shows a copyable request id, retry and
STATUS_PAGE_URL. - Maintenance and coming soon use the
blanklayout and arepublic: true, so they need no session. colorofAppStatusScreenisprimary,secondary,errororaccent.