@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
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { Badge, Icon } from "@immich/ui";
|
|
13
13
|
import { mdiCloudOutline, mdiHarddisk, mdiShieldCheckOutline } from "@mdi/js";
|
|
14
14
|
import StackListItem from "../ui/StackListItem.svelte";
|
|
15
|
+
import { t, msg } from "svelte-i18n-lingui";
|
|
15
16
|
|
|
16
17
|
type Props = {
|
|
17
18
|
repository?: LocalRepositoryDto;
|
|
@@ -28,21 +29,24 @@
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
const BackendNames: Record<BackendType, string> = {
|
|
31
|
-
yucca:
|
|
32
|
-
local:
|
|
33
|
-
s3:
|
|
32
|
+
yucca: msg`FUTO Backups`,
|
|
33
|
+
local: msg`Local Storage`,
|
|
34
|
+
s3: msg`S3 Server`,
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
const BackendDescriptions: Record<BackendType, string> = {
|
|
37
|
-
yucca:
|
|
38
|
-
local:
|
|
39
|
-
s3:
|
|
38
|
+
yucca: msg`Hosted cloud backup storage`,
|
|
39
|
+
local: msg`A folder on this computer`,
|
|
40
|
+
s3: msg`An S3-compatible server`,
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
const title = $derived(
|
|
43
44
|
repositoryBackend?.primary
|
|
44
|
-
?
|
|
45
|
-
|
|
45
|
+
? $t({
|
|
46
|
+
message: "{name} (primary)",
|
|
47
|
+
values: { name: $t(BackendNames[backend.type]) },
|
|
48
|
+
})
|
|
49
|
+
: $t(BackendNames[backend.type]),
|
|
46
50
|
);
|
|
47
51
|
|
|
48
52
|
const online = $derived(
|
|
@@ -50,7 +54,7 @@
|
|
|
50
54
|
);
|
|
51
55
|
|
|
52
56
|
const { LoginAgain, Reconfigure } = $derived(
|
|
53
|
-
getBackendActions(repository, backend, repositoryBackend, () =>
|
|
57
|
+
getBackendActions(repository, backend, $t, repositoryBackend, () =>
|
|
54
58
|
handleStartYuccaLogin(),
|
|
55
59
|
),
|
|
56
60
|
);
|
|
@@ -61,16 +65,16 @@
|
|
|
61
65
|
<Icon icon={BackendIcons[backend.type]} />
|
|
62
66
|
{/snippet}
|
|
63
67
|
|
|
64
|
-
{backend.description ?? BackendDescriptions[backend.type]}
|
|
68
|
+
{backend.description ?? $t(BackendDescriptions[backend.type])}
|
|
65
69
|
|
|
66
70
|
{#snippet trailing()}
|
|
67
71
|
<Badge color={online ? "success" : "danger"} size="small">
|
|
68
72
|
{#if !backend.isOnline}
|
|
69
|
-
Offline
|
|
73
|
+
{$t`Offline`}
|
|
70
74
|
{:else if repositoryBackend}
|
|
71
|
-
{repositoryBackend.online ?
|
|
75
|
+
{repositoryBackend.online ? $t`Active` : $t`Missing on service`}
|
|
72
76
|
{:else}
|
|
73
|
-
Online
|
|
77
|
+
{$t`Online`}
|
|
74
78
|
{/if}
|
|
75
79
|
</Badge>
|
|
76
80
|
{/snippet}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import OnEvents from "../util/OnEvents.svelte";
|
|
13
13
|
import Suspense from "../util/Suspense.svelte";
|
|
14
14
|
import BackendItem from "./BackendItem.svelte";
|
|
15
|
+
import { t } from "svelte-i18n-lingui";
|
|
15
16
|
|
|
16
17
|
type Props = {
|
|
17
18
|
repository?: LocalRepositoryDto;
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
<OnEvents {onBackendCreate} />
|
|
41
42
|
|
|
42
43
|
{#snippet heading()}
|
|
43
|
-
Where your backup is stored
|
|
44
|
+
{$t`Where your backup is stored`}
|
|
44
45
|
{/snippet}
|
|
45
46
|
|
|
46
47
|
<StackList title={repository ? heading : undefined}>
|
|
@@ -64,12 +65,12 @@
|
|
|
64
65
|
<Button
|
|
65
66
|
size="small"
|
|
66
67
|
variant="outline"
|
|
67
|
-
onclick={() => handleStartYuccaLogin()}>Login with FUTO Backups</Button
|
|
68
|
+
onclick={() => handleStartYuccaLogin()}>{$t`Login with FUTO Backups`}</Button
|
|
68
69
|
>
|
|
69
70
|
<Button
|
|
70
71
|
size="small"
|
|
71
72
|
variant="outline"
|
|
72
|
-
onclick={() => handleSetupLocalStorage()}>New local storage</Button
|
|
73
|
+
onclick={() => handleSetupLocalStorage()}>{$t`New local storage`}</Button
|
|
73
74
|
>
|
|
74
75
|
</HStack>
|
|
75
76
|
{/if}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import PathPickerField from "../../ui/PathPickerField.svelte";
|
|
3
3
|
import { useCreateLocalBackend } from "../../../services/backend.service";
|
|
4
4
|
import { FormModal, Stack } from "@immich/ui";
|
|
5
|
+
import { t } from "svelte-i18n-lingui";
|
|
5
6
|
|
|
6
7
|
type Props = {
|
|
7
8
|
onClose: () => void;
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
|
|
29
30
|
<FormModal
|
|
30
31
|
size="small"
|
|
31
|
-
title=
|
|
32
|
+
title={$t`Create local backend`}
|
|
32
33
|
disabled={path.length === 0 || mutation.isPending}
|
|
33
34
|
{onSubmit}
|
|
34
35
|
{onClose}
|
|
@@ -36,11 +37,11 @@
|
|
|
36
37
|
<Stack gap={4}>
|
|
37
38
|
<PathPickerField
|
|
38
39
|
bind:value={path}
|
|
39
|
-
pickerTitle=
|
|
40
|
-
pickerDescription=
|
|
40
|
+
pickerTitle={$t`Choose backend folder`}
|
|
41
|
+
pickerDescription={$t`Pick the local directory where backups will be stored.`}
|
|
41
42
|
>
|
|
42
|
-
{#snippet title()}Path{/snippet}
|
|
43
|
-
{#snippet description()}Local directory to store backups
|
|
43
|
+
{#snippet title()}{$t`Path`}{/snippet}
|
|
44
|
+
{#snippet description()}{$t`Local directory to store backups.`}{/snippet}
|
|
44
45
|
</PathPickerField>
|
|
45
46
|
</Stack>
|
|
46
47
|
</FormModal>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
} from "@immich/ui";
|
|
18
18
|
import { onDestroy } from "svelte";
|
|
19
19
|
import OnEvents from "../../util/OnEvents.svelte";
|
|
20
|
+
import { t } from "svelte-i18n-lingui";
|
|
20
21
|
|
|
21
22
|
type Props = {
|
|
22
23
|
onCreate?: (backendId: string) => void;
|
|
@@ -50,20 +51,24 @@
|
|
|
50
51
|
|
|
51
52
|
<OnEvents {onBackendCreate} />
|
|
52
53
|
|
|
53
|
-
<Modal title=
|
|
54
|
+
<Modal title={$t`Logging into FUTO Backups`} icon={false} {onClose}>
|
|
54
55
|
<ModalBody>
|
|
55
56
|
{#if flow.state.userCode}
|
|
56
57
|
<DeviceFlowCode {flow} />
|
|
57
|
-
{:else if flow.state.error}
|
|
58
|
-
<Text color="danger">{flow.state.error}</Text>
|
|
59
|
-
{:else}
|
|
58
|
+
{:else if !flow.state.error}
|
|
60
59
|
<LoadingSpinner />
|
|
61
60
|
{/if}
|
|
61
|
+
|
|
62
|
+
<div role="alert">
|
|
63
|
+
{#if !flow.state.userCode && flow.state.error}
|
|
64
|
+
<Text color="danger">{flow.state.error}</Text>
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
62
67
|
</ModalBody>
|
|
63
68
|
<ModalFooter>
|
|
64
69
|
<HStack fullWidth>
|
|
65
70
|
<Button shape="round" color="secondary" fullWidth onclick={onClose}>
|
|
66
|
-
Cancel
|
|
71
|
+
{$t`Cancel`}
|
|
67
72
|
</Button>
|
|
68
73
|
<DeviceFlowAction {flow} />
|
|
69
74
|
</HStack>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
} from "@immich/ui";
|
|
19
19
|
import { mdiHarddisk, mdiShieldCheck } from "@mdi/js";
|
|
20
20
|
import type { Snippet } from "svelte";
|
|
21
|
+
import { t } from "svelte-i18n-lingui";
|
|
21
22
|
|
|
22
23
|
type Props = {
|
|
23
24
|
title?: string;
|
|
@@ -63,25 +64,25 @@
|
|
|
63
64
|
<StackList>
|
|
64
65
|
<StackListOption
|
|
65
66
|
{disabled}
|
|
66
|
-
title=
|
|
67
|
+
title={$t`FUTO Backups`}
|
|
67
68
|
onclick={onFutoBackups}
|
|
68
69
|
>
|
|
69
70
|
{#snippet icon()}
|
|
70
71
|
<Icon icon={mdiShieldCheck} />
|
|
71
72
|
{/snippet}
|
|
72
73
|
|
|
73
|
-
Simple, hosted backups
|
|
74
|
+
{$t`Simple, hosted backups.`}
|
|
74
75
|
</StackListOption>
|
|
75
76
|
<StackListOption
|
|
76
77
|
{disabled}
|
|
77
|
-
title=
|
|
78
|
+
title={$t`Local Storage`}
|
|
78
79
|
onclick={onLocalBackups}
|
|
79
80
|
>
|
|
80
81
|
{#snippet icon()}
|
|
81
82
|
<Icon icon={mdiHarddisk} />
|
|
82
83
|
{/snippet}
|
|
83
84
|
|
|
84
|
-
A folder on this computer
|
|
85
|
+
{$t`A folder on this computer.`}
|
|
85
86
|
</StackListOption>
|
|
86
87
|
|
|
87
88
|
<Suspense query={backends}>
|
|
@@ -90,7 +91,7 @@
|
|
|
90
91
|
{#if backend.type === "local"}
|
|
91
92
|
<StackListOption
|
|
92
93
|
{disabled}
|
|
93
|
-
title=
|
|
94
|
+
title={$t`Existing Local Storage`}
|
|
94
95
|
onclick={() => {
|
|
95
96
|
onSelect(backend.id);
|
|
96
97
|
}}
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
</ModalBody>
|
|
111
112
|
<ModalFooter>
|
|
112
113
|
<HStack>
|
|
113
|
-
<Button variant="ghost" {disabled} onclick={onCancel}>Cancel</Button>
|
|
114
|
+
<Button variant="ghost" {disabled} onclick={onCancel}>{$t`Cancel`}</Button>
|
|
114
115
|
</HStack>
|
|
115
116
|
</ModalFooter>
|
|
116
117
|
</Modal>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { mdiArchiveOutline } from "@mdi/js";
|
|
8
8
|
import StackListItem from "../ui/StackListItem.svelte";
|
|
9
9
|
import RelativeTime from "../util/RelativeTime.svelte";
|
|
10
|
+
import { t, msg } from "svelte-i18n-lingui";
|
|
10
11
|
|
|
11
12
|
type Props = {
|
|
12
13
|
repository: LocalRepositoryDto;
|
|
@@ -17,9 +18,9 @@
|
|
|
17
18
|
const local = getProvider().api === "orchestrator";
|
|
18
19
|
|
|
19
20
|
const BackendNames = {
|
|
20
|
-
yucca:
|
|
21
|
-
local:
|
|
22
|
-
s3:
|
|
21
|
+
yucca: msg`FUTO Backups`,
|
|
22
|
+
local: msg`Local Storage`,
|
|
23
|
+
s3: msg`S3 Server`,
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
const outcome = $derived(getBackupOutcome(repository.metrics));
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
Import,
|
|
33
34
|
MetricsHistory,
|
|
34
35
|
Delete,
|
|
35
|
-
} = $derived(getRepositoryActions(repository, local));
|
|
36
|
+
} = $derived(getRepositoryActions(repository, $t, local));
|
|
36
37
|
</script>
|
|
37
38
|
|
|
38
39
|
<StackListItem
|
|
@@ -53,38 +54,38 @@
|
|
|
53
54
|
{/snippet}
|
|
54
55
|
|
|
55
56
|
{#if repository.backends}
|
|
56
|
-
{BackendNames[repository.backends.primary.type]} ·
|
|
57
|
+
{$t(BackendNames[repository.backends.primary.type])} ·
|
|
57
58
|
{/if}
|
|
58
59
|
|
|
59
60
|
{#if repository.meter}
|
|
60
61
|
<FormatBytes bytes={repository.meter.sizeBytes} />
|
|
61
62
|
{:else}
|
|
62
|
-
Estimated <FormatBytes bytes={repository.metrics.sizeBytes} />
|
|
63
|
+
{$t`Estimated`} <FormatBytes bytes={repository.metrics.sizeBytes} />
|
|
63
64
|
{/if}
|
|
64
65
|
|
|
65
66
|
{#if repository.worm}
|
|
66
|
-
· write-only
|
|
67
|
+
· {$t`write-only`}
|
|
67
68
|
{/if}
|
|
68
69
|
|
|
69
70
|
{#snippet trailing()}
|
|
70
71
|
{#if repository.backends && !repository.backends.primary.online}
|
|
71
|
-
<Badge size="tiny" color="danger">Offline</Badge>
|
|
72
|
+
<Badge size="tiny" color="danger">{$t`Offline`}</Badge>
|
|
72
73
|
{/if}
|
|
73
74
|
|
|
74
75
|
{#if outcome === "failed"}
|
|
75
76
|
<Badge size="tiny" color="danger">
|
|
76
|
-
Failed <RelativeTime time={repository.metrics.lastBackup!} />
|
|
77
|
+
{$t`Failed`} <RelativeTime time={repository.metrics.lastBackup!} />
|
|
77
78
|
</Badge>
|
|
78
79
|
{:else if outcome === "warn"}
|
|
79
80
|
<Badge size="tiny" color="warning">
|
|
80
|
-
Warnings <RelativeTime time={repository.metrics.lastBackup!} />
|
|
81
|
+
{$t`Warnings`} <RelativeTime time={repository.metrics.lastBackup!} />
|
|
81
82
|
</Badge>
|
|
82
83
|
{:else if outcome === "complete"}
|
|
83
84
|
<Badge size="tiny" color="success">
|
|
84
|
-
Successful <RelativeTime time={repository.metrics.lastBackup!} />
|
|
85
|
+
{$t`Successful`} <RelativeTime time={repository.metrics.lastBackup!} />
|
|
85
86
|
</Badge>
|
|
86
87
|
{:else}
|
|
87
|
-
<Badge size="tiny" color="warning">Never backed up</Badge>
|
|
88
|
+
<Badge size="tiny" color="warning">{$t`Never backed up`}</Badge>
|
|
88
89
|
{/if}
|
|
89
90
|
{/snippet}
|
|
90
91
|
</StackListItem>
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
Text,
|
|
24
24
|
} from "@immich/ui";
|
|
25
25
|
import type { Snippet } from "svelte";
|
|
26
|
+
import { msg, plural, t } from "svelte-i18n-lingui";
|
|
26
27
|
|
|
27
28
|
type Props = {
|
|
28
29
|
title: string;
|
|
@@ -31,11 +32,13 @@
|
|
|
31
32
|
progress?: number;
|
|
32
33
|
start?: string;
|
|
33
34
|
duration?: string;
|
|
35
|
+
remaining?: string;
|
|
34
36
|
errors?: string[];
|
|
35
37
|
details?: Snippet;
|
|
36
38
|
currentFiles?: string[];
|
|
37
39
|
advanced?: Snippet;
|
|
38
40
|
onRetry?: () => void;
|
|
41
|
+
onCancel?: () => void;
|
|
39
42
|
};
|
|
40
43
|
|
|
41
44
|
const {
|
|
@@ -45,89 +48,99 @@
|
|
|
45
48
|
progress = 0,
|
|
46
49
|
start,
|
|
47
50
|
duration,
|
|
51
|
+
remaining,
|
|
48
52
|
errors = [],
|
|
49
53
|
details,
|
|
50
54
|
currentFiles = [],
|
|
51
55
|
advanced,
|
|
52
56
|
onRetry,
|
|
57
|
+
onCancel,
|
|
53
58
|
}: Props = $props();
|
|
54
59
|
|
|
55
60
|
const phases: Record<BackupStatusType, [string, string, string]> = {
|
|
56
|
-
backup: [
|
|
57
|
-
restore: [
|
|
58
|
-
forget: [
|
|
61
|
+
backup: [msg`Preparing backup`, msg`Backing up`, msg`Finalizing backup`],
|
|
62
|
+
restore: [msg`Preparing restore`, msg`Restoring`, msg`Finalizing restore`],
|
|
63
|
+
forget: [msg`Preparing prune`, msg`Pruning`, msg`Finalizing prune`],
|
|
59
64
|
};
|
|
60
65
|
|
|
61
66
|
const succeeded: Record<BackupStatusType, string> = {
|
|
62
|
-
backup:
|
|
63
|
-
restore:
|
|
64
|
-
forget:
|
|
67
|
+
backup: msg`Your library was backed up successfully`,
|
|
68
|
+
restore: msg`Your library was restored successfully`,
|
|
69
|
+
forget: msg`Old backups were pruned successfully`,
|
|
65
70
|
};
|
|
66
71
|
|
|
67
72
|
const warned: Record<BackupStatusType, string> = {
|
|
68
|
-
backup:
|
|
69
|
-
restore:
|
|
70
|
-
forget:
|
|
73
|
+
backup: msg`Your library was backed up, with warnings`,
|
|
74
|
+
restore: msg`Your library was restored, with warnings`,
|
|
75
|
+
forget: msg`Old backups were pruned, with warnings`,
|
|
71
76
|
};
|
|
72
77
|
|
|
73
78
|
const failed: Record<BackupStatusType, string> = {
|
|
74
|
-
backup:
|
|
75
|
-
restore:
|
|
76
|
-
forget:
|
|
79
|
+
backup: msg`Your library could not be backed up`,
|
|
80
|
+
restore: msg`Your library could not be restored`,
|
|
81
|
+
forget: msg`Old backups could not be pruned`,
|
|
77
82
|
};
|
|
78
83
|
|
|
79
84
|
const cancelled: Record<BackupStatusType, string> = {
|
|
80
|
-
backup:
|
|
81
|
-
restore:
|
|
82
|
-
forget:
|
|
85
|
+
backup: msg`Your backup was cancelled`,
|
|
86
|
+
restore: msg`Your restore was cancelled`,
|
|
87
|
+
forget: msg`Pruning old backups was cancelled`,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const cancelLabels: Record<BackupStatusType, string> = {
|
|
91
|
+
backup: msg`Cancel backup`,
|
|
92
|
+
restore: msg`Cancel restore`,
|
|
93
|
+
forget: msg`Cancel prune`,
|
|
83
94
|
};
|
|
84
95
|
|
|
85
96
|
const reassurance: Record<BackupStatusType, string> = {
|
|
86
|
-
backup:
|
|
87
|
-
restore:
|
|
88
|
-
forget:
|
|
97
|
+
backup: msg`No changes were made to your existing backups.`,
|
|
98
|
+
restore: msg`Your backups are untouched — nothing was lost.`,
|
|
99
|
+
forget: msg`No backups were removed.`,
|
|
89
100
|
};
|
|
90
101
|
|
|
91
102
|
const running: Record<BackupStatusType, string> = {
|
|
92
|
-
backup:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"You can close this window and the restore will continue in the background.",
|
|
96
|
-
forget:
|
|
97
|
-
"You can close this window and the prune will continue in the background.",
|
|
103
|
+
backup: msg`Immich is backing up your library. You can close this window and continue using Immich while the backup runs in the background.`,
|
|
104
|
+
restore: msg`You can close this window and the restore will continue in the background.`,
|
|
105
|
+
forget: msg`You can close this window and the prune will continue in the background.`,
|
|
98
106
|
};
|
|
99
107
|
|
|
100
108
|
const phase = $derived(
|
|
101
109
|
progress <= 0
|
|
102
|
-
? phases[type][0]
|
|
110
|
+
? $t(phases[type][0])
|
|
103
111
|
: progress >= 0.95
|
|
104
|
-
? phases[type][2]
|
|
105
|
-
: phases[type][1],
|
|
112
|
+
? $t(phases[type][2])
|
|
113
|
+
: $t(phases[type][1]),
|
|
106
114
|
);
|
|
107
115
|
|
|
108
116
|
const headline = $derived.by(() => {
|
|
109
117
|
switch (backupState) {
|
|
110
118
|
case "connecting": {
|
|
111
|
-
return
|
|
119
|
+
return $t`Connecting…`;
|
|
112
120
|
}
|
|
113
121
|
case "failed": {
|
|
114
|
-
return failed[type];
|
|
122
|
+
return $t(failed[type]);
|
|
115
123
|
}
|
|
116
124
|
case "cancelled": {
|
|
117
|
-
return cancelled[type];
|
|
125
|
+
return $t(cancelled[type]);
|
|
118
126
|
}
|
|
119
127
|
case "complete": {
|
|
120
|
-
return succeeded[type];
|
|
128
|
+
return $t(succeeded[type]);
|
|
121
129
|
}
|
|
122
130
|
case "warned": {
|
|
123
|
-
return warned[type];
|
|
131
|
+
return $t(warned[type]);
|
|
124
132
|
}
|
|
125
133
|
default: {
|
|
126
|
-
return
|
|
134
|
+
return $t({
|
|
135
|
+
message: "{phase} · {percent}%",
|
|
136
|
+
values: { phase, percent: Math.round(progress * 100) },
|
|
137
|
+
});
|
|
127
138
|
}
|
|
128
139
|
}
|
|
129
140
|
});
|
|
130
141
|
|
|
142
|
+
const announcement = $derived(backupState === "running" ? phase : headline);
|
|
143
|
+
|
|
131
144
|
const titleColor = $derived(
|
|
132
145
|
backupState === "complete"
|
|
133
146
|
? "success"
|
|
@@ -148,23 +161,30 @@
|
|
|
148
161
|
|
|
149
162
|
<Stack gap={4}>
|
|
150
163
|
<Stack gap={2}>
|
|
151
|
-
<Heading size="medium" color={titleColor} fontWeight="bold">{title}</Heading>
|
|
164
|
+
<Heading tag="h2" size="medium" color={titleColor} fontWeight="bold">{title}</Heading>
|
|
152
165
|
|
|
153
166
|
<Stack gap={1}>
|
|
154
|
-
<Heading size="small">{headline}</Heading>
|
|
167
|
+
<Heading tag="h3" size="small">{headline}</Heading>
|
|
168
|
+
<p role="status" class="sr-only">{announcement}</p>
|
|
155
169
|
|
|
156
|
-
{#if backupState === "running" &&
|
|
157
|
-
<Text
|
|
170
|
+
{#if backupState === "running" && remaining}
|
|
171
|
+
<Text>{remaining}</Text>
|
|
172
|
+
{:else if backupState === "running" && start}
|
|
173
|
+
<Text color="muted">{$t`Started`} <RelativeTime time={start} /></Text>
|
|
158
174
|
{:else if backupState === "failed"}
|
|
159
|
-
<Text color="muted">{reassurance[type]}</Text>
|
|
175
|
+
<Text color="muted">{$t(reassurance[type])}</Text>
|
|
160
176
|
{:else if duration}
|
|
161
|
-
<Text color="muted">
|
|
177
|
+
<Text color="muted">
|
|
178
|
+
{$t({ message: "Completed in {duration}", values: { duration } })}
|
|
179
|
+
</Text>
|
|
162
180
|
{/if}
|
|
163
181
|
|
|
164
182
|
{#if backupState === "warned" && errors.length > 0}
|
|
165
183
|
<Text color="warning">
|
|
166
|
-
|
|
167
|
-
|
|
184
|
+
{$plural(errors.length, {
|
|
185
|
+
one: "Completed with # warning.",
|
|
186
|
+
other: "Completed with # warnings.",
|
|
187
|
+
})}
|
|
168
188
|
</Text>
|
|
169
189
|
{/if}
|
|
170
190
|
</Stack>
|
|
@@ -173,8 +193,10 @@
|
|
|
173
193
|
{#if !terminal}
|
|
174
194
|
<ProgressBar
|
|
175
195
|
{progress}
|
|
196
|
+
aria-label={phase}
|
|
197
|
+
valueLabel={`${Math.round(progress * 100)}%`}
|
|
176
198
|
shape="round"
|
|
177
|
-
size="
|
|
199
|
+
size="small"
|
|
178
200
|
class="bg-primary-100 border-none"
|
|
179
201
|
/>
|
|
180
202
|
{/if}
|
|
@@ -183,7 +205,7 @@
|
|
|
183
205
|
<Stack gap={4}>
|
|
184
206
|
{#if backupState === "failed" && onRetry}
|
|
185
207
|
<HStack gap={4} class="items-center">
|
|
186
|
-
<Button shape="round" onclick={onRetry}>Try again</Button>
|
|
208
|
+
<Button shape="round" onclick={onRetry}>{$t`Try again`}</Button>
|
|
187
209
|
</HStack>
|
|
188
210
|
{/if}
|
|
189
211
|
|
|
@@ -202,7 +224,15 @@
|
|
|
202
224
|
{/if}
|
|
203
225
|
|
|
204
226
|
{#if backupState === "running"}
|
|
205
|
-
<Text color="muted">{running[type]}</Text>
|
|
227
|
+
<Text color="muted">{$t(running[type])}</Text>
|
|
228
|
+
|
|
229
|
+
{#if onCancel}
|
|
230
|
+
<HStack gap={4} wrap>
|
|
231
|
+
<Button variant="ghost" color="danger" shape="round" onclick={onCancel}
|
|
232
|
+
>{$t(cancelLabels[type])}</Button
|
|
233
|
+
>
|
|
234
|
+
</HStack>
|
|
235
|
+
{/if}
|
|
206
236
|
{:else if (backupState === "complete" || backupState === "warned") && details}
|
|
207
237
|
<Text color="muted">{@render details()}</Text>
|
|
208
238
|
{/if}
|
|
@@ -8,11 +8,13 @@ type Props = {
|
|
|
8
8
|
progress?: number;
|
|
9
9
|
start?: string;
|
|
10
10
|
duration?: string;
|
|
11
|
+
remaining?: string;
|
|
11
12
|
errors?: string[];
|
|
12
13
|
details?: Snippet;
|
|
13
14
|
currentFiles?: string[];
|
|
14
15
|
advanced?: Snippet;
|
|
15
16
|
onRetry?: () => void;
|
|
17
|
+
onCancel?: () => void;
|
|
16
18
|
};
|
|
17
19
|
declare const BackupStatus: import("svelte").Component<Props, {}, "">;
|
|
18
20
|
type BackupStatus = ReturnType<typeof BackupStatus>;
|
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
11
11
|
};
|
|
12
12
|
z_$$bindings?: Bindings;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
14
|
+
declare const BackupTaskMonitor: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
16
|
}, {}, {}, string>;
|
|
17
|
-
type
|
|
18
|
-
export default
|
|
17
|
+
type BackupTaskMonitor = InstanceType<typeof BackupTaskMonitor>;
|
|
18
|
+
export default BackupTaskMonitor;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import Suspense from "../util/Suspense.svelte";
|
|
13
13
|
import BackupItem from "./BackupItem.svelte";
|
|
14
14
|
import CreateRepositoryModal from "./dialogs/CreateRepositoryModal.svelte";
|
|
15
|
+
import { t } from "svelte-i18n-lingui";
|
|
15
16
|
|
|
16
17
|
type Props = {
|
|
17
18
|
initialData?: RepositoryListResponseDto;
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
{#if local}
|
|
45
46
|
<Stack gap={2}>
|
|
46
47
|
<StackList>
|
|
47
|
-
{#snippet title()}Backups on this machine{/snippet}
|
|
48
|
+
{#snippet title()}{$t`Backups on this machine`}{/snippet}
|
|
48
49
|
|
|
49
50
|
<Suspense {query}>
|
|
50
51
|
{#each localRepositories as repository (repository.id)}
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
|
|
54
55
|
{#if localRepositories.length === 0}
|
|
55
56
|
<StackListPlaceholder>
|
|
56
|
-
No backups on this machine yet
|
|
57
|
+
{$t`No backups on this machine yet.`}
|
|
57
58
|
</StackListPlaceholder>
|
|
58
59
|
{/if}
|
|
59
60
|
</Suspense>
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
shape="round"
|
|
65
66
|
size="tiny"
|
|
66
67
|
variant="outline"
|
|
67
|
-
onclick={createNewBackup}>Create new backup</Button
|
|
68
|
+
onclick={createNewBackup}>{$t`Create new backup`}</Button
|
|
68
69
|
>
|
|
69
70
|
</HStack>
|
|
70
71
|
</Stack>
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
|
|
73
74
|
<StackList>
|
|
74
75
|
{#snippet title()}
|
|
75
|
-
{local ?
|
|
76
|
+
{local ? $t`Backups found elsewhere` : $t`Your Backups`}
|
|
76
77
|
{/snippet}
|
|
77
78
|
|
|
78
79
|
<Suspense {query}>
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
|
|
83
84
|
{#if remoteRepositories.length === 0}
|
|
84
85
|
<StackListPlaceholder>
|
|
85
|
-
{local ?
|
|
86
|
+
{local ? $t`No other backups found.` : $t`No backups yet.`}
|
|
86
87
|
</StackListPlaceholder>
|
|
87
88
|
{/if}
|
|
88
89
|
</Suspense>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
Stack,
|
|
14
14
|
} from "@immich/ui";
|
|
15
15
|
import { SvelteSet } from "svelte/reactivity";
|
|
16
|
+
import { t } from "svelte-i18n-lingui";
|
|
16
17
|
|
|
17
18
|
type Props = {
|
|
18
19
|
repository: LocalRepositoryDto;
|
|
@@ -42,14 +43,14 @@
|
|
|
42
43
|
<FormModal
|
|
43
44
|
disabled={name.length === 0 ||
|
|
44
45
|
updateMutation.isPending}
|
|
45
|
-
title={
|
|
46
|
+
title={$t({ message: "Configure {name}", values: { name } })}
|
|
46
47
|
size="large"
|
|
47
48
|
{onSubmit}
|
|
48
49
|
{onClose}
|
|
49
50
|
>
|
|
50
51
|
<Stack gap={4}>
|
|
51
52
|
<Stack gap={2}>
|
|
52
|
-
<Field label=
|
|
53
|
+
<Field label={$t`Name`}>
|
|
53
54
|
<Input bind:value={name} />
|
|
54
55
|
</Field>
|
|
55
56
|
</Stack>
|
|
@@ -57,13 +58,13 @@
|
|
|
57
58
|
{#if repository.configuration}
|
|
58
59
|
<PathListField
|
|
59
60
|
{paths}
|
|
60
|
-
addLabel=
|
|
61
|
-
manageLabel=
|
|
62
|
-
pickerTitle=
|
|
63
|
-
pickerDescription=
|
|
61
|
+
addLabel={$t`Add path`}
|
|
62
|
+
manageLabel={$t`Add first path`}
|
|
63
|
+
pickerTitle={$t`Backup Paths`}
|
|
64
|
+
pickerDescription={$t`Select files and folders to include in this backup.`}
|
|
64
65
|
>
|
|
65
|
-
{#snippet label()}Backup Paths{/snippet}
|
|
66
|
-
{#snippet empty()}No paths configured yet
|
|
66
|
+
{#snippet label()}{$t`Backup Paths`}{/snippet}
|
|
67
|
+
{#snippet empty()}{$t`No paths configured yet.`}{/snippet}
|
|
67
68
|
</PathListField>
|
|
68
69
|
{/if}
|
|
69
70
|
|