@futo-org/backups-orchestrator-ui 0.46.0 → 0.47.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 +3 -2
- package/dist/components/backends/dialogs/SelectBackendModal.svelte +7 -6
- package/dist/components/backups/BackupItem.svelte +13 -12
- package/dist/components/backups/BackupStatus.svelte +45 -40
- 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 +16 -15
- 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 +50 -19
- package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +37 -21
- 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 +2 -1
- package/dist/components/dashboard/DashboardBackupHealth.svelte +14 -10
- package/dist/components/dashboard/DashboardCurrentUsage.svelte +2 -1
- package/dist/components/dashboard/DashboardDailyBackupTime.svelte +2 -1
- package/dist/components/dashboard/DashboardInstall.svelte +3 -2
- package/dist/components/dashboard/DashboardRecentBackups.svelte +9 -4
- package/dist/components/dashboard/DashboardTotalStored.svelte +7 -2
- package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte +2 -1
- package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte +15 -14
- package/dist/components/integrations/immich/ImmichDatabaseDumpAlert.svelte +6 -5
- package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +15 -14
- package/dist/components/integrations/immich/ImmichManageBackupPage.svelte +3 -2
- package/dist/components/integrations/immich/ImmichOnboardingSetupFlow.svelte +2 -1
- package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +32 -31
- package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte +34 -44
- package/dist/components/integrations/immich/settings/ImmichSettingsSchedule.svelte +16 -15
- package/dist/components/integrations/immich/settings/ImmichSettingsStorage.svelte +19 -18
- package/dist/components/onboarding/OnboardingBootstrapError.svelte +5 -4
- package/dist/components/onboarding/OnboardingLogin.svelte +4 -4
- package/dist/components/onboarding/RecoveryKeyDisplay.svelte +5 -4
- package/dist/components/onboarding/SampleOnboarding.svelte +4 -3
- 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 +8 -4
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +9 -8
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +2 -1
- package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte +9 -6
- package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte +6 -5
- package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte +6 -7
- package/dist/components/onboarding/steps/OnboardingStep1FinishSetup.svelte +12 -11
- package/dist/components/onboarding/steps/OnboardingStep2ConnectAccount.svelte +13 -12
- package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte +5 -4
- package/dist/components/onboarding/steps/OnboardingStep4FirstBackup.svelte +8 -8
- 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 +10 -5
- package/dist/components/onboarding/upsell/UpsellFrequentlyAskedQuestions.svelte +2 -1
- package/dist/components/onboarding/upsell/UpsellFutoBackupsBadge.svelte +2 -1
- package/dist/components/onboarding/upsell/UpsellHowItWorks.svelte +10 -10
- package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte +14 -11
- package/dist/components/schedules/RepositoryPicker.svelte +8 -7
- package/dist/components/schedules/ScheduleItem.svelte +6 -5
- package/dist/components/schedules/ScheduleList.svelte +4 -3
- package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +4 -3
- package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +7 -3
- package/dist/components/settings/SettingsBackends.svelte +3 -2
- package/dist/components/settings/SettingsBilling.svelte +13 -12
- package/dist/components/settings/SettingsNotifications.svelte +11 -10
- package/dist/components/ui/PageLayout.svelte +3 -2
- package/dist/components/ui/Pagination.svelte +4 -3
- package/dist/components/ui/PathListField.svelte +5 -4
- package/dist/components/ui/PathPickerField.svelte +4 -3
- package/dist/components/ui/PathPickerModal.svelte +16 -13
- package/dist/components/ui/StackListItem.svelte +2 -1
- package/dist/components/util/DeviceFlowAction.svelte +3 -2
- package/dist/components/util/DeviceFlowCode.svelte +4 -3
- 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 +1 -0
- package/dist/index.js +1 -0
- package/dist/locales/en-XA.d.ts +2 -0
- package/dist/locales/en-XA.js +1 -0
- package/dist/locales/en-XA.po +2198 -0
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/en.po +2446 -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 +2 -1
- package/dist/services/immich.integration.service.js +7 -6
- 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 +2 -1
- package/dist/services/runHistory.service.js +5 -4
- 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/format.js +10 -8
- package/dist/utils/handle-error.js +2 -1
- package/package.json +12 -5
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
} from "@immich/ui";
|
|
28
28
|
import { mdiImageMultiple } from "@mdi/js";
|
|
29
29
|
import { SvelteSet } from "svelte/reactivity";
|
|
30
|
+
import { msg, t } from "svelte-i18n-lingui";
|
|
30
31
|
|
|
31
32
|
type Group = {
|
|
32
33
|
key: string;
|
|
@@ -41,36 +42,33 @@
|
|
|
41
42
|
const groups: Group[] = [
|
|
42
43
|
{
|
|
43
44
|
key: "media",
|
|
44
|
-
label:
|
|
45
|
-
description:
|
|
45
|
+
label: msg`Photos and videos`,
|
|
46
|
+
description: msg`Your media uploaded directly to Immich.`,
|
|
46
47
|
folders: ["upload", "profile", "library"],
|
|
47
|
-
warning:
|
|
48
|
+
warning: msg`It is highly recommended you back this up!`,
|
|
48
49
|
warningColor: "danger",
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
52
|
key: "database",
|
|
52
|
-
label:
|
|
53
|
-
description:
|
|
54
|
-
"Albums, people, tags, favorites and other library details. Required to restore.",
|
|
53
|
+
label: msg`Database and metadata`,
|
|
54
|
+
description: msg`Albums, people, tags, favorites and other library details. Required to restore.`,
|
|
55
55
|
folders: ["backups"],
|
|
56
56
|
required: true,
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
key: "thumbs",
|
|
60
|
-
label:
|
|
61
|
-
description:
|
|
60
|
+
label: msg`Thumbnails and previews`,
|
|
61
|
+
description: msg`Generated photo previews, can be recreated later.`,
|
|
62
62
|
folders: ["thumbs"],
|
|
63
|
-
warning:
|
|
64
|
-
"When restoring, you will see broken previews. Use the admin panel to regenerate them.",
|
|
63
|
+
warning: msg`When restoring, you will see broken previews. Use the admin panel to regenerate them.`,
|
|
65
64
|
warningColor: "warning",
|
|
66
65
|
},
|
|
67
66
|
{
|
|
68
67
|
key: "encoded",
|
|
69
|
-
label:
|
|
70
|
-
description:
|
|
68
|
+
label: msg`Encoded videos`,
|
|
69
|
+
description: msg`Generated video previews, can be recreated later.`,
|
|
71
70
|
folders: ["encoded-video"],
|
|
72
|
-
warning:
|
|
73
|
-
"When restoring, you will see broken previews. Use the admin panel to regenerate them.",
|
|
71
|
+
warning: msg`When restoring, you will see broken previews. Use the admin panel to regenerate them.`,
|
|
74
72
|
warningColor: "warning",
|
|
75
73
|
},
|
|
76
74
|
];
|
|
@@ -107,9 +105,9 @@
|
|
|
107
105
|
type LibrariesMode = "all" | "none" | "some";
|
|
108
106
|
|
|
109
107
|
const libraryModes = [
|
|
110
|
-
{ value: "all", label:
|
|
111
|
-
{ value: "none", label:
|
|
112
|
-
{ value: "some", label:
|
|
108
|
+
{ value: "all", label: msg`All libraries` },
|
|
109
|
+
{ value: "none", label: msg`No libraries` },
|
|
110
|
+
{ value: "some", label: msg`Choose libraries` },
|
|
113
111
|
];
|
|
114
112
|
|
|
115
113
|
const folders = new SvelteSet<string>();
|
|
@@ -216,8 +214,8 @@
|
|
|
216
214
|
/>
|
|
217
215
|
|
|
218
216
|
<Accordion
|
|
219
|
-
title=
|
|
220
|
-
subtitle=
|
|
217
|
+
title={$t`Backup Contents`}
|
|
218
|
+
subtitle={$t`Choose what Immich includes in each backup.`}
|
|
221
219
|
icon={mdiImageMultiple}
|
|
222
220
|
>
|
|
223
221
|
<Stack gap={4} class="pt-2">
|
|
@@ -228,8 +226,8 @@
|
|
|
228
226
|
{#if applicable(group).length > 0}
|
|
229
227
|
<Stack gap={1}>
|
|
230
228
|
<Field
|
|
231
|
-
label={group.label}
|
|
232
|
-
description={group.description}
|
|
229
|
+
label={$t(group.label)}
|
|
230
|
+
description={$t(group.description)}
|
|
233
231
|
readOnly={group.required}
|
|
234
232
|
required={group.required ? "indicator" : undefined}
|
|
235
233
|
>
|
|
@@ -244,7 +242,7 @@
|
|
|
244
242
|
|
|
245
243
|
{#if group.warning && !group.required && !isChecked(group)}
|
|
246
244
|
<Text size="small" color={group.warningColor}>
|
|
247
|
-
{group.warning}
|
|
245
|
+
{$t(group.warning)}
|
|
248
246
|
</Text>
|
|
249
247
|
{/if}
|
|
250
248
|
</Stack>
|
|
@@ -253,25 +251,25 @@
|
|
|
253
251
|
|
|
254
252
|
<Stack gap={1}>
|
|
255
253
|
<Field
|
|
256
|
-
label=
|
|
257
|
-
description=
|
|
254
|
+
label={$t`Backup configuration`}
|
|
255
|
+
description={$t`Include these backup settings, so they survive a restore.`}
|
|
258
256
|
>
|
|
259
257
|
<Switch bind:checked={backupConfiguration} />
|
|
260
258
|
</Field>
|
|
261
259
|
|
|
262
260
|
{#if !backupConfiguration}
|
|
263
261
|
<Text size="small" color="warning">
|
|
264
|
-
You will need to reconfigure backups from scratch after restoring
|
|
262
|
+
{$t`You will need to reconfigure backups from scratch after restoring.`}
|
|
265
263
|
</Text>
|
|
266
264
|
{/if}
|
|
267
265
|
</Stack>
|
|
268
266
|
|
|
269
267
|
<Field
|
|
270
|
-
label=
|
|
271
|
-
description=
|
|
268
|
+
label={$t`External libraries`}
|
|
269
|
+
description={$t`Libraries stored outside of Immich. New libraries are included automatically unless you choose specific ones.`}
|
|
272
270
|
>
|
|
273
271
|
<Select
|
|
274
|
-
options={libraryModes}
|
|
272
|
+
options={libraryModes.map((mode) => ({ ...mode, label: $t(mode.label) }))}
|
|
275
273
|
value={librariesMode}
|
|
276
274
|
onChange={(value) => (librariesMode = value as LibrariesMode)}
|
|
277
275
|
/>
|
|
@@ -279,7 +277,7 @@
|
|
|
279
277
|
|
|
280
278
|
{#if librariesMode === "some"}
|
|
281
279
|
{#if libraries.length === 0}
|
|
282
|
-
<Text size="small" color="muted">No external libraries found
|
|
280
|
+
<Text size="small" color="muted">{$t`No external libraries found.`}</Text>
|
|
283
281
|
{:else}
|
|
284
282
|
<Stack gap={2} class="ps-1">
|
|
285
283
|
{#each libraries as library (library.id)}
|
|
@@ -295,7 +293,10 @@
|
|
|
295
293
|
{/if}
|
|
296
294
|
{:else if librariesMode === "all" && libraries.length > 0}
|
|
297
295
|
<Text size="small" color="muted">
|
|
298
|
-
|
|
296
|
+
{$t({
|
|
297
|
+
message: "Included: {names}",
|
|
298
|
+
values: { names: libraries.map((library) => library.name).join(", ") },
|
|
299
|
+
})}
|
|
299
300
|
</Text>
|
|
300
301
|
{/if}
|
|
301
302
|
|
|
@@ -305,7 +306,7 @@
|
|
|
305
306
|
loading={mutation.isPending}
|
|
306
307
|
onclick={onSave}
|
|
307
308
|
>
|
|
308
|
-
Save
|
|
309
|
+
{$t`Save`}
|
|
309
310
|
</Button>
|
|
310
311
|
</HStack>
|
|
311
312
|
{/if}
|
|
@@ -1,41 +1,37 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Accordion from "../../../ui/Accordion.svelte";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
defaultQuietHoursEnd,
|
|
5
|
+
defaultQuietHoursStart,
|
|
6
|
+
toBandwidthDto,
|
|
7
|
+
toBandwidthForm,
|
|
8
|
+
toBytesPerSec,
|
|
9
|
+
useConfig,
|
|
10
|
+
useUpdateConfig,
|
|
11
|
+
} from "../../../../services/config.service";
|
|
4
12
|
import {
|
|
5
13
|
Button,
|
|
6
14
|
Field,
|
|
7
15
|
HStack,
|
|
8
16
|
LoadingSpinner,
|
|
17
|
+
NumberInput,
|
|
9
18
|
Select,
|
|
10
19
|
Stack,
|
|
11
20
|
Switch,
|
|
12
21
|
Text,
|
|
13
22
|
} from "@immich/ui";
|
|
14
23
|
import { mdiSpeedometerSlow } from "@mdi/js";
|
|
15
|
-
|
|
16
|
-
const bytesPerMegabyte = 1_000_000;
|
|
17
|
-
const unlimited = "0";
|
|
18
|
-
|
|
19
|
-
const speeds = [
|
|
20
|
-
{ value: unlimited, label: "No limit" },
|
|
21
|
-
...[0.5, 1, 2, 5, 10, 20, 50, 100].map((megabytes) => ({
|
|
22
|
-
value: String(megabytes * bytesPerMegabyte),
|
|
23
|
-
label: `${megabytes} MB/s`,
|
|
24
|
-
})),
|
|
25
|
-
];
|
|
24
|
+
import { t } from "svelte-i18n-lingui";
|
|
26
25
|
|
|
27
26
|
const hours = Array.from({ length: 24 }, (_, hour) => ({
|
|
28
27
|
value: `${String(hour).padStart(2, "0")}:00`,
|
|
29
28
|
label: `${String(hour).padStart(2, "0")}:00`,
|
|
30
29
|
}));
|
|
31
30
|
|
|
32
|
-
const defaultQuietHoursStart = "22:00";
|
|
33
|
-
const defaultQuietHoursEnd = "06:00";
|
|
34
|
-
|
|
35
31
|
const config = useConfig();
|
|
36
32
|
const mutation = useUpdateConfig();
|
|
37
33
|
|
|
38
|
-
let
|
|
34
|
+
let mbps = $state<number>();
|
|
39
35
|
let quiet = $state(false);
|
|
40
36
|
let quietStart = $state(defaultQuietHoursStart);
|
|
41
37
|
let quietEnd = $state(defaultQuietHoursEnd);
|
|
@@ -46,14 +42,9 @@
|
|
|
46
42
|
return;
|
|
47
43
|
}
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
speed = String(bytesPerSec);
|
|
54
|
-
quiet = Boolean(quietHours);
|
|
55
|
-
quietStart = start;
|
|
56
|
-
quietEnd = end;
|
|
45
|
+
({ mbps, quiet, quietStart, quietEnd } = toBandwidthForm(
|
|
46
|
+
config.data.bandwidth,
|
|
47
|
+
));
|
|
57
48
|
};
|
|
58
49
|
|
|
59
50
|
$effect(() => {
|
|
@@ -65,21 +56,18 @@
|
|
|
65
56
|
load();
|
|
66
57
|
});
|
|
67
58
|
|
|
68
|
-
const limited = $derived(
|
|
59
|
+
const limited = $derived(toBytesPerSec(mbps) > 0);
|
|
69
60
|
|
|
70
61
|
const onSave = () => {
|
|
71
62
|
mutation.mutate({
|
|
72
|
-
bandwidth: {
|
|
73
|
-
bytesPerSec: Number(speed),
|
|
74
|
-
quietHours: limited && quiet ? `${quietStart}-${quietEnd}` : undefined,
|
|
75
|
-
},
|
|
63
|
+
bandwidth: toBandwidthDto({ mbps, quiet, quietStart, quietEnd }),
|
|
76
64
|
});
|
|
77
65
|
};
|
|
78
66
|
</script>
|
|
79
67
|
|
|
80
68
|
<Accordion
|
|
81
|
-
title=
|
|
82
|
-
subtitle=
|
|
69
|
+
title={$t`Bandwidth`}
|
|
70
|
+
subtitle={$t`Manage how fast backups upload.`}
|
|
83
71
|
icon={mdiSpeedometerSlow}
|
|
84
72
|
>
|
|
85
73
|
<Stack gap={4} class="pt-2">
|
|
@@ -87,20 +75,22 @@
|
|
|
87
75
|
<LoadingSpinner />
|
|
88
76
|
{:else}
|
|
89
77
|
<Field
|
|
90
|
-
label=
|
|
91
|
-
description=
|
|
78
|
+
label={$t`Upload speed`}
|
|
79
|
+
description={$t`Slow down backup uploads without affecting restores. Leave empty for no limit.`}
|
|
92
80
|
color="primary"
|
|
93
81
|
>
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
82
|
+
<NumberInput
|
|
83
|
+
bind:value={mbps}
|
|
84
|
+
min={0}
|
|
85
|
+
step={1}
|
|
86
|
+
placeholder={$t`No limit`}
|
|
87
|
+
trailingText="Mbps"
|
|
98
88
|
/>
|
|
99
89
|
</Field>
|
|
100
90
|
|
|
101
91
|
<Field
|
|
102
|
-
label=
|
|
103
|
-
description=
|
|
92
|
+
label={$t`Full speed during quiet hours`}
|
|
93
|
+
description={$t`Lift the limit while you are asleep.`}
|
|
104
94
|
color="primary"
|
|
105
95
|
disabled={!limited}
|
|
106
96
|
>
|
|
@@ -109,14 +99,14 @@
|
|
|
109
99
|
|
|
110
100
|
{#if limited && quiet}
|
|
111
101
|
<HStack gap={4}>
|
|
112
|
-
<Field label=
|
|
102
|
+
<Field label={$t`From`} color="primary">
|
|
113
103
|
<Select
|
|
114
104
|
options={hours}
|
|
115
105
|
value={quietStart}
|
|
116
106
|
onChange={(value) => (quietStart = value)}
|
|
117
107
|
/>
|
|
118
108
|
</Field>
|
|
119
|
-
<Field label=
|
|
109
|
+
<Field label={$t`Until`} color="primary">
|
|
120
110
|
<Select
|
|
121
111
|
options={hours}
|
|
122
112
|
value={quietEnd}
|
|
@@ -127,7 +117,7 @@
|
|
|
127
117
|
|
|
128
118
|
{#if quietStart === quietEnd}
|
|
129
119
|
<Text size="small" color="muted">
|
|
130
|
-
With the same start and end time, the limit never applies
|
|
120
|
+
{$t`With the same start and end time, the limit never applies.`}
|
|
131
121
|
</Text>
|
|
132
122
|
{/if}
|
|
133
123
|
{/if}
|
|
@@ -139,10 +129,10 @@
|
|
|
139
129
|
disabled={mutation.isPending}
|
|
140
130
|
onclick={load}
|
|
141
131
|
>
|
|
142
|
-
Reset
|
|
132
|
+
{$t`Reset`}
|
|
143
133
|
</Button>
|
|
144
134
|
<Button shape="round" loading={mutation.isPending} onclick={onSave}>
|
|
145
|
-
Save
|
|
135
|
+
{$t`Save`}
|
|
146
136
|
</Button>
|
|
147
137
|
</HStack>
|
|
148
138
|
{/if}
|
|
@@ -26,13 +26,14 @@
|
|
|
26
26
|
} from "@immich/ui";
|
|
27
27
|
import { mdiClockOutline } from "@mdi/js";
|
|
28
28
|
import cronstrue from "cronstrue";
|
|
29
|
+
import { msg, t } from "svelte-i18n-lingui";
|
|
29
30
|
|
|
30
31
|
type Frequency = "daily" | "weekly" | "monthly";
|
|
31
32
|
|
|
32
33
|
const frequencies = [
|
|
33
|
-
{ value: "daily", label:
|
|
34
|
-
{ value: "weekly", label:
|
|
35
|
-
{ value: "monthly", label:
|
|
34
|
+
{ value: "daily", label: msg`Daily` },
|
|
35
|
+
{ value: "weekly", label: msg`Weekly` },
|
|
36
|
+
{ value: "monthly", label: msg`Monthly` },
|
|
36
37
|
];
|
|
37
38
|
|
|
38
39
|
const startTimes = Array.from({ length: 24 }, (_, hour) => ({
|
|
@@ -158,8 +159,8 @@
|
|
|
158
159
|
/>
|
|
159
160
|
|
|
160
161
|
<Accordion
|
|
161
|
-
title=
|
|
162
|
-
subtitle=
|
|
162
|
+
title={$t`Schedule`}
|
|
163
|
+
subtitle={$t`Manage when backups run.`}
|
|
163
164
|
icon={mdiClockOutline}
|
|
164
165
|
>
|
|
165
166
|
<Stack gap={4} class="pt-2">
|
|
@@ -167,26 +168,26 @@
|
|
|
167
168
|
<LoadingSpinner />
|
|
168
169
|
{:else}
|
|
169
170
|
<Field
|
|
170
|
-
label=
|
|
171
|
-
description=
|
|
171
|
+
label={$t`Run backups automatically`}
|
|
172
|
+
description={$t`Back up your library on a recurring schedule.`}
|
|
172
173
|
color="primary"
|
|
173
174
|
>
|
|
174
175
|
<Switch bind:checked={enabled} />
|
|
175
176
|
</Field>
|
|
176
177
|
|
|
177
178
|
<Field
|
|
178
|
-
label=
|
|
179
|
-
description=
|
|
179
|
+
label={$t`Frequency`}
|
|
180
|
+
description={$t`How often backups should run.`}
|
|
180
181
|
color="primary"
|
|
181
182
|
required="indicator"
|
|
182
183
|
disabled={!enabled}
|
|
183
184
|
>
|
|
184
|
-
<Select options={frequencies} bind:value={frequency} />
|
|
185
|
+
<Select options={frequencies.map((option) => ({ ...option, label: $t(option.label) }))} bind:value={frequency} />
|
|
185
186
|
</Field>
|
|
186
187
|
|
|
187
188
|
<Field
|
|
188
|
-
label=
|
|
189
|
-
description=
|
|
189
|
+
label={$t`Start time`}
|
|
190
|
+
description={$t`When the scheduled backup starts.`}
|
|
190
191
|
color="primary"
|
|
191
192
|
required="indicator"
|
|
192
193
|
disabled={!enabled}
|
|
@@ -195,7 +196,7 @@
|
|
|
195
196
|
</Field>
|
|
196
197
|
|
|
197
198
|
<Text size="small" color="muted">
|
|
198
|
-
Backups will run <span class="lowercase"
|
|
199
|
+
{$t`Backups will run`} <span class="lowercase"
|
|
199
200
|
>{cronstrue.toString(cron, { verbose: true })}</span
|
|
200
201
|
>.
|
|
201
202
|
</Text>
|
|
@@ -207,10 +208,10 @@
|
|
|
207
208
|
disabled={mutation.isPending}
|
|
208
209
|
onclick={load}
|
|
209
210
|
>
|
|
210
|
-
Reset
|
|
211
|
+
{$t`Reset`}
|
|
211
212
|
</Button>
|
|
212
213
|
<Button shape="round" loading={mutation.isPending} onclick={onSave}>
|
|
213
|
-
Save
|
|
214
|
+
{$t`Save`}
|
|
214
215
|
</Button>
|
|
215
216
|
</HStack>
|
|
216
217
|
{/if}
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
Switch,
|
|
29
29
|
} from "@immich/ui";
|
|
30
30
|
import { mdiDownloadBox } from "@mdi/js";
|
|
31
|
+
import { msg, t } from "svelte-i18n-lingui";
|
|
31
32
|
|
|
32
33
|
type RetentionChoice = {
|
|
33
34
|
key: string;
|
|
@@ -36,12 +37,12 @@
|
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
const retentionChoices: RetentionChoice[] = [
|
|
39
|
-
{ key: "15d", label:
|
|
40
|
-
{ key: "30d", label:
|
|
41
|
-
{ key: "60d", label:
|
|
42
|
-
{ key: "90d", label:
|
|
43
|
-
{ key: "2", label:
|
|
44
|
-
{ key: "never", label:
|
|
40
|
+
{ key: "15d", label: msg`After 15 days`, policy: { keepWithin: "15d" } },
|
|
41
|
+
{ key: "30d", label: msg`After 30 days`, policy: { keepWithin: "30d" } },
|
|
42
|
+
{ key: "60d", label: msg`After 60 days`, policy: { keepWithin: "60d" } },
|
|
43
|
+
{ key: "90d", label: msg`After 90 days`, policy: { keepWithin: "90d" } },
|
|
44
|
+
{ key: "2", label: msg`Keep latest two backups`, policy: { keepLast: 2 } },
|
|
45
|
+
{ key: "never", label: msg`Never (keep all backups)`, policy: null },
|
|
45
46
|
];
|
|
46
47
|
|
|
47
48
|
const defaultRetentionKey = "60d";
|
|
@@ -134,8 +135,8 @@
|
|
|
134
135
|
/>
|
|
135
136
|
|
|
136
137
|
<Accordion
|
|
137
|
-
title=
|
|
138
|
-
subtitle=
|
|
138
|
+
title={$t`Storage`}
|
|
139
|
+
subtitle={$t`Manage the backup name, where it is stored, and how long backups are kept.`}
|
|
139
140
|
icon={mdiDownloadBox}
|
|
140
141
|
>
|
|
141
142
|
<Stack gap={4} class="pt-2">
|
|
@@ -143,8 +144,8 @@
|
|
|
143
144
|
<LoadingSpinner />
|
|
144
145
|
{:else}
|
|
145
146
|
<Field
|
|
146
|
-
label=
|
|
147
|
-
description=
|
|
147
|
+
label={$t`Backup name`}
|
|
148
|
+
description={$t`How this backup is labelled across FUTO Backups.`}
|
|
148
149
|
required="indicator"
|
|
149
150
|
>
|
|
150
151
|
<Input bind:value={name} />
|
|
@@ -154,26 +155,26 @@
|
|
|
154
155
|
|
|
155
156
|
{#if repository?.worm}
|
|
156
157
|
<Button onclick={() => handleDisableWormRepository(repository.id, true)}>
|
|
157
|
-
Disable write-only
|
|
158
|
+
{$t`Disable write-only`}
|
|
158
159
|
</Button>
|
|
159
160
|
{:else}
|
|
160
161
|
<Field
|
|
161
|
-
label=
|
|
162
|
-
description=
|
|
162
|
+
label={$t`Write-only`}
|
|
163
|
+
description={$t`Once written, backups can't be removed.`}
|
|
163
164
|
>
|
|
164
165
|
<Switch bind:checked={worm} />
|
|
165
166
|
</Field>
|
|
166
167
|
{/if}
|
|
167
168
|
|
|
168
169
|
<Field
|
|
169
|
-
label=
|
|
170
|
-
description=
|
|
170
|
+
label={$t`Delete old backups`}
|
|
171
|
+
description={$t`Older snapshots are pruned automatically.`}
|
|
171
172
|
disabled={worm}
|
|
172
173
|
>
|
|
173
174
|
<Select
|
|
174
175
|
options={retentionChoices.map(({ key, label }) => ({
|
|
175
176
|
value: key,
|
|
176
|
-
label,
|
|
177
|
+
label: $t(label),
|
|
177
178
|
}))}
|
|
178
179
|
value={worm ? "never" : retentionKey}
|
|
179
180
|
onChange={(value) => (retentionKey = value)}
|
|
@@ -187,7 +188,7 @@
|
|
|
187
188
|
disabled={mutation.isPending}
|
|
188
189
|
onclick={load}
|
|
189
190
|
>
|
|
190
|
-
Reset
|
|
191
|
+
{$t`Reset`}
|
|
191
192
|
</Button>
|
|
192
193
|
<Button
|
|
193
194
|
shape="round"
|
|
@@ -195,7 +196,7 @@
|
|
|
195
196
|
loading={mutation.isPending}
|
|
196
197
|
onclick={onSave}
|
|
197
198
|
>
|
|
198
|
-
Save
|
|
199
|
+
{$t`Save`}
|
|
199
200
|
</Button>
|
|
200
201
|
</HStack>
|
|
201
202
|
{/if}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Text,
|
|
10
10
|
} from "@immich/ui";
|
|
11
11
|
import { useReportError } from "../../services/onboarding.service";
|
|
12
|
+
import { t } from "svelte-i18n-lingui";
|
|
12
13
|
|
|
13
14
|
type Props = {
|
|
14
15
|
error?: string;
|
|
@@ -23,10 +24,10 @@
|
|
|
23
24
|
mutation.mutate(undefined, { onSuccess: onQuit });
|
|
24
25
|
</script>
|
|
25
26
|
|
|
26
|
-
<Modal size="small" title=
|
|
27
|
+
<Modal size="small" title={$t`Something went wrong`} onClose={onQuit} icon={false}>
|
|
27
28
|
<ModalBody>
|
|
28
29
|
<Stack>
|
|
29
|
-
<Text>We ran into an error setting up backups
|
|
30
|
+
<Text>{$t`We ran into an error setting up backups...`}</Text>
|
|
30
31
|
{#if error}
|
|
31
32
|
<Text size="small" color="danger" class="font-mono whitespace-pre-wrap"
|
|
32
33
|
>{error}</Text
|
|
@@ -39,10 +40,10 @@
|
|
|
39
40
|
<Button
|
|
40
41
|
color="danger"
|
|
41
42
|
onclick={onReportAndQuit}
|
|
42
|
-
loading={mutation.isPending}>Report error and quit</Button
|
|
43
|
+
loading={mutation.isPending}>{$t`Report error and quit`}</Button
|
|
43
44
|
>
|
|
44
45
|
<Button variant="ghost" onclick={onQuit} disabled={mutation.isPending}
|
|
45
|
-
>Go back</Button
|
|
46
|
+
>{$t`Go back`}</Button
|
|
46
47
|
>
|
|
47
48
|
</HStack>
|
|
48
49
|
</ModalFooter>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
Text,
|
|
14
14
|
} from "@immich/ui";
|
|
15
15
|
import { onDestroy } from "svelte";
|
|
16
|
+
import { t } from "svelte-i18n-lingui";
|
|
16
17
|
|
|
17
18
|
type Props = {
|
|
18
19
|
onAuthenticated: () => void;
|
|
@@ -30,15 +31,14 @@
|
|
|
30
31
|
onDestroy(flow.stop);
|
|
31
32
|
</script>
|
|
32
33
|
|
|
33
|
-
<Modal title=
|
|
34
|
+
<Modal title={$t`Log in to FUTO Backups`} icon={false} onClose={() => {}}>
|
|
34
35
|
<ModalBody>
|
|
35
36
|
{#if flow.state.userCode}
|
|
36
37
|
<DeviceFlowCode {flow} />
|
|
37
38
|
{:else}
|
|
38
39
|
<Stack gap={4}>
|
|
39
40
|
<Text>
|
|
40
|
-
This instance is connected to a FUTO Backups account. Log in with that
|
|
41
|
-
account to manage it.
|
|
41
|
+
{$t`This instance is connected to a FUTO Backups account. Log in with that account to manage it.`}
|
|
42
42
|
</Text>
|
|
43
43
|
|
|
44
44
|
{#if flow.state.error}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
shape="round"
|
|
57
57
|
fullWidth
|
|
58
58
|
loading={flow.state.pending}
|
|
59
|
-
onclick={flow.start}>Log in with FUTO</Button
|
|
59
|
+
onclick={flow.start}>{$t`Log in with FUTO`}</Button
|
|
60
60
|
>
|
|
61
61
|
{/if}
|
|
62
62
|
</HStack>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
mdiDownloadOutline,
|
|
7
7
|
mdiPrinterOutline,
|
|
8
8
|
} from "@mdi/js";
|
|
9
|
+
import { t } from "svelte-i18n-lingui";
|
|
9
10
|
|
|
10
11
|
type Props = {
|
|
11
12
|
code: string;
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
leadingIcon={mdiContentCopy}
|
|
84
85
|
onclick={copyToClipboard}
|
|
85
86
|
>
|
|
86
|
-
Copy recovery key
|
|
87
|
+
{$t`Copy recovery key`}
|
|
87
88
|
</Button>
|
|
88
89
|
|
|
89
90
|
<HStack>
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
shape="round"
|
|
94
95
|
onclick={saveFile}
|
|
95
96
|
>
|
|
96
|
-
Download
|
|
97
|
+
{$t`Download`}
|
|
97
98
|
</Button>
|
|
98
99
|
<Button
|
|
99
100
|
leadingIcon={mdiPrinterOutline}
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
shape="round"
|
|
102
103
|
onclick={print}
|
|
103
104
|
>
|
|
104
|
-
Print
|
|
105
|
+
{$t`Print`}
|
|
105
106
|
</Button>
|
|
106
107
|
</HStack>
|
|
107
108
|
{#if PasswordCredential}
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
shape="round"
|
|
112
113
|
onclick={storeCredentials}
|
|
113
114
|
>
|
|
114
|
-
Save to password manager
|
|
115
|
+
{$t`Save to password manager`}
|
|
115
116
|
</Button>
|
|
116
117
|
{/if}
|
|
117
118
|
</VStack>
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import StepFinishSetup from "./steps/OnboardingStep1FinishSetup.svelte";
|
|
16
16
|
import StepConnectAccount from "./steps/OnboardingStep2ConnectAccount.svelte";
|
|
17
17
|
import StepSaveRecoveryKey from "./steps/OnboardingStep3SaveRecoveryKey.svelte";
|
|
18
|
+
import { t } from "svelte-i18n-lingui";
|
|
18
19
|
|
|
19
20
|
type Props = {
|
|
20
21
|
status: OnboardingStatusResponseDto;
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
</script>
|
|
71
72
|
|
|
72
73
|
{#if stage === "intro"}
|
|
73
|
-
<Modal size="small" title=
|
|
74
|
+
<Modal size="small" title={$t`FUTO Backups`} onClose={onCancel}>
|
|
74
75
|
<ModalBody>
|
|
75
76
|
<StepFinishSetup
|
|
76
77
|
onContinue={() =>
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
{:else if stage === "telemetry"}
|
|
83
84
|
<Telemetry onContinue={onTelemetryConfirmed} {onCancel} />
|
|
84
85
|
{:else if stage === "key"}
|
|
85
|
-
<Modal size="small" title=
|
|
86
|
+
<Modal size="small" title={$t`FUTO Backups`} onClose={onCancel}>
|
|
86
87
|
<ModalBody>
|
|
87
88
|
<StepSaveRecoveryKey
|
|
88
89
|
{code}
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
{onCancel}
|
|
102
103
|
/>
|
|
103
104
|
{:else if stage === "connect"}
|
|
104
|
-
<Modal size="small" title=
|
|
105
|
+
<Modal size="small" title={$t`FUTO Backups`} onClose={onCancel}>
|
|
105
106
|
<ModalBody>
|
|
106
107
|
<StepConnectAccount
|
|
107
108
|
onConnect={() => handleStartYuccaLogin(onFinish)}
|