mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore: wip
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@
|
||||
"lodash-es": "^4.17.21",
|
||||
"luxon": "^3.4.4",
|
||||
"maplibre-gl": "^5.6.2",
|
||||
"orchestration-ui": "0.1.68",
|
||||
"orchestration-ui": "0.1.69",
|
||||
"pmtiles": "^4.3.0",
|
||||
"qrcode": "^1.5.4",
|
||||
"simple-icons": "^16.0.0",
|
||||
|
||||
@@ -12,11 +12,22 @@
|
||||
import { featureFlagsManager } from '$lib/managers/feature-flags-manager.svelte';
|
||||
import { Route } from '$lib/route';
|
||||
import { getGlobalActions } from '$lib/services/app.service';
|
||||
import { handleSetMaintenanceMode } from '$lib/services/maintenance.service';
|
||||
import { mediaQueryManager } from '$lib/stores/media-query-manager.svelte';
|
||||
import { notificationManager } from '$lib/stores/notification-manager.svelte';
|
||||
import { sidebarStore } from '$lib/stores/sidebar.svelte';
|
||||
import { MaintenanceAction } from '@immich/sdk';
|
||||
import { ActionButton, Button, IconButton, Logo } from '@immich/ui';
|
||||
import { mdiBellBadge, mdiBellOutline, mdiMagnify, mdiMenu, mdiTrayArrowUp } from '@mdi/js';
|
||||
import {
|
||||
mdiBellBadge,
|
||||
mdiBellOutline,
|
||||
mdiDeleteSweep,
|
||||
mdiMagnify,
|
||||
mdiMenu,
|
||||
mdiProgressWrench,
|
||||
mdiTrayArrowUp,
|
||||
} from '@mdi/js';
|
||||
import { sdk } from 'orchestration-ui';
|
||||
import { onMount } from 'svelte';
|
||||
import { t } from 'svelte-i18n';
|
||||
import ThemeButton from '../theme-button.svelte';
|
||||
@@ -102,6 +113,55 @@
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<!-- TODO-DEV -->
|
||||
{#if authManager.user.isAdmin}
|
||||
<Button
|
||||
leadingIcon={mdiProgressWrench}
|
||||
onclick={() => handleSetMaintenanceMode({ action: MaintenanceAction.Start })}
|
||||
class="hidden lg:flex"
|
||||
variant="ghost"
|
||||
size="medium"
|
||||
color="danger"
|
||||
>{$t('admin.maintenance_start')}
|
||||
</Button>
|
||||
<IconButton
|
||||
color="danger"
|
||||
shape="round"
|
||||
variant="ghost"
|
||||
size="medium"
|
||||
onclick={() => handleSetMaintenanceMode({ action: MaintenanceAction.Start })}
|
||||
title={$t('admin.maintenance_start')}
|
||||
aria-label={$t('admin.maintenance_start')}
|
||||
icon={mdiProgressWrench}
|
||||
class="lg:hidden"
|
||||
/>
|
||||
<Button
|
||||
leadingIcon={mdiDeleteSweep}
|
||||
onclick={async () => {
|
||||
await sdk.resetOrchestrator();
|
||||
globalThis.location.reload();
|
||||
}}
|
||||
class="hidden lg:flex"
|
||||
variant="ghost"
|
||||
size="medium"
|
||||
color="danger">Reset Backups</Button
|
||||
>
|
||||
<IconButton
|
||||
color="danger"
|
||||
shape="round"
|
||||
variant="ghost"
|
||||
size="medium"
|
||||
onclick={async () => {
|
||||
await sdk.resetOrchestrator();
|
||||
globalThis.location.reload();
|
||||
}}
|
||||
title="Reset Backups"
|
||||
aria-label="Reset Backups"
|
||||
icon={mdiDeleteSweep}
|
||||
class="lg:hidden"
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if !page.url.pathname.includes('/admin') && onUploadClick}
|
||||
<Button
|
||||
leadingIcon={mdiTrayArrowUp}
|
||||
|
||||
@@ -30,6 +30,11 @@
|
||||
action: MaintenanceAction.End,
|
||||
});
|
||||
|
||||
const startRestore = () =>
|
||||
handleSetMaintenanceMode({
|
||||
action: MaintenanceAction.SelectDatabaseRestore,
|
||||
});
|
||||
|
||||
const error = $derived(
|
||||
$status?.error
|
||||
?.split('\n')
|
||||
@@ -89,7 +94,10 @@
|
||||
},
|
||||
})}
|
||||
</p>
|
||||
<Button onclick={end}>{$t('maintenance_end')}</Button>
|
||||
<div class="flex gap-2">
|
||||
<Button color="secondary" onclick={startRestore}>{$t('maintenance_restore_from_backup')}</Button>
|
||||
<Button onclick={end}>{$t('maintenance_end')}</Button>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import RestoreFlowDetectInstall from './RestoreFlowDetectInstall.svelte';
|
||||
import RestoreFlowIntro from './RestoreFlowIntro.svelte';
|
||||
import RestoreFlowSelectBackup from './RestoreFlowSelectBackup.svelte';
|
||||
import { OnboardingGate } from 'orchestration-ui';
|
||||
import { ImmichOnboardingRestoreFlow } from 'orchestration-ui';
|
||||
|
||||
type Props = {
|
||||
end: () => void;
|
||||
@@ -28,7 +28,7 @@
|
||||
{#if stage === 0}
|
||||
<RestoreFlowIntro flowToYucca={() => (stage = 1)} flowToDatabase={() => (stage = 2)} {end} />
|
||||
{:else if stage === 1}
|
||||
<OnboardingGate flow="immich-restore" onExit={previous} onFinish={() => stage++}></OnboardingGate>
|
||||
<ImmichOnboardingRestoreFlow onExit={previous} onFinish={() => stage++} />
|
||||
{:else if stage === 2}
|
||||
<RestoreFlowDetectInstall {next} previous={() => (stage = 0)} />
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user