chore: add i18n entries for maintenance screens

This commit is contained in:
izzy 2025-11-03 11:40:32 +00:00
parent 50fdb2ab44
commit bf99f8c20b
No known key found for this signature in database
GPG key ID: 5059F398521BB0F6
4 changed files with 22 additions and 7 deletions

View file

@ -1315,6 +1315,10 @@
"loop_videos_description": "Enable to automatically loop a video in the detail viewer.",
"main_branch_warning": "You're using a development version; we strongly recommend using a release version!",
"main_menu": "Main menu",
"maintenance_description": "Immich has been put into maintenance mode.",
"maintenance_exit": "Exit maintenance mode",
"maintenance_logged_in_as": "Currently logged in as {user}",
"maintenance_title": "Temporarily Unavailable",
"make": "Make",
"manage_geolocation": "Manage location",
"manage_shared_links": "Manage shared links",
@ -1817,6 +1821,8 @@
"server_offline": "Server Offline",
"server_online": "Server Online",
"server_privacy": "Server Privacy",
"server_restarting_description": "This page will refresh momentarily.",
"server_restarting_title": "Server is restarting",
"server_stats": "Server Stats",
"server_update_available": "Server update is available",
"server_version": "Server Version",

View file

@ -1,6 +1,7 @@
<script lang="ts">
import { startMaintenance } from '@immich/sdk';
import { Button } from '@immich/ui';
import { t } from 'svelte-i18n';
import { fade } from 'svelte/transition';
interface Props {
@ -14,7 +15,7 @@
<div in:fade={{ duration: 500 }}>
<div class="ms-4 mt-4 flex items-end gap-4">
<Button shape="round" type="submit" {disabled} size="small" onclick={() => startMaintenance()}
>Enter maintenance mode</Button
>{$t('admin.maintenance_enabled_description')}</Button
>
</div>
</div>

View file

@ -1,5 +1,6 @@
<script lang="ts">
import { Modal, ModalBody } from '@immich/ui';
import { t } from 'svelte-i18n';
type Props = {
onClose: () => void;
@ -8,8 +9,8 @@
const { onClose }: Props = $props();
</script>
<Modal size="small" title="Server is restarting" {onClose} icon={false}>
<Modal size="small" title={$t('server_restarting_title')} {onClose} icon={false}>
<ModalBody>
<div class="font-medium">This page will refresh momentarily.</div>
<div class="font-medium">{$t('server_restarting_description')}</div>
</ModalBody>
</Modal>

View file

@ -3,15 +3,22 @@
import { user } from '$lib/stores/user.store';
import { endMaintenance } from '@immich/sdk';
import { Button, Heading } from '@immich/ui';
import { t } from 'svelte-i18n';
</script>
<AuthPageLayout>
<div class="flex flex-col place-items-center text-center gap-4">
<Heading size="large" color="primary" tag="h1">Temporarily Unavailable</Heading>
<p>Immich has been put into maintenance mode.</p>
<Heading size="large" color="primary" tag="h1">{$t('maintenance_title')}</Heading>
<p>{$t('maintenance_description')}</p>
{#if $user && $user.isAdmin}
<p>Currently logged in as {$user.name}</p>
<Button onclick={() => endMaintenance()}>Exit maintenance mode</Button>
<p>
{$t('maintenance_logged_in_as', {
values: {
user: $user.name,
},
})}Currently logged in as {$user.name}
</p>
<Button onclick={() => endMaintenance()}>{$t('maintenance_exit')}</Button>
{/if}
</div>
</AuthPageLayout>