-
Notifications
You must be signed in to change notification settings - Fork 185
Optional Maintenance Mode #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… minimal layout gating via env flags
| // Post-maintenance loading stages | ||
| const postMaintenanceStages = [ | ||
| 'Finalizing updates...', | ||
| 'Restarting services...', | ||
| 'Loading application...', | ||
| 'Almost ready...' | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be localized in en.json
| <div class="mx-auto mb-4 h-24 w-24"> | ||
| {#if theme.current === 'dark'} | ||
| <!-- Dark theme logo --> | ||
| <svg width="100%" height="100%" viewBox="0 0 146 162" class="h-full w-full" class:animate-bounce={!isMaintenanceComplete} class:brightness-75={false} class:sepia={false} class:hue-rotate-[320deg]={false} class:saturate-150={false}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this svg is duplicated/should be external, not hardcoded like this in the HTML.
| {#if isMaintenanceComplete} | ||
| <div class="mt-4 text-center"> | ||
| <p class="text-green-600 dark:text-green-400 font-medium"> | ||
| Systems are back online |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more strings that need i18n
| isActive, | ||
| status, | ||
| progress, | ||
| timeRemaining, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to send this timeRemaining string in the API, clients can just build this themselves.
| ); | ||
| // Minimal maintenance gating derived from server-provided flags and PUBLIC env | ||
| const maintenanceActive = $derived.by(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why we are deriving things again from public env, when we do this in the server.ts? we should do it in a single place
This is an optional maintenance mode that can run manually or automatically depending on
.envFollowing settings are supported:
.envThese are supported in
.env