@futo-org/backups-orchestrator-ui 0.47.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/dialogs/OAuthDeviceFlowModal.svelte +7 -3
- package/dist/components/backups/BackupStatus.svelte +30 -5
- 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/dialogs/RestoreSnapshotModal.svelte +7 -11
- package/dist/components/backups/dialogs/ViewStatusModal.svelte +4 -1
- package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +131 -124
- package/dist/components/dashboard/DashboardAvgBackupTime.svelte +2 -0
- package/dist/components/dashboard/DashboardBackupHealth.svelte +73 -67
- package/dist/components/dashboard/DashboardCurrentUsage.svelte +6 -1
- package/dist/components/dashboard/DashboardDailyBackupTime.svelte +2 -0
- package/dist/components/dashboard/DashboardPage.svelte +51 -23
- package/dist/components/dashboard/DashboardRecentBackups.svelte +1 -1
- package/dist/components/dashboard/DashboardTotalStored.svelte +3 -1
- package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte +3 -2
- 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 +3 -1
- package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte.d.ts +1 -0
- package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +34 -28
- package/dist/components/integrations/immich/ImmichManageBackupPage.svelte +2 -0
- package/dist/components/integrations/immich/ImmichOnboardingRestoreFlow.svelte +43 -22
- package/dist/components/integrations/immich/ImmichOnboardingSetupFlow.svelte +71 -73
- package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +24 -16
- package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte +25 -21
- package/dist/components/integrations/immich/settings/ImmichSettingsStorage.svelte +8 -1
- package/dist/components/onboarding/OnboardingLogin.svelte +4 -2
- package/dist/components/onboarding/RecoveryKeyDisplay.svelte +17 -10
- package/dist/components/onboarding/SampleOnboarding.svelte +39 -38
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte +8 -4
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +25 -15
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +8 -3
- package/dist/components/onboarding/steps/OnboardingStep1FinishSetup.svelte +0 -1
- package/dist/components/onboarding/steps/OnboardingStep2ConnectAccount.svelte +4 -4
- package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte +14 -3
- package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte.d.ts +1 -0
- package/dist/components/onboarding/steps/OnboardingStep4FirstBackup.svelte +4 -4
- 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 +3 -3
- package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte +3 -16
- package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte.d.ts +0 -2
- package/dist/components/onboarding/upsell/UpsellFrequentlyAskedQuestions.svelte +3 -3
- package/dist/components/onboarding/upsell/UpsellFutoBackupsBadge.svelte +1 -1
- package/dist/components/onboarding/upsell/UpsellHowItWorks.svelte +4 -4
- 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 +6 -14
- package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte.d.ts +0 -1
- package/dist/components/schedules/RepositoryPicker.svelte +28 -10
- package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +14 -3
- package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +14 -3
- package/dist/components/settings/SettingsBilling.svelte +1 -0
- 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 +1 -1
- package/dist/components/ui/PathListField.svelte +21 -4
- package/dist/components/ui/PathPickerField.svelte +14 -3
- package/dist/components/ui/PathPickerModal.svelte +30 -12
- 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 +4 -16
- 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/DeviceFlowCode.svelte +6 -5
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/locales/en-XA.js +1 -1
- package/dist/locales/en-XA.po +272 -125
- package/dist/locales/en.js +1 -1
- package/dist/locales/en.po +288 -389
- package/dist/options.d.ts +1 -0
- package/dist/options.js +1 -0
- package/dist/services/immich.integration.service.d.ts +2 -1
- package/dist/services/immich.integration.service.js +5 -2
- package/dist/services/log.service.svelte.js +1 -1
- package/dist/services/runHistory.service.d.ts +9 -0
- package/dist/services/runHistory.service.js +43 -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/package.json +4 -4
- package/dist/components/dashboard/DashboardInstall.svelte +0 -16
- package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte +0 -71
- package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte.d.ts +0 -8
- package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte +0 -58
- package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte.d.ts +0 -8
- package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte +0 -59
- package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte.d.ts +0 -7
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import OnboardingBootstrapError from "../../onboarding/OnboardingBootstrapError.svelte";
|
|
3
|
-
import
|
|
4
|
-
import OnboardingStageTelemetry from "../../onboarding/stages/OnboardingStageTelemetry.svelte";
|
|
5
|
-
import OnboardingStepFinishSetup from "../../onboarding/steps/OnboardingStep1FinishSetup.svelte";
|
|
3
|
+
import OnboardingStepChooseStorage from "../../onboarding/steps/OnboardingStepChooseStorage.svelte";
|
|
6
4
|
import OnboardingStepConnectAccount from "../../onboarding/steps/OnboardingStep2ConnectAccount.svelte";
|
|
7
5
|
import OnboardingStepSaveRecoveryKey from "../../onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte";
|
|
6
|
+
import OnboardingStepConfirmRecoveryKey from "../../onboarding/steps/OnboardingStepConfirmRecoveryKey.svelte";
|
|
8
7
|
import OnboardingStepFirstBackup from "../../onboarding/steps/OnboardingStep4FirstBackup.svelte";
|
|
8
|
+
import OnboardingStepImportRecoveryKey from "../../onboarding/steps/OnboardingStepImportRecoveryKey.svelte";
|
|
9
|
+
import OnboardingStepModal from "../../onboarding/steps/OnboardingStepModal.svelte";
|
|
10
|
+
import OnboardingStepTelemetry from "../../onboarding/steps/OnboardingStepTelemetry.svelte";
|
|
9
11
|
import { type OnboardingStatusResponseDto } from "../../../fetch-client";
|
|
10
|
-
import {
|
|
11
|
-
handleSetupLocalStorage,
|
|
12
|
-
handleStartYuccaLogin,
|
|
13
|
-
} from "../../../services/backend.service";
|
|
12
|
+
import { handleStartYuccaLogin } from "../../../services/backend.service";
|
|
14
13
|
import {
|
|
15
14
|
IMMICH_DEFAULT_CRON,
|
|
16
15
|
useConfigureAndStartImmichIntegration,
|
|
@@ -21,18 +20,19 @@
|
|
|
21
20
|
handleOnboardingStatus,
|
|
22
21
|
} from "../../../services/onboarding.service";
|
|
23
22
|
import { handleCreateBackup } from "../../../services/repository.service";
|
|
24
|
-
import { LoadingSpinner
|
|
23
|
+
import { LoadingSpinner } from "@immich/ui";
|
|
25
24
|
import cronstrue from "cronstrue";
|
|
26
25
|
import { onMount, type Snippet } from "svelte";
|
|
27
26
|
import { t } from "svelte-i18n-lingui";
|
|
28
27
|
|
|
29
28
|
type Stage =
|
|
30
29
|
| "idle"
|
|
31
|
-
| "intro"
|
|
32
30
|
| "telemetry"
|
|
31
|
+
| "storage"
|
|
33
32
|
| "connect"
|
|
34
|
-
| "key-import"
|
|
35
33
|
| "key"
|
|
34
|
+
| "key-import"
|
|
35
|
+
| "key-confirm"
|
|
36
36
|
| "backup"
|
|
37
37
|
| "finished";
|
|
38
38
|
|
|
@@ -44,10 +44,8 @@
|
|
|
44
44
|
const { fallback, children }: Props = $props();
|
|
45
45
|
|
|
46
46
|
let code = $state("");
|
|
47
|
-
let storageLocation = $state("FUTO Backups");
|
|
48
47
|
let status: OnboardingStatusResponseDto | undefined = $state();
|
|
49
48
|
let stage: Stage = $state("idle");
|
|
50
|
-
let resume: Stage = $state("intro");
|
|
51
49
|
let confirming = $state(false);
|
|
52
50
|
|
|
53
51
|
const defaults = useConfigureAndStartImmichIntegration();
|
|
@@ -67,8 +65,6 @@
|
|
|
67
65
|
stage = "finished";
|
|
68
66
|
return;
|
|
69
67
|
}
|
|
70
|
-
|
|
71
|
-
resume = data.hasTelemetry === "none" ? "telemetry" : "connect";
|
|
72
68
|
} else {
|
|
73
69
|
const { recoveryKey } = await handleCurrentRecoveryKey();
|
|
74
70
|
code = recoveryKey;
|
|
@@ -76,26 +72,21 @@
|
|
|
76
72
|
});
|
|
77
73
|
});
|
|
78
74
|
|
|
79
|
-
const onStart = () =>
|
|
75
|
+
const onStart = () =>
|
|
76
|
+
(stage = status?.hasTelemetry === "none" ? "telemetry" : "storage");
|
|
80
77
|
const onCancel = () => (stage = "idle");
|
|
81
78
|
|
|
82
79
|
const afterTelemetry = () =>
|
|
83
80
|
(stage =
|
|
84
|
-
status?.hasOnboardedKey && status.hasBackup ? "finished" : "
|
|
81
|
+
status?.hasOnboardedKey && status.hasBackup ? "finished" : "storage");
|
|
85
82
|
|
|
86
83
|
const onBackendReady = () =>
|
|
87
84
|
(stage = status?.hasOnboardedKey ? "backup" : "key");
|
|
88
85
|
|
|
89
86
|
const onConnect = () => {
|
|
90
|
-
storageLocation = "FUTO Backups";
|
|
91
87
|
handleStartYuccaLogin(onBackendReady);
|
|
92
88
|
};
|
|
93
89
|
|
|
94
|
-
const onLocalStorage = () => {
|
|
95
|
-
storageLocation = $t`Local Storage`;
|
|
96
|
-
handleSetupLocalStorage(onBackendReady);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
90
|
const onConfirmKey = async () => {
|
|
100
91
|
confirming = true;
|
|
101
92
|
|
|
@@ -107,16 +98,6 @@
|
|
|
107
98
|
}
|
|
108
99
|
};
|
|
109
100
|
|
|
110
|
-
const onImportedKey = async (key: string) => {
|
|
111
|
-
try {
|
|
112
|
-
await handleConfirmRecoveryKey();
|
|
113
|
-
code = key;
|
|
114
|
-
stage = "connect";
|
|
115
|
-
} catch {
|
|
116
|
-
// no-op
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
|
|
120
101
|
const onStartBackup = () =>
|
|
121
102
|
defaults.mutate(undefined, { onSuccess: ({ repositoryId }) => {
|
|
122
103
|
stage = "finished";
|
|
@@ -137,49 +118,66 @@
|
|
|
137
118
|
|
|
138
119
|
{#if status?.status === "error" && stage !== "idle"}
|
|
139
120
|
<OnboardingBootstrapError error={status.error} onQuit={onCancel} />
|
|
140
|
-
{:else if stage === "intro"}
|
|
141
|
-
<Modal size="small" title="FUTO Backups" onClose={onCancel}>
|
|
142
|
-
<ModalBody>
|
|
143
|
-
<OnboardingStepFinishSetup
|
|
144
|
-
onContinue={() =>
|
|
145
|
-
(stage = status?.hasTelemetry === "none" ? "telemetry" : "connect")}
|
|
146
|
-
onImportKey={() => (stage = "key-import")}
|
|
147
|
-
/>
|
|
148
|
-
</ModalBody>
|
|
149
|
-
</Modal>
|
|
150
121
|
{:else if stage === "telemetry"}
|
|
151
|
-
<
|
|
122
|
+
<OnboardingStepModal
|
|
123
|
+
title={$t`Telemetry required for closed beta`}
|
|
124
|
+
onClose={onCancel}
|
|
125
|
+
>
|
|
126
|
+
<OnboardingStepTelemetry onContinue={afterTelemetry} {onCancel} />
|
|
127
|
+
</OnboardingStepModal>
|
|
128
|
+
{:else if stage === "storage"}
|
|
129
|
+
<OnboardingStepModal
|
|
130
|
+
title={$t`Choose where your backups live`}
|
|
131
|
+
size="giant"
|
|
132
|
+
onClose={onCancel}
|
|
133
|
+
>
|
|
134
|
+
<OnboardingStepChooseStorage onConfirm={() => (stage = "connect")} />
|
|
135
|
+
</OnboardingStepModal>
|
|
152
136
|
{:else if stage === "connect"}
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<OnboardingStageKeyImport
|
|
160
|
-
onStart={() => (stage = "intro")}
|
|
161
|
-
onImported={onImportedKey}
|
|
162
|
-
{onCancel}
|
|
163
|
-
/>
|
|
137
|
+
<OnboardingStepModal
|
|
138
|
+
title={$t`Connect your FUTO account`}
|
|
139
|
+
onClose={onCancel}
|
|
140
|
+
>
|
|
141
|
+
<OnboardingStepConnectAccount {onConnect} />
|
|
142
|
+
</OnboardingStepModal>
|
|
164
143
|
{:else if stage === "key"}
|
|
165
|
-
<
|
|
166
|
-
<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
144
|
+
<OnboardingStepModal title={$t`Save your recovery key`} onClose={onCancel}>
|
|
145
|
+
<OnboardingStepSaveRecoveryKey
|
|
146
|
+
{code}
|
|
147
|
+
onContinue={() => (stage = "key-confirm")}
|
|
148
|
+
onImportKey={() => (stage = "key-import")}
|
|
149
|
+
/>
|
|
150
|
+
</OnboardingStepModal>
|
|
151
|
+
{:else if stage === "key-import"}
|
|
152
|
+
<OnboardingStepModal title={$t`Import recovery key`} onClose={onCancel}>
|
|
153
|
+
<OnboardingStepImportRecoveryKey
|
|
154
|
+
onBack={() => (stage = "key")}
|
|
155
|
+
onImported={(key) => {
|
|
156
|
+
code = key;
|
|
157
|
+
void onConfirmKey();
|
|
158
|
+
}}
|
|
159
|
+
{onCancel}
|
|
160
|
+
/>
|
|
161
|
+
</OnboardingStepModal>
|
|
162
|
+
{:else if stage === "key-confirm"}
|
|
163
|
+
<OnboardingStepModal
|
|
164
|
+
title={$t`Confirm your recovery key`}
|
|
165
|
+
onClose={onCancel}
|
|
166
|
+
>
|
|
167
|
+
<OnboardingStepConfirmRecoveryKey
|
|
168
|
+
{code}
|
|
169
|
+
loading={confirming}
|
|
170
|
+
onConfirm={onConfirmKey}
|
|
171
|
+
onBack={() => (stage = "key")}
|
|
172
|
+
/>
|
|
173
|
+
</OnboardingStepModal>
|
|
174
174
|
{:else if stage === "backup"}
|
|
175
|
-
<
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
</ModalBody>
|
|
184
|
-
</Modal>
|
|
175
|
+
<OnboardingStepModal title={$t`Start your first backup`} onClose={onCancel}>
|
|
176
|
+
<OnboardingStepFirstBackup
|
|
177
|
+
{schedule}
|
|
178
|
+
storageLocation={$t`FUTO Cloud`}
|
|
179
|
+
{onStartBackup}
|
|
180
|
+
loading={defaults.isPending}
|
|
181
|
+
/>
|
|
182
|
+
</OnboardingStepModal>
|
|
185
183
|
{/if}
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
{:else}
|
|
225
225
|
{#each groups as group (group.key)}
|
|
226
226
|
{#if applicable(group).length > 0}
|
|
227
|
-
<
|
|
227
|
+
<div>
|
|
228
228
|
<Field
|
|
229
229
|
label={$t(group.label)}
|
|
230
230
|
description={$t(group.description)}
|
|
@@ -240,16 +240,18 @@
|
|
|
240
240
|
/>
|
|
241
241
|
</Field>
|
|
242
242
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
{
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
243
|
+
<div aria-live="polite">
|
|
244
|
+
{#if group.warning && !group.required && !isChecked(group)}
|
|
245
|
+
<Text size="small" color={group.warningColor} class="mt-1">
|
|
246
|
+
{$t(group.warning)}
|
|
247
|
+
</Text>
|
|
248
|
+
{/if}
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
249
251
|
{/if}
|
|
250
252
|
{/each}
|
|
251
253
|
|
|
252
|
-
<
|
|
254
|
+
<div>
|
|
253
255
|
<Field
|
|
254
256
|
label={$t`Backup configuration`}
|
|
255
257
|
description={$t`Include these backup settings, so they survive a restore.`}
|
|
@@ -257,12 +259,14 @@
|
|
|
257
259
|
<Switch bind:checked={backupConfiguration} />
|
|
258
260
|
</Field>
|
|
259
261
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
<div aria-live="polite">
|
|
263
|
+
{#if !backupConfiguration}
|
|
264
|
+
<Text size="small" color="warning" class="mt-1">
|
|
265
|
+
{$t`You will need to reconfigure backups from scratch after restoring.`}
|
|
266
|
+
</Text>
|
|
267
|
+
{/if}
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
266
270
|
|
|
267
271
|
<Field
|
|
268
272
|
label={$t`External libraries`}
|
|
@@ -279,7 +283,11 @@
|
|
|
279
283
|
{#if libraries.length === 0}
|
|
280
284
|
<Text size="small" color="muted">{$t`No external libraries found.`}</Text>
|
|
281
285
|
{:else}
|
|
282
|
-
<
|
|
286
|
+
<div
|
|
287
|
+
role="group"
|
|
288
|
+
aria-label={$t`External libraries`}
|
|
289
|
+
class="flex flex-col gap-2 ps-1"
|
|
290
|
+
>
|
|
283
291
|
{#each libraries as library (library.id)}
|
|
284
292
|
<label class="flex select-none items-center gap-3">
|
|
285
293
|
<Checkbox
|
|
@@ -289,7 +297,7 @@
|
|
|
289
297
|
<Text size="small">{library.name}</Text>
|
|
290
298
|
</label>
|
|
291
299
|
{/each}
|
|
292
|
-
</
|
|
300
|
+
</div>
|
|
293
301
|
{/if}
|
|
294
302
|
{:else if librariesMode === "all" && libraries.length > 0}
|
|
295
303
|
<Text size="small" color="muted">
|
|
@@ -98,28 +98,32 @@
|
|
|
98
98
|
</Field>
|
|
99
99
|
|
|
100
100
|
{#if limited && quiet}
|
|
101
|
-
<
|
|
102
|
-
<
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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>
|
|
117
118
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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>
|
|
123
127
|
{/if}
|
|
124
128
|
|
|
125
129
|
<HStack gap={2} class="justify-end">
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import {
|
|
21
21
|
Button,
|
|
22
22
|
Field,
|
|
23
|
+
HelperText,
|
|
23
24
|
HStack,
|
|
24
25
|
Input,
|
|
25
26
|
LoadingSpinner,
|
|
@@ -81,6 +82,8 @@
|
|
|
81
82
|
let retentionKey = $state(defaultRetentionKey);
|
|
82
83
|
let loaded = false;
|
|
83
84
|
|
|
85
|
+
const nameMissing = $derived(name.trim().length === 0);
|
|
86
|
+
|
|
84
87
|
const load = () => {
|
|
85
88
|
if (!repository) {
|
|
86
89
|
return;
|
|
@@ -147,8 +150,12 @@
|
|
|
147
150
|
label={$t`Backup name`}
|
|
148
151
|
description={$t`How this backup is labelled across FUTO Backups.`}
|
|
149
152
|
required="indicator"
|
|
153
|
+
invalid={nameMissing}
|
|
150
154
|
>
|
|
151
155
|
<Input bind:value={name} />
|
|
156
|
+
{#if nameMissing}
|
|
157
|
+
<HelperText color="danger">{$t`Enter a backup name.`}</HelperText>
|
|
158
|
+
{/if}
|
|
152
159
|
</Field>
|
|
153
160
|
|
|
154
161
|
<BackendsList {repository} />
|
|
@@ -192,7 +199,7 @@
|
|
|
192
199
|
</Button>
|
|
193
200
|
<Button
|
|
194
201
|
shape="round"
|
|
195
|
-
disabled={
|
|
202
|
+
disabled={nameMissing}
|
|
196
203
|
loading={mutation.isPending}
|
|
197
204
|
onclick={onSave}
|
|
198
205
|
>
|
|
@@ -40,11 +40,13 @@
|
|
|
40
40
|
<Text>
|
|
41
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>
|
|
@@ -1,7 +1,9 @@
|
|
|
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,
|
|
@@ -22,6 +24,8 @@
|
|
|
22
24
|
.join("\n"),
|
|
23
25
|
);
|
|
24
26
|
|
|
27
|
+
let downloaded = $state(false);
|
|
28
|
+
|
|
25
29
|
const print = () => window.print();
|
|
26
30
|
|
|
27
31
|
const saveFile = async () => {
|
|
@@ -47,9 +51,11 @@
|
|
|
47
51
|
|
|
48
52
|
URL.revokeObjectURL(url);
|
|
49
53
|
}
|
|
54
|
+
|
|
55
|
+
downloaded = true;
|
|
50
56
|
};
|
|
51
57
|
|
|
52
|
-
const
|
|
58
|
+
const copyCode = () => copyToClipboard(code);
|
|
53
59
|
|
|
54
60
|
const PasswordCredential =
|
|
55
61
|
typeof window !== "undefined"
|
|
@@ -69,9 +75,9 @@
|
|
|
69
75
|
};
|
|
70
76
|
</script>
|
|
71
77
|
|
|
72
|
-
<Card color="primary" class="shadow-none">
|
|
73
|
-
<CardBody class="flex justify-center">
|
|
74
|
-
<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"
|
|
75
81
|
><pre><code>{code}</code></pre></Text
|
|
76
82
|
>
|
|
77
83
|
</CardBody>
|
|
@@ -81,20 +87,21 @@
|
|
|
81
87
|
<Button
|
|
82
88
|
shape="round"
|
|
83
89
|
variant="outline"
|
|
84
|
-
leadingIcon={
|
|
85
|
-
|
|
90
|
+
leadingIcon={downloaded ? mdiCheck : mdiDownloadOutline}
|
|
91
|
+
class={downloaded ? "bg-primary/10" : undefined}
|
|
92
|
+
onclick={saveFile}
|
|
86
93
|
>
|
|
87
|
-
{$t`
|
|
94
|
+
{downloaded ? $t`Downloaded` : $t`Download recovery key`}
|
|
88
95
|
</Button>
|
|
89
96
|
|
|
90
97
|
<HStack>
|
|
91
98
|
<Button
|
|
92
|
-
leadingIcon={
|
|
99
|
+
leadingIcon={mdiContentCopy}
|
|
93
100
|
variant="ghost"
|
|
94
101
|
shape="round"
|
|
95
|
-
onclick={
|
|
102
|
+
onclick={copyCode}
|
|
96
103
|
>
|
|
97
|
-
{$t`
|
|
104
|
+
{$t`Copy`}
|
|
98
105
|
</Button>
|
|
99
106
|
<Button
|
|
100
107
|
leadingIcon={mdiPrinterOutline}
|
|
@@ -8,13 +8,13 @@
|
|
|
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
18
|
import { t } from "svelte-i18n-lingui";
|
|
19
19
|
|
|
20
20
|
type Props = {
|
|
@@ -71,43 +71,44 @@
|
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
73
|
{#if stage === "intro"}
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
</ModalBody>
|
|
82
|
-
</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>
|
|
83
81
|
{:else if stage === "telemetry"}
|
|
84
|
-
<
|
|
82
|
+
<StepModal
|
|
83
|
+
title={$t`Telemetry required for closed beta`}
|
|
84
|
+
onClose={onCancel}
|
|
85
|
+
>
|
|
86
|
+
<StepTelemetry onContinue={onTelemetryConfirmed} {onCancel} />
|
|
87
|
+
</StepModal>
|
|
85
88
|
{:else if stage === "key"}
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</ModalBody>
|
|
94
|
-
</Modal>
|
|
89
|
+
<StepModal title={$t`Save your recovery key`} onClose={onCancel}>
|
|
90
|
+
<StepSaveRecoveryKey
|
|
91
|
+
{code}
|
|
92
|
+
onContinue={onConfirmKey}
|
|
93
|
+
loading={confirming}
|
|
94
|
+
/>
|
|
95
|
+
</StepModal>
|
|
95
96
|
{:else if stage === "key-import"}
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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>
|
|
104
107
|
{:else if stage === "connect"}
|
|
105
|
-
<
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
</ModalBody>
|
|
112
|
-
</Modal>
|
|
108
|
+
<StepModal title={$t`Connect your FUTO account`} onClose={onCancel}>
|
|
109
|
+
<StepConnectAccount
|
|
110
|
+
onConnect={() => handleStartYuccaLogin(onFinish)}
|
|
111
|
+
onLocalStorage={() => handleSetupLocalStorage(onFinish)}
|
|
112
|
+
/>
|
|
113
|
+
</StepModal>
|
|
113
114
|
{/if}
|
package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const { onBack, onFinish, repository }: Props = $props();
|
|
30
|
+
const id = $props.id();
|
|
30
31
|
|
|
31
32
|
let selectedSnapshot: SnapshotDto | undefined = $state();
|
|
32
33
|
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
snapshot={selectedSnapshot}
|
|
42
43
|
/>
|
|
43
44
|
{:else}
|
|
44
|
-
<Modal
|
|
45
|
+
<Modal focusOnOpen
|
|
45
46
|
title={$t({
|
|
46
47
|
message: "Restore from {name}",
|
|
47
48
|
values: { name: repository.name },
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
<StackList>
|
|
54
55
|
{#each snapshots.toSorted((a, b) => new Date(b.time).getTime() - new Date(a.time).getTime()) as snapshot (snapshot.id)}
|
|
55
56
|
<HStack gap={2} class="px-4 py-3">
|
|
56
|
-
<
|
|
57
|
+
<div id="{id}-{snapshot.id}" class="flex flex-col grow min-w-0">
|
|
57
58
|
<HStack
|
|
58
59
|
><RelativeTime time={snapshot.time} />
|
|
59
60
|
{#if snapshot.summary}
|
|
@@ -67,8 +68,11 @@
|
|
|
67
68
|
", ",
|
|
68
69
|
)}</Text
|
|
69
70
|
>
|
|
70
|
-
</
|
|
71
|
-
<Button
|
|
71
|
+
</div>
|
|
72
|
+
<Button
|
|
73
|
+
aria-describedby="{id}-{snapshot.id}"
|
|
74
|
+
onclick={() => (selectedSnapshot = snapshot)}
|
|
75
|
+
>
|
|
72
76
|
{$t`Restore`}
|
|
73
77
|
</Button>
|
|
74
78
|
</HStack>
|