@futo-org/backups-orchestrator-ui 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/backends/BackendItem.svelte +17 -13
- package/dist/components/backends/BackendsList.svelte +4 -3
- package/dist/components/backends/dialogs/CreateLocalBackendModal.svelte +6 -5
- package/dist/components/backends/dialogs/OAuthDeviceFlowModal.svelte +10 -5
- package/dist/components/backends/dialogs/SelectBackendModal.svelte +7 -6
- package/dist/components/backups/BackupItem.svelte +13 -12
- package/dist/components/backups/BackupStatus.svelte +74 -44
- package/dist/components/backups/BackupStatus.svelte.d.ts +2 -0
- package/dist/components/backups/BackupTaskMonitor.svelte +6 -0
- package/dist/components/{dashboard/DashboardInstall.svelte.d.ts → backups/BackupTaskMonitor.svelte.d.ts} +3 -3
- package/dist/components/backups/BackupsList.svelte +6 -5
- package/dist/components/backups/dialogs/ConfigureRepositoryModal.svelte +9 -8
- package/dist/components/backups/dialogs/CreateRepositoryModal.svelte +8 -4
- package/dist/components/backups/dialogs/ImportRepositoryModal.svelte +5 -4
- package/dist/components/backups/dialogs/ReconfigureRepositoryBackendModal.svelte +3 -3
- package/dist/components/backups/dialogs/RestoreSnapshotModal.svelte +20 -23
- package/dist/components/backups/dialogs/RollbackSnapshotModal.svelte +9 -8
- package/dist/components/backups/dialogs/SelectRepositoryModal.svelte +13 -7
- package/dist/components/backups/dialogs/ViewStatusModal.svelte +53 -19
- package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +135 -112
- package/dist/components/backups/run-history/RepositoryRunHistory.svelte +4 -3
- package/dist/components/backups/run-history/RepositoryRunHistoryItem.svelte +32 -12
- package/dist/components/backups/run-history/RepositoryRunHistoryPage.svelte +16 -14
- package/dist/components/backups/run-history/RunHistoryModal.svelte +5 -1
- package/dist/components/backups/snapshots-list/RepositorySnapshotsList.svelte +5 -4
- package/dist/components/backups/snapshots-list/RepositorySnapshotsListItem.svelte +15 -5
- package/dist/components/backups/snapshots-list/RepositorySnapshotsPage.svelte +7 -6
- package/dist/components/backups/snapshots-list/SnapshotsListModal.svelte +5 -1
- package/dist/components/dashboard/DashboardAvgBackupTime.svelte +4 -1
- package/dist/components/dashboard/DashboardBackupHealth.svelte +74 -64
- package/dist/components/dashboard/DashboardCurrentUsage.svelte +7 -1
- package/dist/components/dashboard/DashboardDailyBackupTime.svelte +4 -1
- package/dist/components/dashboard/DashboardPage.svelte +51 -23
- package/dist/components/dashboard/DashboardRecentBackups.svelte +9 -4
- package/dist/components/dashboard/DashboardTotalStored.svelte +9 -2
- package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte +5 -3
- package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte.d.ts +1 -0
- package/dist/components/integrations/immich/ImmichBackupsPage.svelte +1 -5
- package/dist/components/integrations/immich/ImmichBackupsPage.svelte.d.ts +0 -2
- package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte +18 -15
- package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte.d.ts +1 -0
- package/dist/components/integrations/immich/ImmichDatabaseDumpAlert.svelte +6 -5
- package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +44 -37
- package/dist/components/integrations/immich/ImmichManageBackupPage.svelte +5 -2
- package/dist/components/integrations/immich/ImmichOnboardingRestoreFlow.svelte +43 -22
- package/dist/components/integrations/immich/ImmichOnboardingSetupFlow.svelte +72 -73
- package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +54 -45
- package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte +57 -63
- package/dist/components/integrations/immich/settings/ImmichSettingsSchedule.svelte +16 -15
- package/dist/components/integrations/immich/settings/ImmichSettingsStorage.svelte +27 -19
- package/dist/components/onboarding/OnboardingBootstrapError.svelte +5 -4
- package/dist/components/onboarding/OnboardingLogin.svelte +8 -6
- package/dist/components/onboarding/RecoveryKeyDisplay.svelte +20 -12
- package/dist/components/onboarding/SampleOnboarding.svelte +40 -38
- package/dist/components/onboarding/dialogs/BackupsRecoveryKeyModal.svelte +4 -3
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow.svelte +2 -1
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte +16 -8
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +30 -19
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +10 -4
- package/dist/components/onboarding/steps/OnboardingStep1FinishSetup.svelte +11 -11
- package/dist/components/onboarding/steps/OnboardingStep2ConnectAccount.svelte +13 -12
- package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte +18 -6
- package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte.d.ts +1 -0
- package/dist/components/onboarding/steps/OnboardingStep4FirstBackup.svelte +11 -11
- package/dist/components/onboarding/steps/OnboardingStepBackupServices.svelte +52 -0
- package/dist/components/onboarding/steps/OnboardingStepBackupServices.svelte.d.ts +7 -0
- package/dist/components/onboarding/steps/OnboardingStepChooseStorage.svelte +82 -0
- package/dist/components/onboarding/steps/OnboardingStepChooseStorage.svelte.d.ts +6 -0
- package/dist/components/onboarding/steps/OnboardingStepConfirmRecoveryKey.svelte +62 -0
- package/dist/components/onboarding/steps/OnboardingStepConfirmRecoveryKey.svelte.d.ts +9 -0
- package/dist/components/onboarding/steps/OnboardingStepImportRecoveryKey.svelte +42 -0
- package/dist/components/onboarding/steps/OnboardingStepImportRecoveryKey.svelte.d.ts +8 -0
- package/dist/components/onboarding/steps/OnboardingStepLayout.svelte +15 -9
- package/dist/components/onboarding/steps/OnboardingStepLayout.svelte.d.ts +2 -2
- package/dist/components/onboarding/steps/OnboardingStepModal.svelte +19 -0
- package/dist/components/onboarding/steps/OnboardingStepModal.svelte.d.ts +11 -0
- package/dist/components/onboarding/steps/OnboardingStepTelemetry.svelte +44 -0
- package/dist/components/onboarding/steps/OnboardingStepTelemetry.svelte.d.ts +7 -0
- package/dist/components/onboarding/upsell/UpsellBackupFeaturesGrid.svelte +11 -14
- package/dist/components/onboarding/upsell/UpsellBackupFeaturesGrid.svelte.d.ts +2 -17
- package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte +5 -13
- package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte.d.ts +0 -2
- package/dist/components/onboarding/upsell/UpsellFrequentlyAskedQuestions.svelte +4 -3
- package/dist/components/onboarding/upsell/UpsellFutoBackupsBadge.svelte +3 -2
- package/dist/components/onboarding/upsell/UpsellHowItWorks.svelte +11 -11
- package/dist/components/onboarding/upsell/UpsellModal.svelte +7 -13
- package/dist/components/onboarding/upsell/UpsellModal.svelte.d.ts +0 -1
- package/dist/components/onboarding/upsell/UpsellPage.svelte +3 -5
- package/dist/components/onboarding/upsell/UpsellPage.svelte.d.ts +0 -2
- package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte +13 -18
- package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte.d.ts +0 -1
- package/dist/components/schedules/RepositoryPicker.svelte +32 -13
- package/dist/components/schedules/ScheduleItem.svelte +6 -5
- package/dist/components/schedules/ScheduleList.svelte +4 -3
- package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +17 -5
- package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +20 -5
- package/dist/components/settings/SettingsBackends.svelte +3 -2
- package/dist/components/settings/SettingsBilling.svelte +14 -12
- package/dist/components/settings/SettingsNotifications.svelte +11 -10
- package/dist/components/test/ImmichTestUi.svelte +62 -44
- package/dist/components/test/TestUi.svelte +53 -69
- package/dist/components/test/dashboard/BackupHealth.svelte +6 -7
- package/dist/components/test/immich/MockImmichHideBackupsReminder.svelte +3 -2
- package/dist/components/test/immich/MockImmichHideBackupsReminder.svelte.d.ts +17 -2
- package/dist/components/ui/Accordion.svelte +43 -30
- package/dist/components/ui/Accordion.svelte.d.ts +1 -0
- package/dist/components/ui/IconTile.svelte +27 -0
- package/dist/components/ui/IconTile.svelte.d.ts +10 -0
- package/dist/components/ui/ListToolbar.svelte +1 -0
- package/dist/components/ui/PageLayout.svelte +4 -3
- package/dist/components/ui/Pagination.svelte +4 -3
- package/dist/components/ui/PathListField.svelte +25 -7
- package/dist/components/ui/PathPickerField.svelte +18 -6
- package/dist/components/ui/PathPickerModal.svelte +40 -19
- package/dist/components/ui/Section.svelte +26 -0
- package/dist/components/ui/Section.svelte.d.ts +9 -0
- package/dist/components/ui/SkipLink.svelte +19 -0
- package/dist/components/ui/SkipLink.svelte.d.ts +6 -0
- package/dist/components/ui/StackList.svelte +4 -13
- package/dist/components/ui/StackListItem.svelte +6 -17
- package/dist/components/ui/StackListItem.svelte.d.ts +3 -3
- package/dist/components/ui/VisualisationGauge.svelte +18 -11
- package/dist/components/ui/VisualisationGauge.svelte.d.ts +1 -0
- package/dist/components/ui/VisualisationSegmentedBar.svelte +14 -22
- package/dist/components/ui/VisualisationSegmentedBar.svelte.d.ts +0 -3
- package/dist/components/util/DeviceFlowAction.svelte +3 -2
- package/dist/components/util/DeviceFlowCode.svelte +10 -8
- package/dist/components/util/RelativeTime.svelte +2 -1
- package/dist/i18n.d.ts +3 -0
- package/dist/i18n.js +13 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/locales/en-XA.d.ts +2 -0
- package/dist/locales/en-XA.js +1 -0
- package/dist/locales/en-XA.po +2345 -0
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/en.po +2345 -0
- package/dist/options.d.ts +1 -0
- package/dist/options.js +1 -0
- package/dist/services/backend.service.d.ts +2 -1
- package/dist/services/backend.service.js +6 -5
- package/dist/services/config.service.d.ts +12 -1
- package/dist/services/config.service.js +22 -1
- package/dist/services/deviceFlow.service.svelte.js +6 -5
- package/dist/services/filesystem.service.js +2 -1
- package/dist/services/immich.integration.service.d.ts +4 -2
- package/dist/services/immich.integration.service.js +12 -8
- package/dist/services/integrations.service.js +4 -3
- package/dist/services/log.service.svelte.js +9 -3
- package/dist/services/onboarding.service.js +8 -7
- package/dist/services/repository.service.d.ts +2 -1
- package/dist/services/repository.service.js +19 -18
- package/dist/services/runHistory.service.d.ts +11 -1
- package/dist/services/runHistory.service.js +48 -6
- package/dist/services/schedule.service.d.ts +2 -1
- package/dist/services/schedule.service.js +18 -17
- package/dist/services/session.service.js +2 -1
- package/dist/services/snapshot.service.d.ts +2 -1
- package/dist/services/snapshot.service.js +15 -14
- package/dist/services/task.service.js +3 -2
- package/dist/utils/clipboard.d.ts +1 -0
- package/dist/utils/clipboard.js +11 -0
- package/dist/utils/focus.d.ts +12 -0
- package/dist/utils/focus.js +34 -0
- package/dist/utils/format.js +10 -8
- package/dist/utils/handle-error.js +2 -1
- package/package.json +14 -7
- package/dist/components/dashboard/DashboardInstall.svelte +0 -15
- package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte +0 -68
- package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte.d.ts +0 -8
- package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte +0 -57
- package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte.d.ts +0 -8
- package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte +0 -60
- package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte.d.ts +0 -7
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Stack,
|
|
10
10
|
} from "@immich/ui";
|
|
11
11
|
import ConfigureRepositoryModal from "./ConfigureRepositoryModal.svelte";
|
|
12
|
+
import { t } from "svelte-i18n-lingui";
|
|
12
13
|
|
|
13
14
|
type Props = {
|
|
14
15
|
onClose: () => void;
|
|
@@ -40,18 +41,21 @@
|
|
|
40
41
|
</script>
|
|
41
42
|
|
|
42
43
|
<FormModal
|
|
43
|
-
title=
|
|
44
|
+
title={$t`Create A New Backup`}
|
|
44
45
|
disabled={name.length === 0 || mutation.isPending}
|
|
45
46
|
{onSubmit}
|
|
46
47
|
{onClose}
|
|
47
48
|
>
|
|
48
49
|
<Stack gap={4}>
|
|
49
|
-
<Field
|
|
50
|
+
<Field
|
|
51
|
+
label={$t`Name`}
|
|
52
|
+
description={$t`A memorable name for this backup`}
|
|
53
|
+
>
|
|
50
54
|
<Input bind:value={name} />
|
|
51
55
|
</Field>
|
|
52
56
|
<Field
|
|
53
|
-
label=
|
|
54
|
-
description=
|
|
57
|
+
label={$t`Write once (WORM)`}
|
|
58
|
+
description={$t`Prevent anything being deleted`}
|
|
55
59
|
>
|
|
56
60
|
<Checkbox bind:checked={worm} />
|
|
57
61
|
</Field>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
} from "../../../services/repository.service";
|
|
8
8
|
import { FormModal, modalManager, Text } from "@immich/ui";
|
|
9
9
|
import ConfigureRepositoryModal from "./ConfigureRepositoryModal.svelte";
|
|
10
|
+
import { t } from "svelte-i18n-lingui";
|
|
10
11
|
|
|
11
12
|
type Props = {
|
|
12
13
|
onClose: () => void;
|
|
@@ -42,17 +43,17 @@
|
|
|
42
43
|
</script>
|
|
43
44
|
|
|
44
45
|
<FormModal
|
|
45
|
-
title={
|
|
46
|
-
submitText=
|
|
46
|
+
title={$t({ message: "Import {name}", values: { name: repository.name } })}
|
|
47
|
+
submitText={$t`Import`}
|
|
47
48
|
disabled={check.data?.readable !== true || mutation.isPending}
|
|
48
49
|
{onSubmit}
|
|
49
50
|
{onClose}
|
|
50
51
|
>
|
|
51
52
|
<Suspense query={check}>
|
|
52
53
|
{#if check.data?.readable}
|
|
53
|
-
<Text>Repository is readable and accessible
|
|
54
|
+
<Text>{$t`Repository is readable and accessible!`}</Text>
|
|
54
55
|
{:else}
|
|
55
|
-
<Text>Can't read repository
|
|
56
|
+
<Text>{$t`Can't read repository.`}</Text>
|
|
56
57
|
{/if}
|
|
57
58
|
</Suspense>
|
|
58
59
|
</FormModal>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type { LocalRepositoryDto } from "../../../fetch-client";
|
|
4
4
|
import { useReconfigureRepositoryPrimaryBackend } from "../../../services/repository.service";
|
|
5
5
|
import { Text } from "@immich/ui";
|
|
6
|
+
import { t } from "svelte-i18n-lingui";
|
|
6
7
|
|
|
7
8
|
type Props = {
|
|
8
9
|
repository: LocalRepositoryDto;
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
</script>
|
|
23
24
|
|
|
24
25
|
<SelectBackendModal
|
|
25
|
-
title=
|
|
26
|
+
title={$t`Select new service`}
|
|
26
27
|
disabled={reconfigure.isPending}
|
|
27
28
|
onSelect={onSelectBackend}
|
|
28
29
|
onCancel={onClose}
|
|
@@ -33,8 +34,7 @@
|
|
|
33
34
|
{/if}
|
|
34
35
|
|
|
35
36
|
<Text
|
|
36
|
-
>You may reset and reconfigure your backups by selecting one of the
|
|
37
|
-
following.</Text
|
|
37
|
+
>{$t`You may reset and reconfigure your backups by selecting one of the following.`}</Text
|
|
38
38
|
>
|
|
39
39
|
{/snippet}
|
|
40
40
|
</SelectBackendModal>
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
useRestoreSnapshot,
|
|
8
8
|
} from "../../../services/snapshot.service";
|
|
9
9
|
import {
|
|
10
|
+
Field,
|
|
10
11
|
FormModal,
|
|
11
12
|
Heading,
|
|
12
|
-
HStack,
|
|
13
13
|
modalManager,
|
|
14
14
|
Stack,
|
|
15
15
|
Switch,
|
|
16
|
-
Text,
|
|
17
16
|
} from "@immich/ui";
|
|
18
17
|
import { SvelteSet } from "svelte/reactivity";
|
|
19
18
|
import ViewStatusModal from "./ViewStatusModal.svelte";
|
|
19
|
+
import { t } from "svelte-i18n-lingui";
|
|
20
20
|
|
|
21
21
|
type Props = {
|
|
22
22
|
repository: string;
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<FormModal
|
|
60
|
-
title=
|
|
61
|
-
submitText=
|
|
60
|
+
title={$t`Restore Backup`}
|
|
61
|
+
submitText={$t`Restore`}
|
|
62
62
|
disabled={(!inPlace && !target.trim()) || mutation.isPending}
|
|
63
63
|
{onSubmit}
|
|
64
64
|
{onClose}
|
|
@@ -66,40 +66,37 @@
|
|
|
66
66
|
<Stack gap={5}>
|
|
67
67
|
<PathListField
|
|
68
68
|
paths={include}
|
|
69
|
-
addLabel=
|
|
70
|
-
manageLabel=
|
|
71
|
-
pickerTitle=
|
|
72
|
-
pickerDescription=
|
|
69
|
+
addLabel={$t`Add more files`}
|
|
70
|
+
manageLabel={$t`Select files instead`}
|
|
71
|
+
pickerTitle={$t`Files to restore`}
|
|
72
|
+
pickerDescription={$t`Pick the files and folders to restore. Leave empty to restore everything.`}
|
|
73
73
|
handleGetListing={(path) =>
|
|
74
74
|
handleGetSnapshotListing(repository, snapshot, path)}
|
|
75
75
|
>
|
|
76
|
-
{#snippet label()}Files to restore{/snippet}
|
|
77
|
-
{#snippet empty()}Restoring all files and folders
|
|
76
|
+
{#snippet label()}{$t`Files to restore`}{/snippet}
|
|
77
|
+
{#snippet empty()}{$t`Restoring all files and folders.`}{/snippet}
|
|
78
78
|
</PathListField>
|
|
79
79
|
|
|
80
80
|
<Stack gap={4}>
|
|
81
|
-
<Heading class="px-1" size="tiny">Options</Heading>
|
|
81
|
+
<Heading tag="h3" class="px-1" size="tiny">{$t`Options`}</Heading>
|
|
82
82
|
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Restore files to where they were originally.
|
|
88
|
-
</Text>
|
|
89
|
-
</Stack>
|
|
83
|
+
<Field
|
|
84
|
+
label={$t`In-place restore`}
|
|
85
|
+
description={$t`Restore files to where they were originally.`}
|
|
86
|
+
>
|
|
90
87
|
<Switch bind:checked={inPlace} />
|
|
91
|
-
</
|
|
88
|
+
</Field>
|
|
92
89
|
|
|
93
90
|
{#if !inPlace}
|
|
94
91
|
<PathPickerField
|
|
95
92
|
bind:value={target}
|
|
96
93
|
placeholder="/path/to/restore/into"
|
|
97
|
-
pickerTitle=
|
|
98
|
-
pickerDescription=
|
|
94
|
+
pickerTitle={$t`Choose target folder`}
|
|
95
|
+
pickerDescription={$t`Pick the folder to restore files into.`}
|
|
99
96
|
>
|
|
100
|
-
{#snippet title()}Target{/snippet}
|
|
97
|
+
{#snippet title()}{$t`Target`}{/snippet}
|
|
101
98
|
{#snippet description()}
|
|
102
|
-
Where do you want this backup restored to
|
|
99
|
+
{$t`Where do you want this backup restored to?`}
|
|
103
100
|
{/snippet}
|
|
104
101
|
</PathPickerField>
|
|
105
102
|
{/if}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Stack,
|
|
10
10
|
Text,
|
|
11
11
|
} from "@immich/ui";
|
|
12
|
+
import { t } from "svelte-i18n-lingui";
|
|
12
13
|
|
|
13
14
|
type Props = {
|
|
14
15
|
repository: string;
|
|
@@ -27,19 +28,19 @@
|
|
|
27
28
|
);
|
|
28
29
|
</script>
|
|
29
30
|
|
|
30
|
-
<Modal title=
|
|
31
|
+
<Modal title={$t`Rollback to this snapshot?`} size="small" {onClose}>
|
|
31
32
|
<ModalBody>
|
|
32
33
|
<Stack gap={4}>
|
|
33
34
|
<Text>
|
|
34
|
-
Your instance will return to how it was when this snapshot was taken
|
|
35
|
+
{$t`Your instance will return to how it was when this snapshot was taken.`}
|
|
35
36
|
</Text>
|
|
36
37
|
|
|
37
38
|
<Stack gap={2}>
|
|
38
|
-
<Text>This will
|
|
39
|
+
<Text>{$t`This will:`}</Text>
|
|
39
40
|
<ul class="list-disc ps-6">
|
|
40
|
-
<li><Text>Restore files from the snapshot</Text></li>
|
|
41
|
-
<li><Text>Restore the Immich database</Text></li>
|
|
42
|
-
<li><Text>Restart the server during rollback</Text></li>
|
|
41
|
+
<li><Text>{$t`Restore files from the snapshot`}</Text></li>
|
|
42
|
+
<li><Text>{$t`Restore the Immich database`}</Text></li>
|
|
43
|
+
<li><Text>{$t`Restart the server during rollback`}</Text></li>
|
|
43
44
|
</ul>
|
|
44
45
|
</Stack>
|
|
45
46
|
</Stack>
|
|
@@ -47,9 +48,9 @@
|
|
|
47
48
|
<ModalFooter>
|
|
48
49
|
<HStack>
|
|
49
50
|
<Button color="danger" loading={mutation.isPending} onclick={onConfirm}>
|
|
50
|
-
Confirm rollback
|
|
51
|
+
{$t`Confirm rollback`}
|
|
51
52
|
</Button>
|
|
52
|
-
<Button variant="ghost" onclick={onClose}>Cancel</Button>
|
|
53
|
+
<Button variant="ghost" onclick={onClose}>{$t`Cancel`}</Button>
|
|
53
54
|
</HStack>
|
|
54
55
|
</ModalFooter>
|
|
55
56
|
</Modal>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
Stack,
|
|
14
14
|
} from "@immich/ui";
|
|
15
15
|
import type { Snippet } from "svelte";
|
|
16
|
+
import { t } from "svelte-i18n-lingui";
|
|
16
17
|
|
|
17
18
|
type Props = {
|
|
18
19
|
title?: string;
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
const {
|
|
29
|
-
title
|
|
30
|
+
title,
|
|
30
31
|
backendId,
|
|
31
32
|
leadingContent,
|
|
32
33
|
footerContent,
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
);
|
|
49
50
|
</script>
|
|
50
51
|
|
|
51
|
-
<Modal {title} size="small" onClose={onCancel}>
|
|
52
|
+
<Modal title={title ?? $t`Select Backup`} size="small" onClose={onCancel}>
|
|
52
53
|
<ModalBody>
|
|
53
54
|
<Stack>
|
|
54
55
|
{@render leadingContent?.()}
|
|
@@ -65,17 +66,22 @@
|
|
|
65
66
|
onclick={() => onSelect(repository.id)}
|
|
66
67
|
>
|
|
67
68
|
{#if !accessible}
|
|
68
|
-
Can't access, is your recovery key correct
|
|
69
|
+
{$t`Can't access, is your recovery key correct?`}
|
|
69
70
|
{:else if snapshots.length}
|
|
70
|
-
|
|
71
|
+
{$t({
|
|
72
|
+
message: "Last backup: {date}",
|
|
73
|
+
values: {
|
|
74
|
+
date: new Date(snapshots[0].time).toLocaleDateString(),
|
|
75
|
+
},
|
|
76
|
+
})}
|
|
71
77
|
{:else}
|
|
72
|
-
No backups yet
|
|
78
|
+
{$t`No backups yet`}
|
|
73
79
|
{/if}
|
|
74
80
|
</StackListOption>
|
|
75
81
|
{/each}
|
|
76
82
|
|
|
77
83
|
{#if (sortedRepositories ?? []).length === 0}
|
|
78
|
-
<StackListPlaceholder>No backups found
|
|
84
|
+
<StackListPlaceholder>{$t`No backups found.`}</StackListPlaceholder>
|
|
79
85
|
{/if}
|
|
80
86
|
</Suspense>
|
|
81
87
|
</StackList>
|
|
@@ -83,7 +89,7 @@
|
|
|
83
89
|
</ModalBody>
|
|
84
90
|
<ModalFooter>
|
|
85
91
|
<HStack>
|
|
86
|
-
<Button variant="ghost" onclick={onCancel}>Cancel</Button>
|
|
92
|
+
<Button variant="ghost" onclick={onCancel}>{$t`Cancel`}</Button>
|
|
87
93
|
{@render footerContent?.()}
|
|
88
94
|
</HStack>
|
|
89
95
|
</ModalFooter>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { options } from "../../../options";
|
|
8
8
|
import { createLogObserver } from "../../../services/log.service.svelte";
|
|
9
9
|
import { useRun, useRunEventHandler } from "../../../services/runHistory.service";
|
|
10
|
+
import { handleCancelTask } from "../../../services/task.service";
|
|
10
11
|
import { formatDuration } from "../../../utils/format";
|
|
11
12
|
import {
|
|
12
13
|
CloseButton,
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
} from "@immich/ui";
|
|
23
24
|
import { DateTime } from "luxon";
|
|
24
25
|
import { onDestroy } from "svelte";
|
|
26
|
+
import { msg, plural, t } from "svelte-i18n-lingui";
|
|
25
27
|
|
|
26
28
|
type Props = {
|
|
27
29
|
logId: string;
|
|
@@ -87,9 +89,9 @@
|
|
|
87
89
|
);
|
|
88
90
|
|
|
89
91
|
const titles: Record<BackupStatusType, Record<"running" | "done", string>> = {
|
|
90
|
-
backup: { running:
|
|
91
|
-
restore: { running:
|
|
92
|
-
forget: { running:
|
|
92
|
+
backup: { running: msg`Backing up your library`, done: msg`Backup` },
|
|
93
|
+
restore: { running: msg`Restoring your library`, done: msg`Restore` },
|
|
94
|
+
forget: { running: msg`Pruning old backups`, done: msg`Prune` },
|
|
93
95
|
};
|
|
94
96
|
|
|
95
97
|
const retry = $derived(
|
|
@@ -104,19 +106,31 @@
|
|
|
104
106
|
const title = $derived.by(() => {
|
|
105
107
|
switch (backupState) {
|
|
106
108
|
case "complete": {
|
|
107
|
-
return
|
|
109
|
+
return $t({
|
|
110
|
+
message: "{name} complete",
|
|
111
|
+
values: { name: $t(titles[type].done) },
|
|
112
|
+
});
|
|
108
113
|
}
|
|
109
114
|
case "warned": {
|
|
110
|
-
return
|
|
115
|
+
return $t({
|
|
116
|
+
message: "{name} completed with warnings",
|
|
117
|
+
values: { name: $t(titles[type].done) },
|
|
118
|
+
});
|
|
111
119
|
}
|
|
112
120
|
case "failed": {
|
|
113
|
-
return
|
|
121
|
+
return $t({
|
|
122
|
+
message: "{name} failed",
|
|
123
|
+
values: { name: $t(titles[type].done) },
|
|
124
|
+
});
|
|
114
125
|
}
|
|
115
126
|
case "cancelled": {
|
|
116
|
-
return
|
|
127
|
+
return $t({
|
|
128
|
+
message: "{name} cancelled",
|
|
129
|
+
values: { name: $t(titles[type].done) },
|
|
130
|
+
});
|
|
117
131
|
}
|
|
118
132
|
default: {
|
|
119
|
-
return titles[type].running;
|
|
133
|
+
return $t(titles[type].running);
|
|
120
134
|
}
|
|
121
135
|
}
|
|
122
136
|
});
|
|
@@ -145,37 +159,57 @@
|
|
|
145
159
|
progress={log.status.progress}
|
|
146
160
|
start={run?.start}
|
|
147
161
|
{duration}
|
|
162
|
+
remaining={log.status.text}
|
|
148
163
|
errors={log.errors}
|
|
149
164
|
currentFiles={log.status.currentFiles}
|
|
150
165
|
onRetry={retry}
|
|
166
|
+
onCancel={run ? () => void handleCancelTask(run.repositoryId) : undefined}
|
|
151
167
|
>
|
|
152
168
|
{#snippet details()}
|
|
153
169
|
{#if log.summary && type === "backup"}
|
|
154
|
-
{(
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
{$t({
|
|
171
|
+
message: "{count} items backed up",
|
|
172
|
+
values: {
|
|
173
|
+
count: (log.summary.total_files_processed ?? 0).toLocaleString(),
|
|
174
|
+
},
|
|
175
|
+
})} ·
|
|
176
|
+
{$t({
|
|
177
|
+
message: "{count} new items",
|
|
178
|
+
values: { count: (log.summary.files_new ?? 0).toLocaleString() },
|
|
179
|
+
})}
|
|
157
180
|
{#if log.summary.total_bytes_processed !== undefined}
|
|
158
181
|
·
|
|
159
|
-
<FormatBytes bytes={log.summary.total_bytes_processed} /> processed
|
|
182
|
+
<FormatBytes bytes={log.summary.total_bytes_processed} /> {$t`processed`}
|
|
160
183
|
{/if}
|
|
161
184
|
{:else if log.summary && type === "restore"}
|
|
162
|
-
{(
|
|
163
|
-
|
|
185
|
+
{$t({
|
|
186
|
+
message: "{count} items restored",
|
|
187
|
+
values: { count: (log.summary.files_restored ?? 0).toLocaleString() },
|
|
188
|
+
})}{#if log.summary.files_skipped}
|
|
189
|
+
· {$t({
|
|
190
|
+
message: "{count} skipped",
|
|
191
|
+
values: { count: log.summary.files_skipped.toLocaleString() },
|
|
192
|
+
})}
|
|
164
193
|
{/if}
|
|
165
194
|
{#if log.summary.bytes_restored !== undefined}
|
|
166
|
-
· <FormatBytes bytes={log.summary.bytes_restored} /> restored
|
|
195
|
+
· <FormatBytes bytes={log.summary.bytes_restored} /> {$t`restored`}
|
|
167
196
|
{/if}
|
|
168
197
|
{:else if type === "forget"}
|
|
169
|
-
{log.pruned.removed
|
|
170
|
-
|
|
171
|
-
|
|
198
|
+
{$plural(log.pruned.removed, {
|
|
199
|
+
one: "# backup removed",
|
|
200
|
+
other: "# backups removed",
|
|
201
|
+
})} ·
|
|
202
|
+
{$t({
|
|
203
|
+
message: "{count} kept",
|
|
204
|
+
values: { count: log.pruned.kept.toLocaleString() },
|
|
205
|
+
})}
|
|
172
206
|
{/if}
|
|
173
207
|
{/snippet}
|
|
174
208
|
|
|
175
209
|
{#snippet advanced()}
|
|
176
210
|
{#if showAdvanced}
|
|
177
211
|
<Stack gap={1}>
|
|
178
|
-
<Heading size="small">Event Log</Heading>
|
|
212
|
+
<Heading tag="h3" size="small">{$t`Event Log`}</Heading>
|
|
179
213
|
<Scrollable class="h-80 overflow-x-hidden">
|
|
180
214
|
<Stack gap={1}>
|
|
181
215
|
{#each log.events as event, index (index)}
|