@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
|
@@ -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
|
>
|
|
@@ -108,28 +98,32 @@
|
|
|
108
98
|
</Field>
|
|
109
99
|
|
|
110
100
|
{#if limited && quiet}
|
|
111
|
-
<
|
|
112
|
-
<
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
101
|
+
<div>
|
|
102
|
+
<HStack gap={4}>
|
|
103
|
+
<Field label={$t`From`} color="primary">
|
|
104
|
+
<Select
|
|
105
|
+
options={hours}
|
|
106
|
+
value={quietStart}
|
|
107
|
+
onChange={(value) => (quietStart = value)}
|
|
108
|
+
/>
|
|
109
|
+
</Field>
|
|
110
|
+
<Field label={$t`Until`} color="primary">
|
|
111
|
+
<Select
|
|
112
|
+
options={hours}
|
|
113
|
+
value={quietEnd}
|
|
114
|
+
onChange={(value) => (quietEnd = value)}
|
|
115
|
+
/>
|
|
116
|
+
</Field>
|
|
117
|
+
</HStack>
|
|
118
|
+
|
|
119
|
+
<div aria-live="polite">
|
|
120
|
+
{#if quietStart === quietEnd}
|
|
121
|
+
<Text size="small" color="muted" class="mt-4">
|
|
122
|
+
{$t`With the same start and end time, the limit never applies.`}
|
|
123
|
+
</Text>
|
|
124
|
+
{/if}
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
133
127
|
{/if}
|
|
134
128
|
|
|
135
129
|
<HStack gap={2} class="justify-end">
|
|
@@ -139,10 +133,10 @@
|
|
|
139
133
|
disabled={mutation.isPending}
|
|
140
134
|
onclick={load}
|
|
141
135
|
>
|
|
142
|
-
Reset
|
|
136
|
+
{$t`Reset`}
|
|
143
137
|
</Button>
|
|
144
138
|
<Button shape="round" loading={mutation.isPending} onclick={onSave}>
|
|
145
|
-
Save
|
|
139
|
+
{$t`Save`}
|
|
146
140
|
</Button>
|
|
147
141
|
</HStack>
|
|
148
142
|
{/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}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import {
|
|
21
21
|
Button,
|
|
22
22
|
Field,
|
|
23
|
+
HelperText,
|
|
23
24
|
HStack,
|
|
24
25
|
Input,
|
|
25
26
|
LoadingSpinner,
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
Switch,
|
|
29
30
|
} from "@immich/ui";
|
|
30
31
|
import { mdiDownloadBox } from "@mdi/js";
|
|
32
|
+
import { msg, t } from "svelte-i18n-lingui";
|
|
31
33
|
|
|
32
34
|
type RetentionChoice = {
|
|
33
35
|
key: string;
|
|
@@ -36,12 +38,12 @@
|
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
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:
|
|
41
|
+
{ key: "15d", label: msg`After 15 days`, policy: { keepWithin: "15d" } },
|
|
42
|
+
{ key: "30d", label: msg`After 30 days`, policy: { keepWithin: "30d" } },
|
|
43
|
+
{ key: "60d", label: msg`After 60 days`, policy: { keepWithin: "60d" } },
|
|
44
|
+
{ key: "90d", label: msg`After 90 days`, policy: { keepWithin: "90d" } },
|
|
45
|
+
{ key: "2", label: msg`Keep latest two backups`, policy: { keepLast: 2 } },
|
|
46
|
+
{ key: "never", label: msg`Never (keep all backups)`, policy: null },
|
|
45
47
|
];
|
|
46
48
|
|
|
47
49
|
const defaultRetentionKey = "60d";
|
|
@@ -80,6 +82,8 @@
|
|
|
80
82
|
let retentionKey = $state(defaultRetentionKey);
|
|
81
83
|
let loaded = false;
|
|
82
84
|
|
|
85
|
+
const nameMissing = $derived(name.trim().length === 0);
|
|
86
|
+
|
|
83
87
|
const load = () => {
|
|
84
88
|
if (!repository) {
|
|
85
89
|
return;
|
|
@@ -134,8 +138,8 @@
|
|
|
134
138
|
/>
|
|
135
139
|
|
|
136
140
|
<Accordion
|
|
137
|
-
title=
|
|
138
|
-
subtitle=
|
|
141
|
+
title={$t`Storage`}
|
|
142
|
+
subtitle={$t`Manage the backup name, where it is stored, and how long backups are kept.`}
|
|
139
143
|
icon={mdiDownloadBox}
|
|
140
144
|
>
|
|
141
145
|
<Stack gap={4} class="pt-2">
|
|
@@ -143,37 +147,41 @@
|
|
|
143
147
|
<LoadingSpinner />
|
|
144
148
|
{:else}
|
|
145
149
|
<Field
|
|
146
|
-
label=
|
|
147
|
-
description=
|
|
150
|
+
label={$t`Backup name`}
|
|
151
|
+
description={$t`How this backup is labelled across FUTO Backups.`}
|
|
148
152
|
required="indicator"
|
|
153
|
+
invalid={nameMissing}
|
|
149
154
|
>
|
|
150
155
|
<Input bind:value={name} />
|
|
156
|
+
{#if nameMissing}
|
|
157
|
+
<HelperText color="danger">{$t`Enter a backup name.`}</HelperText>
|
|
158
|
+
{/if}
|
|
151
159
|
</Field>
|
|
152
160
|
|
|
153
161
|
<BackendsList {repository} />
|
|
154
162
|
|
|
155
163
|
{#if repository?.worm}
|
|
156
164
|
<Button onclick={() => handleDisableWormRepository(repository.id, true)}>
|
|
157
|
-
Disable write-only
|
|
165
|
+
{$t`Disable write-only`}
|
|
158
166
|
</Button>
|
|
159
167
|
{:else}
|
|
160
168
|
<Field
|
|
161
|
-
label=
|
|
162
|
-
description=
|
|
169
|
+
label={$t`Write-only`}
|
|
170
|
+
description={$t`Once written, backups can't be removed.`}
|
|
163
171
|
>
|
|
164
172
|
<Switch bind:checked={worm} />
|
|
165
173
|
</Field>
|
|
166
174
|
{/if}
|
|
167
175
|
|
|
168
176
|
<Field
|
|
169
|
-
label=
|
|
170
|
-
description=
|
|
177
|
+
label={$t`Delete old backups`}
|
|
178
|
+
description={$t`Older snapshots are pruned automatically.`}
|
|
171
179
|
disabled={worm}
|
|
172
180
|
>
|
|
173
181
|
<Select
|
|
174
182
|
options={retentionChoices.map(({ key, label }) => ({
|
|
175
183
|
value: key,
|
|
176
|
-
label,
|
|
184
|
+
label: $t(label),
|
|
177
185
|
}))}
|
|
178
186
|
value={worm ? "never" : retentionKey}
|
|
179
187
|
onChange={(value) => (retentionKey = value)}
|
|
@@ -187,15 +195,15 @@
|
|
|
187
195
|
disabled={mutation.isPending}
|
|
188
196
|
onclick={load}
|
|
189
197
|
>
|
|
190
|
-
Reset
|
|
198
|
+
{$t`Reset`}
|
|
191
199
|
</Button>
|
|
192
200
|
<Button
|
|
193
201
|
shape="round"
|
|
194
|
-
disabled={
|
|
202
|
+
disabled={nameMissing}
|
|
195
203
|
loading={mutation.isPending}
|
|
196
204
|
onclick={onSave}
|
|
197
205
|
>
|
|
198
|
-
Save
|
|
206
|
+
{$t`Save`}
|
|
199
207
|
</Button>
|
|
200
208
|
</HStack>
|
|
201
209
|
{/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,21 +31,22 @@
|
|
|
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
|
+
</Stack>
|
|
43
44
|
|
|
45
|
+
<div role="alert">
|
|
44
46
|
{#if flow.state.error}
|
|
45
|
-
<Text color="danger">{flow.state.error}</Text>
|
|
47
|
+
<Text color="danger" class="mt-4">{flow.state.error}</Text>
|
|
46
48
|
{/if}
|
|
47
|
-
</
|
|
49
|
+
</div>
|
|
48
50
|
{/if}
|
|
49
51
|
</ModalBody>
|
|
50
52
|
<ModalFooter>
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
shape="round"
|
|
57
59
|
fullWidth
|
|
58
60
|
loading={flow.state.pending}
|
|
59
|
-
onclick={flow.start}>Log in with FUTO</Button
|
|
61
|
+
onclick={flow.start}>{$t`Log in with FUTO`}</Button
|
|
60
62
|
>
|
|
61
63
|
{/if}
|
|
62
64
|
</HStack>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { copyToClipboard } from "../../utils/clipboard";
|
|
2
3
|
import { Button, Card, CardBody, HStack, Text, VStack } from "@immich/ui";
|
|
3
4
|
import {
|
|
4
5
|
mdiAsterisk,
|
|
6
|
+
mdiCheck,
|
|
5
7
|
mdiContentCopy,
|
|
6
8
|
mdiDownloadOutline,
|
|
7
9
|
mdiPrinterOutline,
|
|
8
10
|
} from "@mdi/js";
|
|
11
|
+
import { t } from "svelte-i18n-lingui";
|
|
9
12
|
|
|
10
13
|
type Props = {
|
|
11
14
|
code: string;
|
|
@@ -21,6 +24,8 @@
|
|
|
21
24
|
.join("\n"),
|
|
22
25
|
);
|
|
23
26
|
|
|
27
|
+
let downloaded = $state(false);
|
|
28
|
+
|
|
24
29
|
const print = () => window.print();
|
|
25
30
|
|
|
26
31
|
const saveFile = async () => {
|
|
@@ -46,9 +51,11 @@
|
|
|
46
51
|
|
|
47
52
|
URL.revokeObjectURL(url);
|
|
48
53
|
}
|
|
54
|
+
|
|
55
|
+
downloaded = true;
|
|
49
56
|
};
|
|
50
57
|
|
|
51
|
-
const
|
|
58
|
+
const copyCode = () => copyToClipboard(code);
|
|
52
59
|
|
|
53
60
|
const PasswordCredential =
|
|
54
61
|
typeof window !== "undefined"
|
|
@@ -68,9 +75,9 @@
|
|
|
68
75
|
};
|
|
69
76
|
</script>
|
|
70
77
|
|
|
71
|
-
<Card color="primary" class="shadow-none">
|
|
72
|
-
<CardBody class="flex justify-center">
|
|
73
|
-
<Text size="large" fontWeight="semi-bold"
|
|
78
|
+
<Card color="primary" class="shadow-none border-none">
|
|
79
|
+
<CardBody class="flex justify-center py-8">
|
|
80
|
+
<Text size="large" fontWeight="semi-bold" class="tracking-wider"
|
|
74
81
|
><pre><code>{code}</code></pre></Text
|
|
75
82
|
>
|
|
76
83
|
</CardBody>
|
|
@@ -80,20 +87,21 @@
|
|
|
80
87
|
<Button
|
|
81
88
|
shape="round"
|
|
82
89
|
variant="outline"
|
|
83
|
-
leadingIcon={
|
|
84
|
-
|
|
90
|
+
leadingIcon={downloaded ? mdiCheck : mdiDownloadOutline}
|
|
91
|
+
class={downloaded ? "bg-primary/10" : undefined}
|
|
92
|
+
onclick={saveFile}
|
|
85
93
|
>
|
|
86
|
-
|
|
94
|
+
{downloaded ? $t`Downloaded` : $t`Download recovery key`}
|
|
87
95
|
</Button>
|
|
88
96
|
|
|
89
97
|
<HStack>
|
|
90
98
|
<Button
|
|
91
|
-
leadingIcon={
|
|
99
|
+
leadingIcon={mdiContentCopy}
|
|
92
100
|
variant="ghost"
|
|
93
101
|
shape="round"
|
|
94
|
-
onclick={
|
|
102
|
+
onclick={copyCode}
|
|
95
103
|
>
|
|
96
|
-
|
|
104
|
+
{$t`Copy`}
|
|
97
105
|
</Button>
|
|
98
106
|
<Button
|
|
99
107
|
leadingIcon={mdiPrinterOutline}
|
|
@@ -101,7 +109,7 @@
|
|
|
101
109
|
shape="round"
|
|
102
110
|
onclick={print}
|
|
103
111
|
>
|
|
104
|
-
Print
|
|
112
|
+
{$t`Print`}
|
|
105
113
|
</Button>
|
|
106
114
|
</HStack>
|
|
107
115
|
{#if PasswordCredential}
|
|
@@ -111,7 +119,7 @@
|
|
|
111
119
|
shape="round"
|
|
112
120
|
onclick={storeCredentials}
|
|
113
121
|
>
|
|
114
|
-
Save to password manager
|
|
122
|
+
{$t`Save to password manager`}
|
|
115
123
|
</Button>
|
|
116
124
|
{/if}
|
|
117
125
|
</VStack>
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
handleConfirmRecoveryKey,
|
|
9
9
|
handleCurrentRecoveryKey,
|
|
10
10
|
} from "../../services/onboarding.service";
|
|
11
|
-
import { Modal, ModalBody } from "@immich/ui";
|
|
12
11
|
import { onMount } from "svelte";
|
|
13
|
-
import ImportKey from "./stages/OnboardingStageKeyImport.svelte";
|
|
14
|
-
import Telemetry from "./stages/OnboardingStageTelemetry.svelte";
|
|
15
12
|
import StepFinishSetup from "./steps/OnboardingStep1FinishSetup.svelte";
|
|
16
13
|
import StepConnectAccount from "./steps/OnboardingStep2ConnectAccount.svelte";
|
|
14
|
+
import StepImportRecoveryKey from "./steps/OnboardingStepImportRecoveryKey.svelte";
|
|
15
|
+
import StepModal from "./steps/OnboardingStepModal.svelte";
|
|
17
16
|
import StepSaveRecoveryKey from "./steps/OnboardingStep3SaveRecoveryKey.svelte";
|
|
17
|
+
import StepTelemetry from "./steps/OnboardingStepTelemetry.svelte";
|
|
18
|
+
import { t } from "svelte-i18n-lingui";
|
|
18
19
|
|
|
19
20
|
type Props = {
|
|
20
21
|
status: OnboardingStatusResponseDto;
|
|
@@ -70,43 +71,44 @@
|
|
|
70
71
|
</script>
|
|
71
72
|
|
|
72
73
|
{#if stage === "intro"}
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</ModalBody>
|
|
81
|
-
</Modal>
|
|
74
|
+
<StepModal title={$t`Finish setting up FUTO Backups`} onClose={onCancel}>
|
|
75
|
+
<StepFinishSetup
|
|
76
|
+
onContinue={() =>
|
|
77
|
+
(stage = status.hasTelemetry === "none" ? "telemetry" : "key")}
|
|
78
|
+
onImportKey={() => (stage = "key-import")}
|
|
79
|
+
/>
|
|
80
|
+
</StepModal>
|
|
82
81
|
{:else if stage === "telemetry"}
|
|
83
|
-
<
|
|
82
|
+
<StepModal
|
|
83
|
+
title={$t`Telemetry required for closed beta`}
|
|
84
|
+
onClose={onCancel}
|
|
85
|
+
>
|
|
86
|
+
<StepTelemetry onContinue={onTelemetryConfirmed} {onCancel} />
|
|
87
|
+
</StepModal>
|
|
84
88
|
{:else if stage === "key"}
|
|
85
|
-
<
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</ModalBody>
|
|
93
|
-
</Modal>
|
|
89
|
+
<StepModal title={$t`Save your recovery key`} onClose={onCancel}>
|
|
90
|
+
<StepSaveRecoveryKey
|
|
91
|
+
{code}
|
|
92
|
+
onContinue={onConfirmKey}
|
|
93
|
+
loading={confirming}
|
|
94
|
+
/>
|
|
95
|
+
</StepModal>
|
|
94
96
|
{:else if stage === "key-import"}
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
<StepModal title={$t`Import recovery key`} onClose={onCancel}>
|
|
98
|
+
<StepImportRecoveryKey
|
|
99
|
+
onBack={() => (stage = "intro")}
|
|
100
|
+
onImported={(key) => {
|
|
101
|
+
code = key;
|
|
102
|
+
stage = "key";
|
|
103
|
+
}}
|
|
104
|
+
{onCancel}
|
|
105
|
+
/>
|
|
106
|
+
</StepModal>
|
|
103
107
|
{:else if stage === "connect"}
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
</ModalBody>
|
|
111
|
-
</Modal>
|
|
108
|
+
<StepModal title={$t`Connect your FUTO account`} onClose={onCancel}>
|
|
109
|
+
<StepConnectAccount
|
|
110
|
+
onConnect={() => handleStartYuccaLogin(onFinish)}
|
|
111
|
+
onLocalStorage={() => handleSetupLocalStorage(onFinish)}
|
|
112
|
+
/>
|
|
113
|
+
</StepModal>
|
|
112
114
|
{/if}
|