@futo-org/backups-orchestrator-ui 0.45.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.
Files changed (121) hide show
  1. package/dist/components/backends/BackendItem.svelte +17 -13
  2. package/dist/components/backends/BackendsList.svelte +4 -3
  3. package/dist/components/backends/dialogs/CreateLocalBackendModal.svelte +6 -5
  4. package/dist/components/backends/dialogs/OAuthDeviceFlowModal.svelte +3 -2
  5. package/dist/components/backends/dialogs/SelectBackendModal.svelte +7 -6
  6. package/dist/components/backups/BackupItem.svelte +13 -12
  7. package/dist/components/backups/BackupStatus.svelte +45 -40
  8. package/dist/components/backups/BackupsList.svelte +6 -5
  9. package/dist/components/backups/dialogs/ConfigureRepositoryModal.svelte +9 -8
  10. package/dist/components/backups/dialogs/CreateRepositoryModal.svelte +8 -4
  11. package/dist/components/backups/dialogs/ImportRepositoryModal.svelte +5 -4
  12. package/dist/components/backups/dialogs/ReconfigureRepositoryBackendModal.svelte +3 -3
  13. package/dist/components/backups/dialogs/RestoreSnapshotModal.svelte +16 -15
  14. package/dist/components/backups/dialogs/RollbackSnapshotModal.svelte +9 -8
  15. package/dist/components/backups/dialogs/SelectRepositoryModal.svelte +13 -7
  16. package/dist/components/backups/dialogs/ViewStatusModal.svelte +50 -19
  17. package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +37 -21
  18. package/dist/components/backups/run-history/RepositoryRunHistory.svelte +4 -3
  19. package/dist/components/backups/run-history/RepositoryRunHistoryItem.svelte +32 -12
  20. package/dist/components/backups/run-history/RepositoryRunHistoryPage.svelte +16 -14
  21. package/dist/components/backups/run-history/RunHistoryModal.svelte +5 -1
  22. package/dist/components/backups/snapshots-list/RepositorySnapshotsList.svelte +5 -4
  23. package/dist/components/backups/snapshots-list/RepositorySnapshotsListItem.svelte +15 -5
  24. package/dist/components/backups/snapshots-list/RepositorySnapshotsPage.svelte +7 -6
  25. package/dist/components/backups/snapshots-list/SnapshotsListModal.svelte +5 -1
  26. package/dist/components/dashboard/DashboardAvgBackupTime.svelte +2 -1
  27. package/dist/components/dashboard/DashboardBackupHealth.svelte +14 -10
  28. package/dist/components/dashboard/DashboardCurrentUsage.svelte +2 -1
  29. package/dist/components/dashboard/DashboardDailyBackupTime.svelte +2 -1
  30. package/dist/components/dashboard/DashboardInstall.svelte +3 -2
  31. package/dist/components/dashboard/DashboardRecentBackups.svelte +9 -4
  32. package/dist/components/dashboard/DashboardTotalStored.svelte +7 -2
  33. package/dist/components/integrations/immich/ImmichBackupSettingsPage.svelte +2 -0
  34. package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte +2 -1
  35. package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte +22 -14
  36. package/dist/components/integrations/immich/ImmichDatabaseDumpAlert.svelte +43 -0
  37. package/dist/components/integrations/immich/ImmichDatabaseDumpAlert.svelte.d.ts +18 -0
  38. package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +15 -14
  39. package/dist/components/integrations/immich/ImmichManageBackupPage.svelte +5 -2
  40. package/dist/components/integrations/immich/ImmichOnboardingSetupFlow.svelte +2 -1
  41. package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +32 -31
  42. package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte +140 -0
  43. package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte.d.ts +3 -0
  44. package/dist/components/integrations/immich/settings/ImmichSettingsSchedule.svelte +16 -15
  45. package/dist/components/integrations/immich/settings/ImmichSettingsStorage.svelte +19 -18
  46. package/dist/components/onboarding/OnboardingBootstrapError.svelte +5 -4
  47. package/dist/components/onboarding/OnboardingLogin.svelte +4 -4
  48. package/dist/components/onboarding/RecoveryKeyDisplay.svelte +5 -4
  49. package/dist/components/onboarding/SampleOnboarding.svelte +4 -3
  50. package/dist/components/onboarding/dialogs/BackupsRecoveryKeyModal.svelte +4 -3
  51. package/dist/components/onboarding/restore-point-flow/RestorePointFlow.svelte +2 -1
  52. package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte +8 -4
  53. package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +9 -8
  54. package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +2 -1
  55. package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte +9 -6
  56. package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte +6 -5
  57. package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte +6 -7
  58. package/dist/components/onboarding/steps/OnboardingStep1FinishSetup.svelte +12 -11
  59. package/dist/components/onboarding/steps/OnboardingStep2ConnectAccount.svelte +13 -12
  60. package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte +5 -4
  61. package/dist/components/onboarding/steps/OnboardingStep4FirstBackup.svelte +8 -8
  62. package/dist/components/onboarding/upsell/UpsellBackupFeaturesGrid.svelte +11 -14
  63. package/dist/components/onboarding/upsell/UpsellBackupFeaturesGrid.svelte.d.ts +2 -17
  64. package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte +10 -5
  65. package/dist/components/onboarding/upsell/UpsellFrequentlyAskedQuestions.svelte +2 -1
  66. package/dist/components/onboarding/upsell/UpsellFutoBackupsBadge.svelte +2 -1
  67. package/dist/components/onboarding/upsell/UpsellHowItWorks.svelte +10 -10
  68. package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte +14 -11
  69. package/dist/components/schedules/RepositoryPicker.svelte +8 -7
  70. package/dist/components/schedules/ScheduleItem.svelte +6 -5
  71. package/dist/components/schedules/ScheduleList.svelte +4 -3
  72. package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +4 -3
  73. package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +7 -3
  74. package/dist/components/settings/SettingsBackends.svelte +3 -2
  75. package/dist/components/settings/SettingsBilling.svelte +13 -12
  76. package/dist/components/settings/SettingsNotifications.svelte +11 -10
  77. package/dist/components/ui/PageLayout.svelte +3 -2
  78. package/dist/components/ui/Pagination.svelte +4 -3
  79. package/dist/components/ui/PathListField.svelte +5 -4
  80. package/dist/components/ui/PathPickerField.svelte +4 -3
  81. package/dist/components/ui/PathPickerModal.svelte +16 -13
  82. package/dist/components/ui/StackListItem.svelte +2 -1
  83. package/dist/components/util/DeviceFlowAction.svelte +3 -2
  84. package/dist/components/util/DeviceFlowCode.svelte +4 -3
  85. package/dist/components/util/RelativeTime.svelte +2 -1
  86. package/dist/fetch-client.d.ts +24 -0
  87. package/dist/fetch-client.js +25 -0
  88. package/dist/i18n.d.ts +3 -0
  89. package/dist/i18n.js +13 -0
  90. package/dist/index.d.ts +1 -0
  91. package/dist/index.js +1 -0
  92. package/dist/locales/en-XA.d.ts +2 -0
  93. package/dist/locales/en-XA.js +1 -0
  94. package/dist/locales/en-XA.po +2198 -0
  95. package/dist/locales/en.d.ts +2 -0
  96. package/dist/locales/en.js +1 -0
  97. package/dist/locales/en.po +2446 -0
  98. package/dist/services/backend.service.d.ts +2 -1
  99. package/dist/services/backend.service.js +6 -5
  100. package/dist/services/config.service.d.ts +17 -0
  101. package/dist/services/config.service.js +37 -0
  102. package/dist/services/deviceFlow.service.svelte.js +6 -5
  103. package/dist/services/filesystem.service.js +2 -1
  104. package/dist/services/immich.integration.service.d.ts +6 -1
  105. package/dist/services/immich.integration.service.js +32 -6
  106. package/dist/services/integrations.service.js +4 -3
  107. package/dist/services/log.service.svelte.js +9 -3
  108. package/dist/services/onboarding.service.js +8 -7
  109. package/dist/services/repository.service.d.ts +2 -1
  110. package/dist/services/repository.service.js +19 -18
  111. package/dist/services/runHistory.service.d.ts +2 -1
  112. package/dist/services/runHistory.service.js +5 -4
  113. package/dist/services/schedule.service.d.ts +2 -1
  114. package/dist/services/schedule.service.js +18 -17
  115. package/dist/services/session.service.js +2 -1
  116. package/dist/services/snapshot.service.d.ts +2 -1
  117. package/dist/services/snapshot.service.js +15 -14
  118. package/dist/services/task.service.js +3 -2
  119. package/dist/utils/format.js +10 -8
  120. package/dist/utils/handle-error.js +2 -1
  121. package/package.json +12 -5
