@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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import StackList from "./StackList.svelte";
|
|
3
3
|
import type { FilesystemListingResponseDto } from "../../fetch-client";
|
|
4
4
|
import { handleGetFileListing } from "../../services/filesystem.service";
|
|
5
|
+
import { FocusGroup } from "../../utils/focus";
|
|
5
6
|
import {
|
|
6
7
|
Button,
|
|
7
8
|
FormModal,
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
} from "@mdi/js";
|
|
25
26
|
import { onMount } from "svelte";
|
|
26
27
|
import { SvelteSet } from "svelte/reactivity";
|
|
28
|
+
import { t } from "svelte-i18n-lingui";
|
|
27
29
|
|
|
28
30
|
type Props = {
|
|
29
31
|
title: string;
|
|
@@ -50,13 +52,26 @@
|
|
|
50
52
|
// svelte-ignore state_referenced_locally
|
|
51
53
|
const selected = new SvelteSet(initial);
|
|
52
54
|
let listing: FilesystemListingResponseDto | undefined = $state();
|
|
55
|
+
const id = $props.id();
|
|
56
|
+
const browseRows = new FocusGroup(`${id}-browse`);
|
|
57
|
+
const removeSelectedButtons = new FocusGroup(`${id}-remove-selected`);
|
|
53
58
|
|
|
54
|
-
const
|
|
59
|
+
const load = async (path?: string) => {
|
|
55
60
|
listing = undefined;
|
|
56
61
|
listing = await (handleGetListing ?? handleGetFileListing)(path);
|
|
57
62
|
};
|
|
58
63
|
|
|
59
|
-
onMount(() => void
|
|
64
|
+
onMount(() => void load());
|
|
65
|
+
|
|
66
|
+
const browse = async (path: string) => {
|
|
67
|
+
await load(path);
|
|
68
|
+
await browseRows.focusAt(0);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const removeSelected = (path: string, index: number) => {
|
|
72
|
+
selected.delete(path);
|
|
73
|
+
void removeSelectedButtons.focusAt(index, browseRows);
|
|
74
|
+
};
|
|
60
75
|
|
|
61
76
|
const sortedItems = $derived(
|
|
62
77
|
listing
|
|
@@ -100,7 +115,7 @@
|
|
|
100
115
|
<FormModal
|
|
101
116
|
{title}
|
|
102
117
|
size="large"
|
|
103
|
-
submitText=
|
|
118
|
+
submitText={$t`Save`}
|
|
104
119
|
disabled={submitting}
|
|
105
120
|
onSubmit={handleSubmit}
|
|
106
121
|
{onClose}
|
|
@@ -114,32 +129,35 @@
|
|
|
114
129
|
{#if selected.size > 0}
|
|
115
130
|
<StackList>
|
|
116
131
|
{#snippet title()}
|
|
117
|
-
Selected paths
|
|
132
|
+
{$t`Selected paths`}
|
|
118
133
|
{/snippet}
|
|
119
|
-
{#each [...selected] as path (path)}
|
|
134
|
+
{#each [...selected] as path, index (path)}
|
|
120
135
|
<HStack gap={2} class="items-center px-4 py-3">
|
|
121
136
|
<Text class="grow truncate" title={path}>{path}</Text>
|
|
122
137
|
<IconButton
|
|
123
138
|
icon={mdiClose}
|
|
124
|
-
aria-label="Remove"
|
|
139
|
+
aria-label={$t({ message: "Remove {path}", values: { path } })}
|
|
125
140
|
size="tiny"
|
|
126
141
|
variant="ghost"
|
|
127
|
-
|
|
142
|
+
{...removeSelectedButtons.attributes()}
|
|
143
|
+
onclick={() => removeSelected(path, index)}
|
|
128
144
|
/>
|
|
129
145
|
</HStack>
|
|
130
146
|
{/each}
|
|
131
147
|
</StackList>
|
|
132
148
|
{:else}
|
|
133
149
|
<Stack gap={2}>
|
|
134
|
-
<Heading class="px-1" size="tiny">Selected paths</Heading>
|
|
135
|
-
<Text color="muted" class="text-center py-6"
|
|
150
|
+
<Heading tag="h3" class="px-1" size="tiny">{$t`Selected paths`}</Heading>
|
|
151
|
+
<Text color="muted" class="text-center py-6"
|
|
152
|
+
>{$t`No paths selected`}</Text
|
|
153
|
+
>
|
|
136
154
|
</Stack>
|
|
137
155
|
{/if}
|
|
138
156
|
{/if}
|
|
139
157
|
|
|
140
158
|
{#if !listing}
|
|
141
159
|
<Stack gap={2}>
|
|
142
|
-
<Heading class="px-1" size="tiny">Browse</Heading>
|
|
160
|
+
<Heading tag="h3" class="px-1" size="tiny">{$t`Browse`}</Heading>
|
|
143
161
|
<div class="py-6 flex justify-center">
|
|
144
162
|
<LoadingSpinner />
|
|
145
163
|
</div>
|
|
@@ -147,7 +165,7 @@
|
|
|
147
165
|
{:else}
|
|
148
166
|
<StackList>
|
|
149
167
|
{#snippet title()}
|
|
150
|
-
Browse
|
|
168
|
+
{$t`Browse`}
|
|
151
169
|
{/snippet}
|
|
152
170
|
|
|
153
171
|
<HStack
|
|
@@ -163,9 +181,10 @@
|
|
|
163
181
|
{#if listing.parent && listing.parent !== listing.path}
|
|
164
182
|
<IconButton
|
|
165
183
|
icon={mdiArrowUp}
|
|
166
|
-
aria-label=
|
|
184
|
+
aria-label={$t`Go up`}
|
|
167
185
|
size="tiny"
|
|
168
186
|
variant="ghost"
|
|
187
|
+
{...browseRows.attributes()}
|
|
169
188
|
onclick={() => browse(listing!.parent)}
|
|
170
189
|
/>
|
|
171
190
|
{/if}
|
|
@@ -174,6 +193,7 @@
|
|
|
174
193
|
{#each sortedItems as item (item.path)}
|
|
175
194
|
{#if item.isDirectory || !foldersOnly}
|
|
176
195
|
{@const isSelected = selected.has(item.path)}
|
|
196
|
+
{@const name = item.path.split(/[\\/]/).pop()}
|
|
177
197
|
<HStack
|
|
178
198
|
gap={2}
|
|
179
199
|
class="items-center px-2 py-1 {isSelected
|
|
@@ -183,10 +203,11 @@
|
|
|
183
203
|
{#if item.isDirectory}
|
|
184
204
|
<ListButton
|
|
185
205
|
leadingIcon={mdiFolderOutline}
|
|
206
|
+
{...browseRows.attributes()}
|
|
186
207
|
onclick={() => browse(item.path)}
|
|
187
208
|
class="flex-1 justify-start"
|
|
188
209
|
>
|
|
189
|
-
{
|
|
210
|
+
{name}
|
|
190
211
|
</ListButton>
|
|
191
212
|
{:else}
|
|
192
213
|
<HStack gap={2} class="items-center grow px-2 py-2">
|
|
@@ -196,17 +217,17 @@
|
|
|
196
217
|
color="secondary"
|
|
197
218
|
title={item.path}
|
|
198
219
|
>
|
|
199
|
-
{
|
|
220
|
+
{name}
|
|
200
221
|
</Text>
|
|
201
222
|
</HStack>
|
|
202
223
|
{/if}
|
|
203
224
|
<IconButton
|
|
204
225
|
icon={isSelected ? mdiCheck : mdiPlus}
|
|
205
226
|
aria-label={isSelected
|
|
206
|
-
? "
|
|
227
|
+
? $t({ message: "{name} selected", values: { name } })
|
|
207
228
|
: single
|
|
208
|
-
? "Select"
|
|
209
|
-
: "Add"}
|
|
229
|
+
? $t({ message: "Select {name}", values: { name } })
|
|
230
|
+
: $t({ message: "Add {name}", values: { name } })}
|
|
210
231
|
size="tiny"
|
|
211
232
|
variant="ghost"
|
|
212
233
|
color={isSelected ? "primary" : undefined}
|
|
@@ -221,12 +242,12 @@
|
|
|
221
242
|
{#if foldersOnly}
|
|
222
243
|
<Stack class="items-center px-4 py-6">
|
|
223
244
|
<Button variant="outline" onclick={() => add(listing!.path)}>
|
|
224
|
-
Use this folder
|
|
245
|
+
{$t`Use this folder`}
|
|
225
246
|
</Button>
|
|
226
247
|
</Stack>
|
|
227
248
|
{:else}
|
|
228
249
|
<Text color="muted" class="text-center py-6">
|
|
229
|
-
This folder is empty
|
|
250
|
+
{$t`This folder is empty`}
|
|
230
251
|
</Text>
|
|
231
252
|
{/if}
|
|
232
253
|
{/if}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Heading, HStack, Stack } from "@immich/ui";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
title?: Snippet;
|
|
7
|
+
action?: Snippet;
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const { title, action, children }: Props = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Stack gap={2}>
|
|
15
|
+
{#if title || action}
|
|
16
|
+
<HStack class="items-center justify-between px-1">
|
|
17
|
+
{#if title}
|
|
18
|
+
<Heading tag="h2" size="tiny">{@render title()}</Heading>
|
|
19
|
+
{/if}
|
|
20
|
+
|
|
21
|
+
{@render action?.()}
|
|
22
|
+
</HStack>
|
|
23
|
+
{/if}
|
|
24
|
+
|
|
25
|
+
{@render children?.()}
|
|
26
|
+
</Stack>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from "@immich/ui";
|
|
3
|
+
import { t } from "svelte-i18n-lingui";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
target: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const { target }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div class="absolute inset-s-2 top-2 z-50 not-focus-within:sr-only">
|
|
13
|
+
<Button
|
|
14
|
+
size="small"
|
|
15
|
+
onclick={() => document.getElementById(target)?.focus()}
|
|
16
|
+
>
|
|
17
|
+
{$t`Skip to content`}
|
|
18
|
+
</Button>
|
|
19
|
+
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Card, CardBody
|
|
2
|
+
import { Card, CardBody } from "@immich/ui";
|
|
3
3
|
import type { Snippet } from "svelte";
|
|
4
|
+
import Section from "./Section.svelte";
|
|
4
5
|
|
|
5
6
|
type Props = {
|
|
6
7
|
title?: Snippet;
|
|
@@ -11,20 +12,10 @@
|
|
|
11
12
|
const { title, action, children }: Props = $props();
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
-
{#if title || action}
|
|
16
|
-
<HStack class="items-center justify-between px-1">
|
|
17
|
-
{#if title}
|
|
18
|
-
<Heading size="tiny">{@render title()}</Heading>
|
|
19
|
-
{/if}
|
|
20
|
-
|
|
21
|
-
{@render action?.()}
|
|
22
|
-
</HStack>
|
|
23
|
-
{/if}
|
|
24
|
-
|
|
15
|
+
<Section {title} {action}>
|
|
25
16
|
<Card class="border-primary-100 shadow-none">
|
|
26
17
|
<CardBody class="divide-y p-0">
|
|
27
18
|
{@render children?.()}
|
|
28
19
|
</CardBody>
|
|
29
20
|
</Card>
|
|
30
|
-
</
|
|
21
|
+
</Section>
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
} from "@immich/ui";
|
|
10
10
|
import { mdiDotsVertical } from "@mdi/js";
|
|
11
11
|
import type { Snippet } from "svelte";
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import { t } from "svelte-i18n-lingui";
|
|
13
|
+
import IconTile, { tints, type TileColor } from "./IconTile.svelte";
|
|
14
14
|
|
|
15
15
|
type Props = {
|
|
16
16
|
class?: string;
|
|
17
17
|
title?: string;
|
|
18
|
-
color?:
|
|
18
|
+
color?: TileColor;
|
|
19
19
|
icon?: Snippet;
|
|
20
20
|
children: Snippet;
|
|
21
21
|
trailing?: Snippet;
|
|
22
22
|
footer?: Snippet;
|
|
23
|
-
footerColor?:
|
|
23
|
+
footerColor?: TileColor;
|
|
24
24
|
actions?: ActionItem[];
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -35,23 +35,12 @@
|
|
|
35
35
|
footerColor = "primary",
|
|
36
36
|
actions = [],
|
|
37
37
|
}: Props = $props();
|
|
38
|
-
|
|
39
|
-
const tints: Record<Color, string> = {
|
|
40
|
-
primary: "bg-primary-50 text-primary",
|
|
41
|
-
success: "bg-success-50 text-success-700",
|
|
42
|
-
warning: "bg-warning-50 text-warning-800",
|
|
43
|
-
danger: "bg-danger-50 text-danger-700",
|
|
44
|
-
};
|
|
45
38
|
</script>
|
|
46
39
|
|
|
47
40
|
<div>
|
|
48
41
|
<HStack gap={4} class={`${className} items-center px-5 py-4`}>
|
|
49
42
|
{#if icon}
|
|
50
|
-
<
|
|
51
|
-
class={`flex size-10 shrink-0 items-center justify-center rounded-lg text-xl ${tints[color]}`}
|
|
52
|
-
>
|
|
53
|
-
{@render icon()}
|
|
54
|
-
</div>
|
|
43
|
+
<IconTile {color}>{@render icon()}</IconTile>
|
|
55
44
|
{/if}
|
|
56
45
|
|
|
57
46
|
{#if title}
|
|
@@ -70,7 +59,7 @@
|
|
|
70
59
|
{#if hasActions(actions)}
|
|
71
60
|
<ContextMenuButton
|
|
72
61
|
icon={mdiDotsVertical}
|
|
73
|
-
aria-label=
|
|
62
|
+
aria-label={$t`Options`}
|
|
74
63
|
items={actions}
|
|
75
64
|
variant="ghost"
|
|
76
65
|
color="secondary"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type ActionItem } from "@immich/ui";
|
|
2
2
|
import type { Snippet } from "svelte";
|
|
3
|
-
|
|
3
|
+
import { type TileColor } from "./IconTile.svelte";
|
|
4
4
|
type Props = {
|
|
5
5
|
class?: string;
|
|
6
6
|
title?: string;
|
|
7
|
-
color?:
|
|
7
|
+
color?: TileColor;
|
|
8
8
|
icon?: Snippet;
|
|
9
9
|
children: Snippet;
|
|
10
10
|
trailing?: Snippet;
|
|
11
11
|
footer?: Snippet;
|
|
12
|
-
footerColor?:
|
|
12
|
+
footerColor?: TileColor;
|
|
13
13
|
actions?: ActionItem[];
|
|
14
14
|
};
|
|
15
15
|
declare const StackListItem: import("svelte").Component<Props, {}, "">;
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Text } from "@immich/ui";
|
|
2
|
+
import { HStack, Icon, Stack, Text } from "@immich/ui";
|
|
3
3
|
import type { Snippet } from "svelte";
|
|
4
|
+
import IconTile from "./IconTile.svelte";
|
|
4
5
|
|
|
5
6
|
type Props = {
|
|
6
7
|
title: string;
|
|
7
8
|
content: string;
|
|
9
|
+
icon?: string;
|
|
8
10
|
compact?: boolean;
|
|
9
11
|
subtitle?: Snippet;
|
|
10
12
|
};
|
|
11
13
|
|
|
12
|
-
const { title, content, compact = false, subtitle }: Props = $props();
|
|
14
|
+
const { title, content, icon, compact = false, subtitle }: Props = $props();
|
|
13
15
|
</script>
|
|
14
16
|
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
<Text
|
|
22
|
-
{
|
|
17
|
+
<HStack gap={4} class="items-center">
|
|
18
|
+
{#if icon}
|
|
19
|
+
<IconTile><Icon {icon} /></IconTile>
|
|
20
|
+
{/if}
|
|
21
|
+
|
|
22
|
+
<Stack gap={0} class="min-w-0">
|
|
23
|
+
<Text class={`tabular-nums ${compact ? "text-lg" : "text-xl"}`}>
|
|
24
|
+
{content}
|
|
23
25
|
</Text>
|
|
26
|
+
<Text size="small" color="secondary">{title}</Text>
|
|
27
|
+
</Stack>
|
|
28
|
+
|
|
29
|
+
{#if subtitle}
|
|
30
|
+
<div class="ms-auto">{@render subtitle()}</div>
|
|
24
31
|
{/if}
|
|
25
|
-
</
|
|
32
|
+
</HStack>
|
|
@@ -1,47 +1,39 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { HStack, Stack, Text } from "@immich/ui";
|
|
3
3
|
|
|
4
4
|
type Segment = {
|
|
5
5
|
value: number;
|
|
6
6
|
label: string;
|
|
7
7
|
color: string;
|
|
8
|
-
badge: "success" | "warning" | "danger" | "secondary" | "info";
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
type Props = {
|
|
12
|
-
title: string;
|
|
13
|
-
summary: string;
|
|
14
11
|
segments: Segment[];
|
|
15
12
|
};
|
|
16
13
|
|
|
17
|
-
const {
|
|
14
|
+
const { segments }: Props = $props();
|
|
18
15
|
</script>
|
|
19
16
|
|
|
20
|
-
<Stack>
|
|
21
|
-
<
|
|
22
|
-
<Text size="large">{title}</Text>
|
|
23
|
-
<Text color="secondary">{summary}</Text>
|
|
24
|
-
</HStack>
|
|
25
|
-
|
|
26
|
-
<div
|
|
27
|
-
style="display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px;"
|
|
28
|
-
>
|
|
17
|
+
<Stack gap={4}>
|
|
18
|
+
<div class="flex h-2.5 gap-0.5 overflow-hidden rounded-full">
|
|
29
19
|
{#each segments as segment (segment.label)}
|
|
30
20
|
{#if segment.value > 0}
|
|
31
|
-
<div
|
|
32
|
-
style="flex: {segment.value}; background: {segment.color}; border-radius: 3px;"
|
|
33
|
-
></div>
|
|
21
|
+
<div style="flex: {segment.value}; background: {segment.color};"></div>
|
|
34
22
|
{/if}
|
|
35
23
|
{/each}
|
|
36
24
|
</div>
|
|
37
25
|
|
|
38
|
-
<HStack wrap>
|
|
26
|
+
<HStack gap={8} wrap>
|
|
39
27
|
{#each segments as segment (segment.label)}
|
|
40
28
|
{#if segment.value > 0}
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
<HStack gap={3} class="items-center">
|
|
30
|
+
<span
|
|
31
|
+
class="size-4 shrink-0 rounded-sm"
|
|
32
|
+
style="background: {segment.color};"
|
|
33
|
+
aria-hidden="true"
|
|
34
|
+
></span>
|
|
35
|
+
<Text>{segment.label} - {segment.value}</Text>
|
|
36
|
+
</HStack>
|
|
45
37
|
{/if}
|
|
46
38
|
{/each}
|
|
47
39
|
</HStack>
|
|
@@ -2,11 +2,8 @@ type Segment = {
|
|
|
2
2
|
value: number;
|
|
3
3
|
label: string;
|
|
4
4
|
color: string;
|
|
5
|
-
badge: "success" | "warning" | "danger" | "secondary" | "info";
|
|
6
5
|
};
|
|
7
6
|
type Props = {
|
|
8
|
-
title: string;
|
|
9
|
-
summary: string;
|
|
10
7
|
segments: Segment[];
|
|
11
8
|
};
|
|
12
9
|
declare const VisualisationSegmentedBar: import("svelte").Component<Props, {}, "">;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { DeviceFlow } from "../../services/deviceFlow.service.svelte";
|
|
3
3
|
import { Button } from "@immich/ui";
|
|
4
|
+
import { t } from "svelte-i18n-lingui";
|
|
4
5
|
|
|
5
6
|
type Props = {
|
|
6
7
|
flow: DeviceFlow;
|
|
@@ -10,12 +11,12 @@
|
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
13
|
{#if flow.state.opened}
|
|
13
|
-
<Button shape="round" fullWidth onclick={flow.start}>Try again</Button>
|
|
14
|
+
<Button shape="round" fullWidth onclick={flow.start}>{$t`Try again`}</Button>
|
|
14
15
|
{:else}
|
|
15
16
|
<Button
|
|
16
17
|
shape="round"
|
|
17
18
|
fullWidth
|
|
18
19
|
disabled={!flow.state.verificationUri}
|
|
19
|
-
onclick={flow.open}>Continue to login</Button
|
|
20
|
+
onclick={flow.open}>{$t`Continue to login`}</Button
|
|
20
21
|
>
|
|
21
22
|
{/if}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { DeviceFlow } from "../../services/deviceFlow.service.svelte";
|
|
3
|
+
import { copyToClipboard } from "../../utils/clipboard";
|
|
3
4
|
import { Code, HStack, IconButton, LoadingSpinner, Stack, Text } from "@immich/ui";
|
|
4
5
|
import { mdiContentCopy } from "@mdi/js";
|
|
6
|
+
import { t } from "svelte-i18n-lingui";
|
|
5
7
|
|
|
6
8
|
type Props = {
|
|
7
9
|
flow: DeviceFlow;
|
|
@@ -9,13 +11,11 @@
|
|
|
9
11
|
|
|
10
12
|
const { flow }: Props = $props();
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
navigator.clipboard.writeText(flow.state.userCode!);
|
|
14
|
-
}
|
|
14
|
+
const onCopy = () => copyToClipboard(flow.state.userCode!);
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<Stack gap={4}>
|
|
18
|
-
<Text>You may be asked or shown the following code
|
|
18
|
+
<Text>{$t`You may be asked or shown the following code:`}</Text>
|
|
19
19
|
<Stack direction="row" align="center">
|
|
20
20
|
<Code class="text-3xl select-all">{flow.state.userCode}</Code>
|
|
21
21
|
<IconButton
|
|
@@ -23,14 +23,16 @@
|
|
|
23
23
|
variant="outline"
|
|
24
24
|
icon={mdiContentCopy}
|
|
25
25
|
onclick={onCopy}
|
|
26
|
-
aria-label=
|
|
26
|
+
aria-label={$t`Copy code`}
|
|
27
27
|
/>
|
|
28
28
|
</Stack>
|
|
29
|
+
</Stack>
|
|
29
30
|
|
|
31
|
+
<div role="status">
|
|
30
32
|
{#if flow.state.opened}
|
|
31
|
-
<HStack>
|
|
33
|
+
<HStack class="mt-4">
|
|
32
34
|
<LoadingSpinner />
|
|
33
|
-
<Text>Waiting for you to confirm login
|
|
35
|
+
<Text>{$t`Waiting for you to confirm login...`}</Text>
|
|
34
36
|
</HStack>
|
|
35
37
|
{/if}
|
|
36
|
-
</
|
|
38
|
+
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
3
|
import { onDestroy, onMount } from "svelte";
|
|
4
|
+
import { gt } from "svelte-i18n-lingui";
|
|
4
5
|
|
|
5
6
|
type Props = {
|
|
6
7
|
time: string;
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
|
|
11
12
|
const format = () => {
|
|
12
13
|
const time = DateTime.fromISO(props.time);
|
|
13
|
-
return DateTime.now().diff(time).as('minute') < 1 ?
|
|
14
|
+
return DateTime.now().diff(time).as('minute') < 1 ? gt`a moment ago` : time.toRelative();
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
let text = $state(format());
|
package/dist/i18n.d.ts
ADDED
package/dist/i18n.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { messages as defaultMessages } from './locales/en';
|
|
2
|
+
export { messages as defaultMessages } from './locales/en';
|
|
3
|
+
const loaders = {
|
|
4
|
+
'en-XA': () => import('./locales/en-XA'),
|
|
5
|
+
};
|
|
6
|
+
export const loadMessages = async (lang) => {
|
|
7
|
+
const loader = loaders[lang];
|
|
8
|
+
if (!loader) {
|
|
9
|
+
return defaultMessages;
|
|
10
|
+
}
|
|
11
|
+
const { messages } = await loader();
|
|
12
|
+
return messages;
|
|
13
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ export { default as UpsellModal } from './components/onboarding/upsell/UpsellMod
|
|
|
17
17
|
export { default as UpsellPage } from './components/onboarding/upsell/UpsellPage.svelte';
|
|
18
18
|
export { default as ScheduleList } from './components/schedules/ScheduleList.svelte';
|
|
19
19
|
export { default as GlobalSettings } from './components/settings/GlobalSettings.svelte';
|
|
20
|
+
export { default as SkipLink } from './components/ui/SkipLink.svelte';
|
|
21
|
+
export { default as StackList } from './components/ui/StackList.svelte';
|
|
22
|
+
export { default as StackListItem } from './components/ui/StackListItem.svelte';
|
|
20
23
|
export { default as VisualisationGauge } from './components/ui/VisualisationGauge.svelte';
|
|
21
24
|
export { default as VisualisationSegmentedBar } from './components/ui/VisualisationSegmentedBar.svelte';
|
|
22
25
|
export { default as OnEvents } from './components/util/OnEvents.svelte';
|
|
@@ -36,3 +39,4 @@ export * from './services/snapshot.service';
|
|
|
36
39
|
export * from './services/task.service';
|
|
37
40
|
export { events, SocketEvent } from './events';
|
|
38
41
|
export { queryClient } from './query-client';
|
|
42
|
+
export { defaultMessages, loadMessages } from './i18n';
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,9 @@ export { default as UpsellModal } from './components/onboarding/upsell/UpsellMod
|
|
|
17
17
|
export { default as UpsellPage } from './components/onboarding/upsell/UpsellPage.svelte';
|
|
18
18
|
export { default as ScheduleList } from './components/schedules/ScheduleList.svelte';
|
|
19
19
|
export { default as GlobalSettings } from './components/settings/GlobalSettings.svelte';
|
|
20
|
+
export { default as SkipLink } from './components/ui/SkipLink.svelte';
|
|
21
|
+
export { default as StackList } from './components/ui/StackList.svelte';
|
|
22
|
+
export { default as StackListItem } from './components/ui/StackListItem.svelte';
|
|
20
23
|
export { default as VisualisationGauge } from './components/ui/VisualisationGauge.svelte';
|
|
21
24
|
export { default as VisualisationSegmentedBar } from './components/ui/VisualisationSegmentedBar.svelte';
|
|
22
25
|
export { default as OnEvents } from './components/util/OnEvents.svelte';
|
|
@@ -36,3 +39,4 @@ export * from './services/snapshot.service';
|
|
|
36
39
|
export * from './services/task.service';
|
|
37
40
|
export { events, SocketEvent } from './events';
|
|
38
41
|
export { queryClient } from './query-client';
|
|
42
|
+
export { defaultMessages, loadMessages } from './i18n';
|