@futo-org/backups-orchestrator-ui 0.47.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/components/backends/dialogs/OAuthDeviceFlowModal.svelte +7 -3
  2. package/dist/components/backups/BackupStatus.svelte +30 -5
  3. package/dist/components/backups/BackupStatus.svelte.d.ts +2 -0
  4. package/dist/components/backups/BackupTaskMonitor.svelte +6 -0
  5. package/dist/components/{dashboard/DashboardInstall.svelte.d.ts → backups/BackupTaskMonitor.svelte.d.ts} +3 -3
  6. package/dist/components/backups/dialogs/RestoreSnapshotModal.svelte +7 -11
  7. package/dist/components/backups/dialogs/ViewStatusModal.svelte +4 -1
  8. package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +131 -124
  9. package/dist/components/dashboard/DashboardAvgBackupTime.svelte +2 -0
  10. package/dist/components/dashboard/DashboardBackupHealth.svelte +73 -67
  11. package/dist/components/dashboard/DashboardCurrentUsage.svelte +6 -1
  12. package/dist/components/dashboard/DashboardDailyBackupTime.svelte +2 -0
  13. package/dist/components/dashboard/DashboardPage.svelte +51 -23
  14. package/dist/components/dashboard/DashboardRecentBackups.svelte +1 -1
  15. package/dist/components/dashboard/DashboardTotalStored.svelte +3 -1
  16. package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte +3 -2
  17. package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte.d.ts +1 -0
  18. package/dist/components/integrations/immich/ImmichBackupsPage.svelte +1 -5
  19. package/dist/components/integrations/immich/ImmichBackupsPage.svelte.d.ts +0 -2
  20. package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte +3 -1
  21. package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte.d.ts +1 -0
  22. package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +34 -28
  23. package/dist/components/integrations/immich/ImmichManageBackupPage.svelte +2 -0
  24. package/dist/components/integrations/immich/ImmichOnboardingRestoreFlow.svelte +43 -22
  25. package/dist/components/integrations/immich/ImmichOnboardingSetupFlow.svelte +71 -73
  26. package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +24 -16
  27. package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte +25 -21
  28. package/dist/components/integrations/immich/settings/ImmichSettingsStorage.svelte +8 -1
  29. package/dist/components/onboarding/OnboardingLogin.svelte +4 -2
  30. package/dist/components/onboarding/RecoveryKeyDisplay.svelte +17 -10
  31. package/dist/components/onboarding/SampleOnboarding.svelte +39 -38
  32. package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte +8 -4
  33. package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +25 -15
  34. package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +8 -3
  35. package/dist/components/onboarding/steps/OnboardingStep1FinishSetup.svelte +0 -1
  36. package/dist/components/onboarding/steps/OnboardingStep2ConnectAccount.svelte +4 -4
  37. package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte +14 -3
  38. package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte.d.ts +1 -0
  39. package/dist/components/onboarding/steps/OnboardingStep4FirstBackup.svelte +4 -4
  40. package/dist/components/onboarding/steps/OnboardingStepBackupServices.svelte +52 -0
  41. package/dist/components/onboarding/steps/OnboardingStepBackupServices.svelte.d.ts +7 -0
  42. package/dist/components/onboarding/steps/OnboardingStepChooseStorage.svelte +82 -0
  43. package/dist/components/onboarding/steps/OnboardingStepChooseStorage.svelte.d.ts +6 -0
  44. package/dist/components/onboarding/steps/OnboardingStepConfirmRecoveryKey.svelte +62 -0
  45. package/dist/components/onboarding/steps/OnboardingStepConfirmRecoveryKey.svelte.d.ts +9 -0
  46. package/dist/components/onboarding/steps/OnboardingStepImportRecoveryKey.svelte +42 -0
  47. package/dist/components/onboarding/steps/OnboardingStepImportRecoveryKey.svelte.d.ts +8 -0
  48. package/dist/components/onboarding/steps/OnboardingStepLayout.svelte +15 -9
  49. package/dist/components/onboarding/steps/OnboardingStepLayout.svelte.d.ts +2 -2
  50. package/dist/components/onboarding/steps/OnboardingStepModal.svelte +19 -0
  51. package/dist/components/onboarding/steps/OnboardingStepModal.svelte.d.ts +11 -0
  52. package/dist/components/onboarding/steps/OnboardingStepTelemetry.svelte +44 -0
  53. package/dist/components/onboarding/steps/OnboardingStepTelemetry.svelte.d.ts +7 -0
  54. package/dist/components/onboarding/upsell/UpsellBackupFeaturesGrid.svelte +3 -3
  55. package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte +3 -16
  56. package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte.d.ts +0 -2
  57. package/dist/components/onboarding/upsell/UpsellFrequentlyAskedQuestions.svelte +3 -3
  58. package/dist/components/onboarding/upsell/UpsellFutoBackupsBadge.svelte +1 -1
  59. package/dist/components/onboarding/upsell/UpsellHowItWorks.svelte +4 -4
  60. package/dist/components/onboarding/upsell/UpsellModal.svelte +7 -13
  61. package/dist/components/onboarding/upsell/UpsellModal.svelte.d.ts +0 -1
  62. package/dist/components/onboarding/upsell/UpsellPage.svelte +3 -5
  63. package/dist/components/onboarding/upsell/UpsellPage.svelte.d.ts +0 -2
  64. package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte +6 -14
  65. package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte.d.ts +0 -1
  66. package/dist/components/schedules/RepositoryPicker.svelte +28 -10
  67. package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +14 -3
  68. package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +14 -3
  69. package/dist/components/settings/SettingsBilling.svelte +1 -0
  70. package/dist/components/test/ImmichTestUi.svelte +62 -44
  71. package/dist/components/test/TestUi.svelte +53 -69
  72. package/dist/components/test/dashboard/BackupHealth.svelte +6 -7
  73. package/dist/components/test/immich/MockImmichHideBackupsReminder.svelte +3 -2
  74. package/dist/components/test/immich/MockImmichHideBackupsReminder.svelte.d.ts +17 -2
  75. package/dist/components/ui/Accordion.svelte +43 -30
  76. package/dist/components/ui/Accordion.svelte.d.ts +1 -0
  77. package/dist/components/ui/IconTile.svelte +27 -0
  78. package/dist/components/ui/IconTile.svelte.d.ts +10 -0
  79. package/dist/components/ui/ListToolbar.svelte +1 -0
  80. package/dist/components/ui/PageLayout.svelte +1 -1
  81. package/dist/components/ui/PathListField.svelte +21 -4
  82. package/dist/components/ui/PathPickerField.svelte +14 -3
  83. package/dist/components/ui/PathPickerModal.svelte +30 -12
  84. package/dist/components/ui/Section.svelte +26 -0
  85. package/dist/components/ui/Section.svelte.d.ts +9 -0
  86. package/dist/components/ui/SkipLink.svelte +19 -0
  87. package/dist/components/ui/SkipLink.svelte.d.ts +6 -0
  88. package/dist/components/ui/StackList.svelte +4 -13
  89. package/dist/components/ui/StackListItem.svelte +4 -16
  90. package/dist/components/ui/StackListItem.svelte.d.ts +3 -3
  91. package/dist/components/ui/VisualisationGauge.svelte +18 -11
  92. package/dist/components/ui/VisualisationGauge.svelte.d.ts +1 -0
  93. package/dist/components/ui/VisualisationSegmentedBar.svelte +14 -22
  94. package/dist/components/ui/VisualisationSegmentedBar.svelte.d.ts +0 -3
  95. package/dist/components/util/DeviceFlowCode.svelte +6 -5
  96. package/dist/fetch-client.d.ts +146 -1
  97. package/dist/fetch-client.js +144 -0
  98. package/dist/index.d.ts +3 -0
  99. package/dist/index.js +3 -0
  100. package/dist/locales/en-XA.js +1 -1
  101. package/dist/locales/en-XA.po +272 -125
  102. package/dist/locales/en.js +1 -1
  103. package/dist/locales/en.po +288 -389
  104. package/dist/options.d.ts +1 -0
  105. package/dist/options.js +1 -0
  106. package/dist/services/immich.integration.service.d.ts +2 -1
  107. package/dist/services/immich.integration.service.js +5 -2
  108. package/dist/services/log.service.svelte.js +1 -1
  109. package/dist/services/runHistory.service.d.ts +9 -0
  110. package/dist/services/runHistory.service.js +43 -2
  111. package/dist/utils/clipboard.d.ts +1 -0
  112. package/dist/utils/clipboard.js +11 -0
  113. package/dist/utils/focus.d.ts +12 -0
  114. package/dist/utils/focus.js +34 -0
  115. package/package.json +22 -22
  116. package/dist/components/dashboard/DashboardInstall.svelte +0 -16
  117. package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte +0 -71
  118. package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte.d.ts +0 -8
  119. package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte +0 -58
  120. package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte.d.ts +0 -8
  121. package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte +0 -59
  122. package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte.d.ts +0 -7