@@ -10,7 +10,9 @@
10
10
  useImmichBackupStatusEventHandler,
11
11
  } from "../../../services/immich.integration.service";
12
12
  import { Container, Stack } from "@immich/ui";
13
+ import ImmichDatabaseDumpAlert from "./ImmichDatabaseDumpAlert.svelte";
13
14
  import ImmichManageBackupOverview from "./ImmichManageBackupOverview.svelte";
15
+ import { t } from "svelte-i18n-lingui";
14
16
 
15
17
  type Props = {
16
18
  onConfigure: () => void;
@@ -25,16 +27,17 @@
25
27
  const { repository, schedule } = $derived(backup);
26
28
 
27
29
  const { ViewRecoveryKey, Configure } = $derived(
28
- getBackupPageActions(repository?.id, onConfigure),
30
+ getBackupPageActions(repository?.id, onConfigure, $t),
29
31
  );
30
32
  </script>
31
33
 
32
34
  <OnEvents {...useImmichBackupStatusEventHandler()} />
33
35
 
34
- <PageLayout title="Backups" actions={[ViewRecoveryKey, Configure]}>
36
+ <PageLayout title={$t`Backups`} actions={[ViewRecoveryKey, Configure]}>
35
37
  <Container size="medium" center>
36
38
  {#if repository && schedule}
37
39
  <Stack class="mt-4" gap={6}>
40
+ <ImmichDatabaseDumpAlert />
38
41
  <ImmichManageBackupOverview {repository} {schedule} status={backup.status} />
39
42
  <BackendsList {repository} />
40
43
  <RepositoryRunHistory {repository} onViewAll={onViewAttempts} />
@@ -24,6 +24,7 @@
24
24
  import { LoadingSpinner, Modal, ModalBody } from "@immich/ui";
25
25
  import cronstrue from "cronstrue";
26
26
  import { onMount, type Snippet } from "svelte";
27
+ import { t } from "svelte-i18n-lingui";
27
28
 
28
29
  type Stage =
29
30
  | "idle"
@@ -91,7 +92,7 @@
91
92
  };
92
93
 
93
94
  const onLocalStorage = () => {
94
- storageLocation = "Local Storage";
95
+ storageLocation = $t`Local Storage`;
95
96
  handleSetupLocalStorage(onBackendReady);
96
97
  };
97
98
 
@@ -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: "Photos and videos",
45
- description: "Your media uploaded directly to Immich.",
45
+ label: msg`Photos and videos`,
46
+ description: msg`Your media uploaded directly to Immich.`,
46
47
  folders: ["upload", "profile", "library"],
47
- warning: "It is highly recommended you back this up!",
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: "Database and metadata",
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: "Thumbnails and previews",
61
- description: "Generated photo previews, can be recreated later.",
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: "Encoded videos",
70
- description: "Generated video previews, can be recreated later.",
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: "All libraries" },
111
- { value: "none", label: "No libraries" },
112
- { value: "some", label: "Choose libraries" },
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="Backup Contents"
220
- subtitle="Choose what Immich includes in each backup."
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="Backup configuration"
257
- description="Include these backup settings, so they survive a restore."
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="External libraries"
271
- description="Libraries stored outside of Immich. New libraries are included automatically unless you choose specific ones."
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.</Text>
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
- Included: {libraries.map((library) => library.name).join(", ")}
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}
@@ -0,0 +1,140 @@
1
+ <script lang="ts">
2
+ import Accordion from "../../../ui/Accordion.svelte";
3
+ import {
4
+ defaultQuietHoursEnd,
5
+ defaultQuietHoursStart,
6
+ toBandwidthDto,
7
+ toBandwidthForm,
8
+ toBytesPerSec,
9
+ useConfig,
10
+ useUpdateConfig,
11
+ } from "../../../../services/config.service";
12
+ import {
13
+ Button,
14
+ Field,
15
+ HStack,
16
+ LoadingSpinner,
17
+ NumberInput,
18
+ Select,
19
+ Stack,
20
+ Switch,
21
+ Text,
22
+ } from "@immich/ui";
23
+ import { mdiSpeedometerSlow } from "@mdi/js";
24
+ import { t } from "svelte-i18n-lingui";
25
+
26
+ const hours = Array.from({ length: 24 }, (_, hour) => ({
27
+ value: `${String(hour).padStart(2, "0")}:00`,
28
+ label: `${String(hour).padStart(2, "0")}:00`,
29
+ }));
30
+
31
+ const config = useConfig();
32
+ const mutation = useUpdateConfig();
33
+
34
+ let mbps = $state<number>();
35
+ let quiet = $state(false);
36
+ let quietStart = $state(defaultQuietHoursStart);
37
+ let quietEnd = $state(defaultQuietHoursEnd);
38
+ let loaded = false;
39
+
40
+ const load = () => {
41
+ if (!config.data) {
42
+ return;
43
+ }
44
+
45
+ ({ mbps, quiet, quietStart, quietEnd } = toBandwidthForm(
46
+ config.data.bandwidth,
47
+ ));
48
+ };
49
+
50
+ $effect(() => {
51
+ if (loaded || !config.data) {
52
+ return;
53
+ }
54
+
55
+ loaded = true;
56
+ load();
57
+ });
58
+
59
+ const limited = $derived(toBytesPerSec(mbps) > 0);
60
+
61
+ const onSave = () => {
62
+ mutation.mutate({
63
+ bandwidth: toBandwidthDto({ mbps, quiet, quietStart, quietEnd }),
64
+ });
65
+ };
66
+ </script>
67
+
68
+ <Accordion
69
+ title={$t`Bandwidth`}
70
+ subtitle={$t`Manage how fast backups upload.`}
71
+ icon={mdiSpeedometerSlow}
72
+ >
73
+ <Stack gap={4} class="pt-2">
74
+ {#if config.isLoading}
75
+ <LoadingSpinner />
76
+ {:else}
77
+ <Field
78
+ label={$t`Upload speed`}
79
+ description={$t`Slow down backup uploads without affecting restores. Leave empty for no limit.`}
80
+ color="primary"
81
+ >
82
+ <NumberInput
83
+ bind:value={mbps}
84
+ min={0}
85
+ step={1}
86
+ placeholder={$t`No limit`}
87
+ trailingText="Mbps"
88
+ />
89
+ </Field>
90
+
91
+ <Field
92
+ label={$t`Full speed during quiet hours`}
93
+ description={$t`Lift the limit while you are asleep.`}
94
+ color="primary"
95
+ disabled={!limited}
96
+ >
97
+ <Switch bind:checked={quiet} />
98
+ </Field>
99
+
100
+ {#if limited && quiet}
101
+ <HStack gap={4}>
102
+ <Field label={$t`From`} color="primary">
103
+ <Select
104
+ options={hours}
105
+ value={quietStart}
106
+ onChange={(value) => (quietStart = value)}
107
+ />
108
+ </Field>
109
+ <Field label={$t`Until`} color="primary">
110
+ <Select
111
+ options={hours}
112
+ value={quietEnd}
113
+ onChange={(value) => (quietEnd = value)}
114
+ />
115
+ </Field>
116
+ </HStack>
117
+
118
+ {#if quietStart === quietEnd}
119
+ <Text size="small" color="muted">
120
+ {$t`With the same start and end time, the limit never applies.`}
121
+ </Text>
122
+ {/if}
123
+ {/if}
124
+
125
+ <HStack gap={2} class="justify-end">
126
+ <Button
127
+ shape="round"
128
+ color="secondary"
129
+ disabled={mutation.isPending}
130
+ onclick={load}
131
+ >
132
+ {$t`Reset`}
133
+ </Button>
134
+ <Button shape="round" loading={mutation.isPending} onclick={onSave}>
135
+ {$t`Save`}
136
+ </Button>
137
+ </HStack>
138
+ {/if}
139
+ </Stack>
140
+ </Accordion>
@@ -0,0 +1,3 @@
1
+ declare const ImmichSettingsBandwidth: import("svelte").Component<Record<string, never>, {}, "">;
2
+ type ImmichSettingsBandwidth = ReturnType<typeof ImmichSettingsBandwidth>;
3
+ export default ImmichSettingsBandwidth;
@@ -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: "Daily" },
34
- { value: "weekly", label: "Weekly" },
35
- { value: "monthly", label: "Monthly" },
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="Schedule"
162
- subtitle="Manage when backups run."
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="Run backups automatically"
171
- description="Back up your library on a recurring schedule."
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="Frequency"
179
- description="How often backups should run."
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="Start time"
189
- description="When the scheduled backup starts."
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: "After 15 days", policy: { keepWithin: "15d" } },
40
- { key: "30d", label: "After 30 days", policy: { keepWithin: "30d" } },
41
- { key: "60d", label: "After 60 days", policy: { keepWithin: "60d" } },
42
- { key: "90d", label: "After 90 days", policy: { keepWithin: "90d" } },
43
- { key: "2", label: "Keep latest two backups", policy: { keepLast: 2 } },
44
- { key: "never", label: "Never (keep all backups)", policy: null },
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="Storage"
138
- subtitle="Manage the backup name, where it is stored, and how long backups are kept."
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="Backup name"
147
- description="How this backup is labelled across FUTO Backups."
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="Write-only"
162
- description="Once written, backups can't be removed."
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="Delete old backups"
170
- description="Older snapshots are pruned automatically."
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="Something went wrong" onClose={onQuit} icon={false}>
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...</Text>
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="Log in to FUTO Backups" icon={false} onClose={() => {}}>
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>