mirror of
https://github.com/immich-app/immich.git
synced 2025-12-15 06:24:23 +03:00
refactor: remove old maintenance settings
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { MaintenanceAction, setMaintenanceMode } from '@immich/sdk';
|
||||
import { Button } from '@immich/ui';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { fade } from 'svelte/transition';
|
||||
|
||||
interface Props {
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
let { disabled = false }: Props = $props();
|
||||
|
||||
async function start() {
|
||||
try {
|
||||
await setMaintenanceMode({
|
||||
setMaintenanceModeDto: {
|
||||
action: MaintenanceAction.Start,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
handleError(error, $t('admin.maintenance_start_error'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<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={start}
|
||||
>{$t('admin.maintenance_start')}</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -7,7 +7,6 @@
|
||||
import LibrarySettings from '$lib/components/admin-settings/LibrarySettings.svelte';
|
||||
import LoggingSettings from '$lib/components/admin-settings/LoggingSettings.svelte';
|
||||
import MachineLearningSettings from '$lib/components/admin-settings/MachineLearningSettings.svelte';
|
||||
import MaintenanceSettings from '$lib/components/admin-settings/MaintenanceSettings.svelte';
|
||||
import MapSettings from '$lib/components/admin-settings/MapSettings.svelte';
|
||||
import MetadataSettings from '$lib/components/admin-settings/MetadataSettings.svelte';
|
||||
import NewVersionCheckSettings from '$lib/components/admin-settings/NewVersionCheckSettings.svelte';
|
||||
@@ -41,7 +40,6 @@
|
||||
mdiLockOutline,
|
||||
mdiMapMarkerOutline,
|
||||
mdiPaletteOutline,
|
||||
mdiRestore,
|
||||
mdiRobotOutline,
|
||||
mdiServerOutline,
|
||||
mdiSync,
|
||||
@@ -115,13 +113,6 @@
|
||||
key: 'machine-learning',
|
||||
icon: mdiRobotOutline,
|
||||
},
|
||||
{
|
||||
component: MaintenanceSettings,
|
||||
title: $t('admin.maintenance_settings'),
|
||||
subtitle: $t('admin.maintenance_settings_description'),
|
||||
key: 'maintenance',
|
||||
icon: mdiRestore,
|
||||
},
|
||||
{
|
||||
component: MapSettings,
|
||||
title: $t('admin.map_gps_settings'),
|
||||
|
||||
Reference in New Issue
Block a user