@@ -17,12 +17,12 @@
17
17
  {
18
18
  icon: mdiShieldKey,
19
19
  title: $t`Encrypted by design`,
20
- description: $t`Your backups are protected with E2EE encryption, so only your recovery key can restore them.`,
20
+ description: $t`Your backups stay encrypted and can only be restored with your recovery key.`,
21
21
  },
22
22
  {
23
23
  icon: mdiImageRefreshOutline,
24
- title: $t`Snapshot restore`,
25
- description: $t`Restore your photos, videos, metadata, database, and configuration from a backup snapshot.`,
24
+ title: $t`Restore in one click`,
25
+ description: $t`Restore your files from an earlier backup whenever you want to return to a previous version.`,
26
26
  },
27
27
  {
28
28
  icon: mdiHistory,
@@ -4,34 +4,21 @@
4
4
  import { t } from "svelte-i18n-lingui";
5
5
 
6
6
  type Props = {
7
- price: string;
8
- includedStorage: string;
9
7
  onGetStarted: () => void;
10
8
  };
11
9
 
12
- const { price, includedStorage, onGetStarted }: Props = $props();
10
+ const { onGetStarted }: Props = $props();
13
11
  </script>
14
12
 
15
13
  <Stack gap={6}>
16
14
  <Icon icon={mdiCloudUpload} size="5rem" class="text-primary" />
17
15
 
18
- <Heading size="large" fontWeight="normal">{$t`FUTO Backups`}</Heading>
16
+ <Heading tag="h1" size="large" fontWeight="normal">{$t`FUTO Backups`}</Heading>
19
17
 
20
18
  <Text>
21
- {$t`Keep your Immich library safe with our secure, hosted backups solution.`}
19
+ {$t`Keep your Immich library protected with backups stored locally, remotely, or in the cloud.`}
22
20
  </Text>
23
21
 
24
- <Stack gap={0}>
25
- <Text size="small" color="muted">{$t({ message: "Starting at {price}/month", values: { price } })}</Text>
26
- <Text size="small" color="muted">
27
- {$t({
28
- message:
29
- "Includes {includedStorage} of backup storage. Additional storage billed by usage.",
30
- values: { includedStorage },
31
- })}
32
- </Text>
33
- </Stack>
34
-
35
22
  <Button size="giant" shape="round" class="self-start" onclick={onGetStarted}>
36
23
  {$t`Get Started`}
37
24
  </Button>
@@ -1,6 +1,4 @@
1
1
  type Props = {
2
- price: string;
3
- includedStorage: string;
4
2
  onGetStarted: () => void;
5
3
  };
6
4
  declare const UpsellExplainFutoBackups: import("svelte").Component<Props, {}, "">;
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import Accordion from "../../ui/Accordion.svelte";
3
- import { Stack, Text } from "@immich/ui";
3
+ import { Heading, Stack, Text } from "@immich/ui";
4
4
  import type { Snippet } from "svelte";
5
5
  import { t } from "svelte-i18n-lingui";
6
6
 
@@ -17,11 +17,11 @@
17
17
  </script>
18
18
 
19
19
  <Stack>
20
- <Text fontWeight="semi-bold">{$t`Frequently Asked Questions`}</Text>
20
+ <Heading tag="h2" size="tiny" fontWeight="semi-bold">{$t`Frequently Asked Questions`}</Heading>
21
21
 
22
22
  <Stack gap={0}>
23
23
  {#each questions as { title, answer } (title)}
24
- <Accordion {title}>
24
+ <Accordion {title} headingTag="h3">
25
25
  {#if typeof answer === "string"}
26
26
  <Text size="small" color="muted">{answer}</Text>
27
27
  {:else}
@@ -3,6 +3,6 @@
3
3
  import { t } from "svelte-i18n-lingui";
4
4
  </script>
5
5
 
6
- <Badge color="primary" shape="round" size="tiny" class="self-start">
6
+ <Badge color="info" shape="round" size="small" class="self-start">
7
7
  {$t`FUTO Backups`}
8
8
  </Badge>
@@ -1,12 +1,12 @@
1
1
  <script lang="ts">
2
2
  import StepNumber from "../../ui/StepNumber.svelte";
3
- import { Card, CardBody, HStack, Stack, Text } from "@immich/ui";
3
+ import { Card, CardBody, Heading, HStack, Stack, Text } from "@immich/ui";
4
4
  import { t } from "svelte-i18n-lingui";
5
5
 
6
6
  const steps = $derived([
7
7
  {
8
- title: $t`Connect your FUTO account`,
9
- description: $t`Securely connect FUTO Backups to Immich.`,
8
+ title: $t`Choose where your backups live`,
9
+ description: $t`FUTO Cloud, local storage, or another supported option.`,
10
10
  },
11
11
  {
12
12
  title: $t`Save your recovery key`,
@@ -28,7 +28,7 @@
28
28
  <Card class="shadow-none border-none max-w-96" {color}>
29
29
  <CardBody class="p-8">
30
30
  <Stack gap={6}>
31
- <Text size="large" fontWeight="semi-bold">{$t`How it works`}</Text>
31
+ <Heading tag="h2" size="small" fontWeight="semi-bold">{$t`How it works`}</Heading>
32
32
 
33
33
  <Stack gap={4}>
34
34
  {#each steps as step, index (step.title)}
@@ -2,6 +2,7 @@
2
2
  import {
3
3
  CloseButton,
4
4
  HStack,
5
+ Logo,
5
6
  Modal,
6
7
  ModalBody,
7
8
  ModalHeader,
@@ -10,32 +11,25 @@
10
11
  import UpsellProtectYourImmichLibrary from "./UpsellProtectYourImmichLibrary.svelte";
11
12
 
12
13
  type Props = {
13
- price: string;
14
14
  onGetStarted: () => void;
15
15
  onLearnMore: () => void;
16
16
  onClose: () => void;
17
17
  };
18
18
 
19
- const { price, onGetStarted, onLearnMore, onClose }: Props = $props();
19
+ const { onGetStarted, onLearnMore, onClose }: Props = $props();
20
20
  </script>
21
21
 
22
- <Modal
23
- size="giant"
24
- {onClose}
25
- icon={false}
26
- // this is a bit of a hack to remove the frames from base modal...
27
- // twin code is in ViewStatusModal
28
- class="[&>div>div:first-child]:border-b-0 [&>div>div:first-child]:pb-0"
29
- >
22
+ <Modal size="giant" {onClose}>
30
23
  <ModalHeader>
31
- <HStack fullWidth class="justify-end">
24
+ <HStack fullWidth class="justify-between">
25
+ <Logo variant="icon" size="tiny" />
32
26
  <CloseButton onclick={onClose} />
33
27
  </HStack>
34
28
  </ModalHeader>
35
29
 
36
30
  <ModalBody>
37
- <HStack gap={4} class="p-4">
38
- <UpsellProtectYourImmichLibrary {price} {onGetStarted} {onLearnMore} />
31
+ <HStack gap={4} class="p-4 max-md:flex-wrap">
32
+ <UpsellProtectYourImmichLibrary {onGetStarted} {onLearnMore} />
39
33
 
40
34
  <UpsellHowItWorks />
41
35
  </HStack>
@@ -1,5 +1,4 @@
1
1
  type Props = {
2
- price: string;
3
2
  onGetStarted: () => void;
4
3
  onLearnMore: () => void;
5
4
  onClose: () => void;
@@ -12,21 +12,19 @@
12
12
  };
13
13
 
14
14
  type Props = {
15
- price: string;
16
- includedStorage: string;
17
15
  questions: Question[];
18
16
  onGetStarted: () => void;
19
17
  };
20
18
 
21
- const { price, includedStorage, questions, onGetStarted }: Props = $props();
19
+ const { questions, onGetStarted }: Props = $props();
22
20
  </script>
23
21
 
24
22
  <Container size="large" center>
25
23
  <Stack gap={8} class="py-4">
26
24
  <Card color="primary" class="shadow-none">
27
25
  <CardBody class="p-8">
28
- <HStack gap={8} class="justify-between">
29
- <UpsellExplainFutoBackups {price} {includedStorage} {onGetStarted} />
26
+ <HStack gap={8} class="justify-between max-md:flex-wrap">
27
+ <UpsellExplainFutoBackups {onGetStarted} />
30
28
 
31
29
  <UpsellHowItWorks color="secondary" />
32
30
  </HStack>
@@ -4,8 +4,6 @@ type Question = {
4
4
  answer: string | Snippet;
5
5
  };
6
6
  type Props = {
7
- price: string;
8
- includedStorage: string;
9
7
  questions: Question[];
10
8
  onGetStarted: () => void;
11
9
  };
@@ -5,17 +5,16 @@
5
5
  import { t } from "svelte-i18n-lingui";
6
6
 
7
7
  type Props = {
8
- price: string;
9
8
  onGetStarted: () => void;
10
9
  onLearnMore: () => void;
11
10
  };
12
11
 
13
- const { price, onGetStarted, onLearnMore }: Props = $props();
12
+ const { onGetStarted, onLearnMore }: Props = $props();
14
13
 
15
14
  const benefits = $derived([
16
- $t`Cloud copy while your originals stay local`,
15
+ $t`Automatic backups run in the background`,
17
16
  $t`Encrypted backups protect your data`,
18
- $t`Restore if your local storage fails`,
17
+ $t`Restore from backup snapshots when needed`,
19
18
  ]);
20
19
  </script>
21
20
 
@@ -23,12 +22,12 @@
23
22
  <UpsellFutoBackupsBadge />
24
23
 
25
24
  <Stack gap={4}>
26
- <Heading size="medium" color="primary" fontWeight="bold"
25
+ <Heading tag="h2" size="medium" color="primary" fontWeight="bold"
27
26
  >{$t`Protect your Immich library`}</Heading
28
27
  >
29
28
 
30
29
  <Text>
31
- {$t`FUTO Backups adds hosted cloud backup storage to your existing Immich setup, so you have another copy if something happens locally.`}
30
+ {$t`FUTO Backups adds backup support to your existing Immich setup, giving you more ways to protect your library if something goes wrong.`}
32
31
  </Text>
33
32
  </Stack>
34
33
 
@@ -45,14 +44,7 @@
45
44
  {/each}
46
45
  </Stack>
47
46
 
48
- <Text fontWeight="semi-bold">
49
- {$t({
50
- message: "Starting at {price}/month. Additional storage billed by usage.",
51
- values: { price },
52
- })}
53
- </Text>
54
-
55
- <HStack gap={6} class="items-center">
47
+ <HStack gap={6} wrap class="items-center">
56
48
  <Button shape="round" onclick={onGetStarted}>{$t`Get Started`}</Button>
57
49
  <Button variant="ghost" shape="round" onclick={onLearnMore}>
58
50
  {$t`Learn More`}
@@ -1,5 +1,4 @@
1
1
  type Props = {
2
- price: string;
3
2
  onGetStarted: () => void;
4
3
  onLearnMore: () => void;
5
4
  };
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { useRepositories } from "../../services/repository.service";
3
+ import { FocusGroup } from "../../utils/focus";
3
4
  import { IconButton, Stack, Text } from "@immich/ui";
4
5
  import { mdiArrowDown, mdiArrowUp, mdiClose, mdiPlus } from "@mdi/js";
5
6
  import StackList from "../ui/StackList.svelte";
@@ -11,6 +12,11 @@
11
12
  };
12
13
 
13
14
  let { repositories = $bindable() }: Props = $props();
15
+ const pickerId = $props.id();
16
+ const upButtons = new FocusGroup(`${pickerId}-up`);
17
+ const downButtons = new FocusGroup(`${pickerId}-down`);
18
+ const removeButtons = new FocusGroup(`${pickerId}-remove`);
19
+ const addButtons = new FocusGroup(`${pickerId}-add`);
14
20
 
15
21
  const repositoryQuery = useRepositories();
16
22
 
@@ -29,17 +35,24 @@
29
35
  const move = (index: number, delta: number) => {
30
36
  const target = index + delta;
31
37
  if (target < 0 || target >= repositories.length) return;
38
+ const moved = repositories[index];
32
39
  const next = [...repositories];
33
40
  [next[index], next[target]] = [next[target], next[index]];
34
41
  repositories = next;
42
+
43
+ void (delta < 0
44
+ ? upButtons.focusKey(moved, downButtons)
45
+ : downButtons.focusKey(moved, upButtons));
35
46
  };
36
47
 
37
- const remove = (id: string) => {
48
+ const remove = (id: string, index: number) => {
38
49
  repositories = repositories.filter((entry) => entry !== id);
50
+ void removeButtons.focusAt(index, addButtons);
39
51
  };
40
52
 
41
- const add = (id: string) => {
53
+ const add = (id: string, index: number) => {
42
54
  repositories = [...repositories, id];
55
+ void addButtons.focusAt(index, removeButtons, id);
43
56
  };
44
57
  </script>
45
58
 
@@ -48,24 +61,27 @@
48
61
  {#snippet title()}{$t`Repositories`}{/snippet}
49
62
 
50
63
  {#each repositories as id, index (id)}
64
+ {@const name = nameById[id] ?? id}
51
65
  <StackListItem>
52
- <Text class="grow truncate" size="small">{nameById[id] ?? id}</Text>
66
+ <Text class="grow truncate" size="small">{name}</Text>
53
67
 
54
68
  {#snippet trailing()}
55
69
  <IconButton
56
70
  icon={mdiArrowUp}
57
71
  size="tiny"
58
72
  variant="ghost"
59
- aria-label={$t`Move up`}
73
+ aria-label={$t({ message: "Move {name} up", values: { name } })}
60
74
  disabled={index === 0}
75
+ {...upButtons.attributes(id)}
61
76
  onclick={() => move(index, -1)}
62
77
  />
63
78
  <IconButton
64
79
  icon={mdiArrowDown}
65
80
  size="tiny"
66
81
  variant="ghost"
67
- aria-label={$t`Move down`}
82
+ aria-label={$t({ message: "Move {name} down", values: { name } })}
68
83
  disabled={index === repositories.length - 1}
84
+ {...downButtons.attributes(id)}
69
85
  onclick={() => move(index, 1)}
70
86
  />
71
87
  <IconButton
@@ -73,8 +89,9 @@
73
89
  size="tiny"
74
90
  color="danger"
75
91
  variant="ghost"
76
- aria-label={$t`Remove`}
77
- onclick={() => remove(id)}
92
+ aria-label={$t({ message: "Remove {name}", values: { name } })}
93
+ {...removeButtons.attributes(id)}
94
+ onclick={() => remove(id, index)}
78
95
  />
79
96
  {/snippet}
80
97
  </StackListItem>
@@ -93,7 +110,7 @@
93
110
  <StackList>
94
111
  {#snippet title()}{$t`Available`}{/snippet}
95
112
 
96
- {#each available as repo (repo.id)}
113
+ {#each available as repo, index (repo.id)}
97
114
  <StackListItem>
98
115
  <Text class="grow truncate" size="small">{repo.name}</Text>
99
116
 
@@ -102,8 +119,9 @@
102
119
  icon={mdiPlus}
103
120
  size="tiny"
104
121
  variant="ghost"
105
- aria-label={$t`Add`}
106
- onclick={() => add(repo.id)}
122
+ aria-label={$t({ message: "Add {name}", values: { name: repo.name } })}
123
+ {...addButtons.attributes()}
124
+ onclick={() => add(repo.id, index)}
107
125
  />
108
126
  {/snippet}
109
127
  </StackListItem>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import type { ScheduleDto } from "../../../fetch-client";
3
3
  import { useUpdateSchedule } from "../../../services/schedule.service";
4
- import { Field, FormModal, Input, Stack } from "@immich/ui";
4
+ import { Field, FormModal, HelperText, Input, Stack } from "@immich/ui";
5
5
  import validate from "cron-validate";
6
6
  import RepositoryPicker from "../RepositoryPicker.svelte";
7
7
  import { t } from "svelte-i18n-lingui";
@@ -20,6 +20,8 @@
20
20
  // svelte-ignore state_referenced_locally
21
21
  let repositories = $state([...schedule.repositories]);
22
22
 
23
+ const cronInvalid = $derived(validate(cron).isError());
24
+
23
25
  const mutation = useUpdateSchedule();
24
26
 
25
27
  const onSubmit = () =>
@@ -33,7 +35,7 @@
33
35
  title={$t({ message: "Edit {name}", values: { name: schedule.name } })}
34
36
  size="large"
35
37
  disabled={name.length === 0 ||
36
- validate(cron).isError() ||
38
+ cronInvalid ||
37
39
  repositories.length === 0 ||
38
40
  mutation.isPending}
39
41
  {onSubmit}
@@ -43,8 +45,17 @@
43
45
  <Field label={$t`Name`}>
44
46
  <Input bind:value={name} />
45
47
  </Field>
46
- <Field label={$t`Schedule`} description={$t`Uses cron syntax`}>
48
+ <Field
49
+ label={$t`Schedule`}
50
+ description={$t`Uses cron syntax`}
51
+ invalid={cronInvalid}
52
+ >
47
53
  <Input bind:value={cron} />
54
+ {#if cronInvalid}
55
+ <HelperText color="danger"
56
+ >{$t`Enter a valid cron expression, for example */15 * * * *`}</HelperText
57
+ >
58
+ {/if}
48
59
  </Field>
49
60
 
50
61
  <RepositoryPicker bind:repositories />
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { useCreateSchedule } from "../../../services/schedule.service";
3
- import { Field, FormModal, Input, Stack } from "@immich/ui";
3
+ import { Field, FormModal, HelperText, Input, Stack } from "@immich/ui";
4
4
  import validate from "cron-validate";
5
5
  import RepositoryPicker from "../RepositoryPicker.svelte";
6
6
  import { t } from "svelte-i18n-lingui";
@@ -15,6 +15,8 @@
15
15
  let cron = $state("*/15 * * * *");
16
16
  let repositories = $state<string[]>([]);
17
17
 
18
+ const cronInvalid = $derived(validate(cron).isError());
19
+
18
20
  const mutation = useCreateSchedule();
19
21
 
20
22
  const onSubmit = () =>
@@ -28,7 +30,7 @@
28
30
  title={$t`Create A New Schedule`}
29
31
  size="large"
30
32
  disabled={name.length === 0 ||
31
- validate(cron).isError() ||
33
+ cronInvalid ||
32
34
  repositories.length === 0 ||
33
35
  mutation.isPending}
34
36
  {onSubmit}
@@ -41,8 +43,17 @@
41
43
  >
42
44
  <Input bind:value={name} />
43
45
  </Field>
44
- <Field label={$t`Schedule`} description={$t`Uses cron syntax`}>
46
+ <Field
47
+ label={$t`Schedule`}
48
+ description={$t`Uses cron syntax`}
49
+ invalid={cronInvalid}
50
+ >
45
51
  <Input bind:value={cron} />
52
+ {#if cronInvalid}
53
+ <HelperText color="danger"
54
+ >{$t`Enter a valid cron expression, for example */15 * * * *`}</HelperText
55
+ >
56
+ {/if}
46
57
  </Field>
47
58
 
48
59
  <RepositoryPicker bind:repositories />
@@ -27,6 +27,7 @@
27
27
  >
28
28
  <Stack gap={4} class="pt-2">
29
29
  <Accordion
30
+ headingTag="h3"
30
31
  title={$t`FUTO Backups`}
31
32
  subtitle={$t`Hosted cloud backup storage for your Immich library.`}
32
33
  isOpen
@@ -35,6 +35,7 @@
35
35
  } from "@mdi/js";
36
36
  import { options } from "../../options";
37
37
  import { onDestroy } from "svelte";
38
+ import { MediaQuery } from "svelte/reactivity";
38
39
  import ImmichBackupsAdminNavButton from "../integrations/immich/ImmichBackupsAdminNavButton.svelte";
39
40
  import ImmichBackupsSidebarItem from "../integrations/immich/ImmichBackupsSidebarItem.svelte";
40
41
  import MockImmichPhotos from "./immich/MockImmichPhotos.svelte";
@@ -42,6 +43,7 @@
42
43
  import MockImmichPurchaseInfo from "./immich/MockImmichPurchaseInfo.svelte";
43
44
  import MockImmichStorageSpace from "./immich/MockImmichStorageSpace.svelte";
44
45
  import PageLayout from "../ui/PageLayout.svelte";
46
+ import SkipLink from "../ui/SkipLink.svelte";
45
47
  import ImmichBackupAttemptsPage from "../integrations/immich/ImmichBackupAttemptsPage.svelte";
46
48
  import ImmichBackupSettingsPage from "../integrations/immich/ImmichBackupSettingsPage.svelte";
47
49
  import ImmichBackupsPage from "../integrations/immich/ImmichBackupsPage.svelte";
@@ -54,7 +56,10 @@
54
56
  };
55
57
 
56
58
  const { onExit }: Props = $props();
57
- const { testUiRestore, demoPadding } = options;
59
+ const { testUiRestore, demoPadding, hideBackupsReminder } = options;
60
+
61
+ const fullSidebar = new MediaQuery("min-width: 48rem");
62
+ let sidebarOpen = $derived(fullSidebar.current);
58
63
 
59
64
  let route = $state<
60
65
  | "photos"
@@ -66,15 +71,23 @@
66
71
 
67
72
  const sampleQuestions = [
68
73
  {
69
- title: "Is FUTO Backups the same as an Immich product key?",
74
+ title: "Where can I store my backups?",
75
+ answer: "Sample answer copy for the FAQ preview.",
76
+ },
77
+ {
78
+ title: "Does my Immich product key include FUTO Backups?",
70
79
  answer: "Sample answer copy for the FAQ preview.",
71
80
  },
72
81
  {
73
- title: "How is FUTO Backups priced?",
82
+ title: "Do I need FUTO Backups to use Immich?",
74
83
  answer: "Sample answer copy for the FAQ preview.",
75
84
  },
76
85
  {
77
- title: "Can I use local storage instead?",
86
+ title: "How is FUTO Cloud priced?",
87
+ answer: "Sample answer copy for the FAQ preview.",
88
+ },
89
+ {
90
+ title: "What does FUTO Backups protect?",
78
91
  answer: "Sample answer copy for the FAQ preview.",
79
92
  },
80
93
  ];
@@ -91,6 +104,8 @@
91
104
 
92
105
  <AppShell class="h-full">
93
106
  <AppShellHeader>
107
+ <SkipLink target="main-content" />
108
+
94
109
  <div class="grid grid-cols-[--spacing(64)_auto] items-center w-full py-2">
95
110
  <div class="flex flex-row gap-1 mx-4 items-center">
96
111
  <IconButton
@@ -99,9 +114,10 @@
99
114
  variant="ghost"
100
115
  size="medium"
101
116
  aria-label="Main menu"
117
+ aria-expanded={sidebarOpen}
102
118
  icon={mdiMenu}
103
- onclick={() => {}}
104
- class="sidebar:hidden"
119
+ onclick={() => (sidebarOpen = fullSidebar.current ? true : !sidebarOpen)}
120
+ class="md:hidden"
105
121
  />
106
122
  <Logo variant="inline" class="h-12" />
107
123
  </div>
@@ -196,10 +212,10 @@
196
212
  </div>
197
213
  </AppShellHeader>
198
214
 
199
- <AppShellSidebar class="relative">
215
+ <AppShellSidebar class="relative" bind:open={sidebarOpen}>
200
216
  <div class="flex h-full flex-col pt-4 pr-2">
201
217
  {#if route !== "photos"}
202
- <ImmichBackupsAdminNavButton href="#" />
218
+ <ImmichBackupsAdminNavButton href="#" onclick={backToBackups} />
203
219
 
204
220
  <NavbarItem
205
221
  href="#"
@@ -256,7 +272,9 @@
256
272
 
257
273
  <Stack gap={4} class="mt-auto p-4">
258
274
  <MockImmichStorageSpace>
259
- <ImmichBackupsSidebarItem href="#" />
275
+ {#if !$hideBackupsReminder}
276
+ <ImmichBackupsSidebarItem href="#" onclick={backToBackups} />
277
+ {/if}
260
278
  </MockImmichStorageSpace>
261
279
 
262
280
  {#if route === "photos"}
@@ -268,39 +286,39 @@
268
286
  </div>
269
287
  </AppShellSidebar>
270
288
 
271
- {#if $testUiRestore}
272
- <ImmichOnboardingRestoreFlow
273
- {onExit}
274
- onFinish={() => testUiRestore.set(false)}
275
- />
276
- {:else if route === "settings"}
277
- <ImmichBackupsPage
278
- price="$1"
279
- includedStorage="50 GB"
280
- questions={[
281
- {
282
- title: "Already back up your library elsewhere?",
283
- answer: hideReminder,
284
- },
285
- ...sampleQuestions,
286
- ]}
287
- onConfigure={() => (route = "backup-settings")}
288
- onViewAttempts={() => (route = "backup-attempts")}
289
- onViewSnapshots={() => (route = "backup-snapshots")}
290
- />
291
- {:else if route === "backup-settings"}
292
- <PageLayout title="Backup settings" onBack={backToBackups}>
293
- <ImmichBackupSettingsPage onUnconfigured={backToBackups} />
294
- </PageLayout>
295
- {:else if route === "backup-attempts"}
296
- <PageLayout title="Backup attempts" onBack={backToBackups}>
297
- <ImmichBackupAttemptsPage onUnconfigured={backToBackups} />
298
- </PageLayout>
299
- {:else if route === "backup-snapshots"}
300
- <PageLayout title="Snapshots" onBack={backToBackups}>
301
- <ImmichSnapshotsPage onUnconfigured={backToBackups} />
302
- </PageLayout>
303
- {:else}
304
- <MockImmichPhotos />
305
- {/if}
289
+ <div id="main-content" tabindex="-1" class="h-full outline-none">
290
+ {#if $testUiRestore}
291
+ <ImmichOnboardingRestoreFlow
292
+ {onExit}
293
+ onFinish={() => testUiRestore.set(false)}
294
+ />
295
+ {:else if route === "settings"}
296
+ <ImmichBackupsPage
297
+ questions={[
298
+ {
299
+ title: "Already back up your library elsewhere?",
300
+ answer: hideReminder,
301
+ },
302
+ ...sampleQuestions,
303
+ ]}
304
+ onConfigure={() => (route = "backup-settings")}
305
+ onViewAttempts={() => (route = "backup-attempts")}
306
+ onViewSnapshots={() => (route = "backup-snapshots")}
307
+ />
308
+ {:else if route === "backup-settings"}
309
+ <PageLayout title="Backup settings" onBack={backToBackups}>
310
+ <ImmichBackupSettingsPage onUnconfigured={backToBackups} />
311
+ </PageLayout>
312
+ {:else if route === "backup-attempts"}
313
+ <PageLayout title="Backup attempts" onBack={backToBackups}>
314
+ <ImmichBackupAttemptsPage onUnconfigured={backToBackups} />
315
+ </PageLayout>
316
+ {:else if route === "backup-snapshots"}
317
+ <PageLayout title="Snapshots" onBack={backToBackups}>
318
+ <ImmichSnapshotsPage onUnconfigured={backToBackups} />
319
+ </PageLayout>
320
+ {:else}
321
+ <MockImmichPhotos />
322
+ {/if}
323
+ </div>
306
324
  </AppShell>