@futo-org/backups-orchestrator-ui 1.11.5 → 1.12.1
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/dashboard/DashboardBackupHealth.svelte +1 -1
- package/dist/components/dashboard/DashboardCurrentUsage.svelte +1 -1
- package/dist/components/dashboard/DashboardPage.svelte +33 -15
- package/dist/components/dashboard/DashboardPage.svelte.d.ts +5 -0
- package/dist/components/dashboard/DashboardRecentBackups.svelte +13 -3
- package/dist/components/integrations/immich/ImmichOnboardingRestoreFlow.svelte +21 -3
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow.svelte +3 -3
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow.svelte.d.ts +1 -1
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte +3 -3
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte.d.ts +1 -1
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +59 -58
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte.d.ts +1 -1
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +25 -3
- package/dist/components/ui/StackListItem.svelte +16 -3
- package/dist/components/ui/StackListItem.svelte.d.ts +1 -0
- package/dist/fetch-client.d.ts +5 -0
- package/dist/fetch-client.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/locales/en-XA.js +1 -1
- package/dist/locales/en-XA.po +183 -4
- package/dist/locales/en.js +1 -1
- package/dist/locales/en.po +184 -5
- package/dist/services/job.service.d.ts +2 -0
- package/dist/services/job.service.js +2 -0
- package/dist/services/onboarding.service.d.ts +1 -0
- package/dist/services/onboarding.service.js +8 -0
- package/dist/services/snapshot.service.d.ts +1 -1
- package/dist/services/snapshot.service.js +6 -1
- package/package.json +2 -2
|
@@ -25,13 +25,25 @@
|
|
|
25
25
|
import DashboardRecentBackups from "./DashboardRecentBackups.svelte";
|
|
26
26
|
import DashboardTotalStored from "./DashboardTotalStored.svelte";
|
|
27
27
|
import Section from "../ui/Section.svelte";
|
|
28
|
+
import type { Snippet } from "svelte";
|
|
28
29
|
|
|
29
30
|
type Props = {
|
|
30
31
|
initialData?: RepositoryListResponseDto;
|
|
31
32
|
onViewBackups?: () => void;
|
|
33
|
+
showSetupLink?: boolean;
|
|
34
|
+
hideEmptySummary?: boolean;
|
|
35
|
+
intro?: Snippet;
|
|
36
|
+
outro?: Snippet;
|
|
32
37
|
};
|
|
33
38
|
|
|
34
|
-
const {
|
|
39
|
+
const {
|
|
40
|
+
initialData,
|
|
41
|
+
onViewBackups,
|
|
42
|
+
showSetupLink = true,
|
|
43
|
+
hideEmptySummary = false,
|
|
44
|
+
intro,
|
|
45
|
+
outro,
|
|
46
|
+
}: Props = $props();
|
|
35
47
|
|
|
36
48
|
const local = getProvider().api === "orchestrator";
|
|
37
49
|
|
|
@@ -48,7 +60,7 @@
|
|
|
48
60
|
<HStack class="items-center justify-between" wrap>
|
|
49
61
|
<Heading tag="h1" size="medium">{$t`Overview`}</Heading>
|
|
50
62
|
|
|
51
|
-
{#if !local}
|
|
63
|
+
{#if !local && showSetupLink}
|
|
52
64
|
<Button
|
|
53
65
|
href="https://my.immich.app/link?target=backups"
|
|
54
66
|
variant="outline"
|
|
@@ -65,21 +77,27 @@
|
|
|
65
77
|
{:else if query.isError}
|
|
66
78
|
<Alert color="danger">{getReadableErrorMessage(query.error)}</Alert>
|
|
67
79
|
{:else if query.isSuccess}
|
|
68
|
-
|
|
80
|
+
{@render intro?.()}
|
|
69
81
|
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
{$t`Storage & Usage`}
|
|
73
|
-
{/snippet}
|
|
82
|
+
{#if !hideEmptySummary || query.data.length > 0}
|
|
83
|
+
<DashboardBackupHealth repositories={query.data} {onViewBackups} />
|
|
74
84
|
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<DashboardDailyBackupTime repositories={query.data} />
|
|
80
|
-
</div>
|
|
81
|
-
</Section>
|
|
85
|
+
<Section>
|
|
86
|
+
{#snippet title()}
|
|
87
|
+
{$t`Storage & Usage`}
|
|
88
|
+
{/snippet}
|
|
82
89
|
|
|
83
|
-
|
|
90
|
+
<div class="grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
|
|
91
|
+
<DashboardTotalStored repositories={query.data} />
|
|
92
|
+
<DashboardCurrentUsage />
|
|
93
|
+
<DashboardAvgBackupTime repositories={query.data} />
|
|
94
|
+
<DashboardDailyBackupTime repositories={query.data} />
|
|
95
|
+
</div>
|
|
96
|
+
</Section>
|
|
97
|
+
|
|
98
|
+
<DashboardRecentBackups repositories={query.data} />
|
|
99
|
+
{/if}
|
|
100
|
+
|
|
101
|
+
{@render outro?.()}
|
|
84
102
|
{/if}
|
|
85
103
|
</Stack>
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { RepositoryListResponseDto } from "../../fetch-client";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
2
3
|
type Props = {
|
|
3
4
|
initialData?: RepositoryListResponseDto;
|
|
4
5
|
onViewBackups?: () => void;
|
|
6
|
+
showSetupLink?: boolean;
|
|
7
|
+
hideEmptySummary?: boolean;
|
|
8
|
+
intro?: Snippet;
|
|
9
|
+
outro?: Snippet;
|
|
5
10
|
};
|
|
6
11
|
declare const DashboardPage: import("svelte").Component<Props, {}, "">;
|
|
7
12
|
type DashboardPage = ReturnType<typeof DashboardPage>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { LocalRepositoryDto } from "../../fetch-client";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
FormatBytes,
|
|
5
|
+
Icon,
|
|
6
|
+
modalManager,
|
|
7
|
+
type ActionItem,
|
|
8
|
+
} from "@immich/ui";
|
|
4
9
|
import {
|
|
5
10
|
mdiCloudCheckOutline,
|
|
6
11
|
mdiCloudOffOutline,
|
|
@@ -53,7 +58,7 @@
|
|
|
53
58
|
|
|
54
59
|
{#if recentAttempts.length === 0}
|
|
55
60
|
<StackListPlaceholder>
|
|
56
|
-
{$t`Completed backups will appear here
|
|
61
|
+
{$t`Completed backups will appear here after your first backup finishes.`}
|
|
57
62
|
</StackListPlaceholder>
|
|
58
63
|
{/if}
|
|
59
64
|
|
|
@@ -75,7 +80,12 @@
|
|
|
75
80
|
: outcome === "warn"
|
|
76
81
|
? $t`Backed up with warnings`
|
|
77
82
|
: $t`Backed up`}
|
|
78
|
-
<RelativeTime time={repository.metrics.lastBackup!} />
|
|
83
|
+
<RelativeTime time={repository.metrics.lastBackup!} /> ·
|
|
84
|
+
{#if repository.meter}
|
|
85
|
+
<FormatBytes bytes={repository.meter.sizeBytes} />
|
|
86
|
+
{:else}
|
|
87
|
+
{$t`Estimated`} <FormatBytes bytes={repository.metrics.sizeBytes} />
|
|
88
|
+
{/if}
|
|
79
89
|
</StackListItem>
|
|
80
90
|
{/each}
|
|
81
91
|
</StackList>
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
import OnboardingStepModal from "../../onboarding/steps/OnboardingStepModal.svelte";
|
|
6
6
|
import OnboardingStepTelemetry from "../../onboarding/steps/OnboardingStepTelemetry.svelte";
|
|
7
7
|
import RestorePointFlow from "../../onboarding/restore-point-flow/RestorePointFlow.svelte";
|
|
8
|
+
import RestorePointFlow4Restore from "../../onboarding/restore-point-flow/RestorePointFlow4Restore.svelte";
|
|
8
9
|
import type { OnboardingStatusResponseDto } from "../../../fetch-client";
|
|
9
10
|
import {
|
|
10
11
|
handleConfirmRecoveryKey,
|
|
12
|
+
handleContinueAfterRestore,
|
|
11
13
|
handleOnboardingStatus,
|
|
12
14
|
} from "../../../services/onboarding.service";
|
|
13
15
|
import { LoadingSpinner } from "@immich/ui";
|
|
@@ -27,7 +29,19 @@
|
|
|
27
29
|
| "key-import"
|
|
28
30
|
| "backup-service"
|
|
29
31
|
| "restore-point"
|
|
30
|
-
| "key-reimport"
|
|
32
|
+
| "key-reimport"
|
|
33
|
+
| "restoring" = $state("key-import");
|
|
34
|
+
let restoreJobId: string | undefined = $state();
|
|
35
|
+
|
|
36
|
+
const onRestore = (jobId: string) => {
|
|
37
|
+
restoreJobId = jobId;
|
|
38
|
+
stage = "restoring";
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const onRestoreFinished = async () => {
|
|
42
|
+
await handleContinueAfterRestore();
|
|
43
|
+
onFinish();
|
|
44
|
+
};
|
|
31
45
|
|
|
32
46
|
onMount(() => {
|
|
33
47
|
handleOnboardingStatus().then((data) => {
|
|
@@ -37,7 +51,9 @@
|
|
|
37
51
|
return;
|
|
38
52
|
}
|
|
39
53
|
|
|
40
|
-
if (data.
|
|
54
|
+
if (data.restoreJobId) {
|
|
55
|
+
onRestore(data.restoreJobId);
|
|
56
|
+
} else if (data.hasTelemetry === "none") {
|
|
41
57
|
stage = "telemetry";
|
|
42
58
|
} else if (data.hasOnboardedKey) {
|
|
43
59
|
stage = data.hasBackend ? "restore-point" : "backup-service";
|
|
@@ -101,6 +117,8 @@
|
|
|
101
117
|
<RestorePointFlow
|
|
102
118
|
onImportKey={() => (stage = "key-reimport")}
|
|
103
119
|
onCancel={onExit}
|
|
104
|
-
{
|
|
120
|
+
{onRestore}
|
|
105
121
|
/>
|
|
122
|
+
{:else if stage === "restoring" && restoreJobId}
|
|
123
|
+
<RestorePointFlow4Restore jobId={restoreJobId} onFinish={onRestoreFinished} />
|
|
106
124
|
{/if}
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
type Props = {
|
|
9
9
|
onCancel: () => void;
|
|
10
10
|
onImportKey: () => void;
|
|
11
|
-
|
|
11
|
+
onRestore: (jobId: string) => void;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
const { onCancel, onImportKey,
|
|
14
|
+
const { onCancel, onImportKey, onRestore }: Props = $props();
|
|
15
15
|
|
|
16
16
|
const query = useInspectRepositories();
|
|
17
17
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<RestorePointFlow2SelectSnapshot
|
|
27
27
|
onBack={() => (selectedRepository = undefined)}
|
|
28
28
|
{repository}
|
|
29
|
-
{
|
|
29
|
+
{onRestore}
|
|
30
30
|
/>
|
|
31
31
|
{:else}
|
|
32
32
|
<SelectRepositoryModal
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type Props = {
|
|
2
2
|
onCancel: () => void;
|
|
3
3
|
onImportKey: () => void;
|
|
4
|
-
|
|
4
|
+
onRestore: (jobId: string) => void;
|
|
5
5
|
};
|
|
6
6
|
declare const RestorePointFlow: import("svelte").Component<Props, {}, "">;
|
|
7
7
|
type RestorePointFlow = ReturnType<typeof RestorePointFlow>;
|
package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte
CHANGED
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
|
|
22
22
|
type Props = {
|
|
23
23
|
onBack: () => void;
|
|
24
|
-
|
|
24
|
+
onRestore: (jobId: string) => void;
|
|
25
25
|
|
|
26
26
|
repository: InspectedLocalRepositoryDto;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
const { onBack,
|
|
29
|
+
const { onBack, onRestore, repository }: Props = $props();
|
|
30
30
|
const id = $props.id();
|
|
31
31
|
|
|
32
32
|
let selectedSnapshot: SnapshotDto | undefined = $state();
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
{#if selectedSnapshot}
|
|
38
38
|
<RestorePointFlow3ConfirmRestore
|
|
39
39
|
onBack={() => (selectedSnapshot = undefined)}
|
|
40
|
-
{
|
|
40
|
+
{onRestore}
|
|
41
41
|
{repository}
|
|
42
42
|
snapshot={selectedSnapshot}
|
|
43
43
|
/>
|
package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InspectedLocalRepositoryDto } from "../../../fetch-client";
|
|
2
2
|
type Props = {
|
|
3
3
|
onBack: () => void;
|
|
4
|
-
|
|
4
|
+
onRestore: (jobId: string) => void;
|
|
5
5
|
repository: InspectedLocalRepositoryDto;
|
|
6
6
|
};
|
|
7
7
|
declare const RestorePointFlow2SelectSnapshot: import("svelte").Component<Props, {}, "">;
|
package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte
CHANGED
|
@@ -18,18 +18,17 @@
|
|
|
18
18
|
} from "@immich/ui";
|
|
19
19
|
import { tick } from "svelte";
|
|
20
20
|
import { SvelteSet } from "svelte/reactivity";
|
|
21
|
-
import RestorePointFlow4Restore from "./RestorePointFlow4Restore.svelte";
|
|
22
21
|
import { t } from "svelte-i18n-lingui";
|
|
23
22
|
|
|
24
23
|
type Props = {
|
|
25
24
|
onBack: () => void;
|
|
26
|
-
|
|
25
|
+
onRestore: (jobId: string) => void;
|
|
27
26
|
|
|
28
27
|
repository: InspectedLocalRepositoryDto;
|
|
29
28
|
snapshot: SnapshotDto;
|
|
30
29
|
};
|
|
31
30
|
|
|
32
|
-
const { onBack,
|
|
31
|
+
const { onBack, onRestore, repository, snapshot }: Props = $props();
|
|
33
32
|
const backupIncludesId = $props.id();
|
|
34
33
|
let yuccaConfigField: HTMLElement | undefined = $state();
|
|
35
34
|
|
|
@@ -58,10 +57,11 @@
|
|
|
58
57
|
snapshot.paths.filter((path) => !path.includes("yucca")),
|
|
59
58
|
);
|
|
60
59
|
|
|
61
|
-
let
|
|
60
|
+
let starting = $state(false);
|
|
62
61
|
|
|
63
62
|
async function handleRestore() {
|
|
64
|
-
|
|
63
|
+
starting = true;
|
|
64
|
+
const response = await handleRestoreFromPoint(
|
|
65
65
|
repository.id,
|
|
66
66
|
snapshot.id,
|
|
67
67
|
repository.backends!.primary.id,
|
|
@@ -69,61 +69,62 @@
|
|
|
69
69
|
yuccaConfig,
|
|
70
70
|
include: [...includePaths].filter((path) => path !== yuccaConfig),
|
|
71
71
|
},
|
|
72
|
-
)
|
|
72
|
+
);
|
|
73
|
+
starting = false;
|
|
74
|
+
|
|
75
|
+
if (response) {
|
|
76
|
+
onRestore(response.jobId);
|
|
77
|
+
}
|
|
73
78
|
}
|
|
74
79
|
</script>
|
|
75
80
|
|
|
76
|
-
{
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{/if}
|
|
96
|
-
</HStack>
|
|
97
|
-
</Field>
|
|
81
|
+
<Modal focusOnOpen title={$t`Confirm restore from snapshot`} size="small" onClose={onBack}>
|
|
82
|
+
<ModalBody>
|
|
83
|
+
<Stack>
|
|
84
|
+
<Field label={$t`Restore configuration`}>
|
|
85
|
+
<HStack class="items-end">
|
|
86
|
+
<div bind:this={yuccaConfigField} class="flex-1">
|
|
87
|
+
<Select
|
|
88
|
+
options={yuccaConfigOptions}
|
|
89
|
+
bind:value={yuccaConfig}
|
|
90
|
+
placeholder={$t`Not restoring backup configuration`}
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
{#if yuccaConfig}
|
|
94
|
+
<Button variant="ghost" onclick={clearYuccaConfig}>
|
|
95
|
+
{$t`Clear`}
|
|
96
|
+
</Button>
|
|
97
|
+
{/if}
|
|
98
|
+
</HStack>
|
|
99
|
+
</Field>
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
101
|
+
<div role="group" aria-labelledby={backupIncludesId} class="flex flex-col gap-2">
|
|
102
|
+
<Text id={backupIncludesId} fontWeight="bold">{$t`Backup includes`}</Text>
|
|
103
|
+
{#each snapshot.paths as path}
|
|
104
|
+
{@const forced = path === yuccaConfig}
|
|
105
|
+
<label class="select-none flex gap-2 items-center">
|
|
106
|
+
<Checkbox
|
|
107
|
+
checked={forced || includePaths.has(path)}
|
|
108
|
+
disabled={forced}
|
|
109
|
+
onCheckedChange={() =>
|
|
110
|
+
includePaths.has(path)
|
|
111
|
+
? includePaths.delete(path)
|
|
112
|
+
: includePaths.add(path)}
|
|
113
|
+
/>
|
|
114
|
+
{path}
|
|
115
|
+
</label>
|
|
116
|
+
{/each}
|
|
117
|
+
</div>
|
|
116
118
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
{/if}
|
|
119
|
+
<Text size="small" color="muted">
|
|
120
|
+
{$t`Files will be restored to their exact paths.`}
|
|
121
|
+
</Text>
|
|
122
|
+
</Stack>
|
|
123
|
+
</ModalBody>
|
|
124
|
+
<ModalFooter>
|
|
125
|
+
<HStack>
|
|
126
|
+
<Button variant="ghost" onclick={onBack}>{$t`Back`}</Button>
|
|
127
|
+
<Button onclick={handleRestore} disabled={starting}>{$t`Restore`}</Button>
|
|
128
|
+
</HStack>
|
|
129
|
+
</ModalFooter>
|
|
130
|
+
</Modal>
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import OnEvents from "../../util/OnEvents.svelte";
|
|
3
3
|
import {
|
|
4
|
+
getJobProgress,
|
|
4
5
|
getRemainingText,
|
|
5
6
|
isJobFinished,
|
|
7
|
+
isJobSucceeded,
|
|
6
8
|
useJob,
|
|
7
9
|
useJobEventHandler,
|
|
8
10
|
type JobUpdateEvent,
|
|
9
11
|
} from "../../../services/job.service";
|
|
10
12
|
import { now } from "../../../utils/now";
|
|
11
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
Alert,
|
|
15
|
+
Button,
|
|
16
|
+
HStack,
|
|
17
|
+
Modal,
|
|
18
|
+
ModalBody,
|
|
19
|
+
ModalFooter,
|
|
20
|
+
ProgressBar,
|
|
21
|
+
Stack,
|
|
22
|
+
Text,
|
|
23
|
+
} from "@immich/ui";
|
|
12
24
|
import { t } from "svelte-i18n-lingui";
|
|
13
25
|
|
|
14
26
|
type Props = {
|
|
@@ -22,7 +34,8 @@
|
|
|
22
34
|
// svelte-ignore state_referenced_locally
|
|
23
35
|
const jobQuery = useJob(jobId);
|
|
24
36
|
const job = $derived(jobQuery.data);
|
|
25
|
-
const
|
|
37
|
+
const succeeded = $derived(isJobSucceeded(job?.status));
|
|
38
|
+
const progress = $derived(getJobProgress(job));
|
|
26
39
|
const errors = $derived(job?.outcome?.errors ?? []);
|
|
27
40
|
const currentFiles = $derived(jobQuery.data?.progress?.currentFiles ?? []);
|
|
28
41
|
const jobEventHandler = useJobEventHandler();
|
|
@@ -42,7 +55,9 @@
|
|
|
42
55
|
? $t`Restore cancelled`
|
|
43
56
|
: errors.length > 0 || job?.status === "failed"
|
|
44
57
|
? $t`Restore failed`
|
|
45
|
-
:
|
|
58
|
+
: succeeded
|
|
59
|
+
? $t`Restore complete`
|
|
60
|
+
: $t`Restoring`}
|
|
46
61
|
size="small"
|
|
47
62
|
onClose={isJobFinished(job?.status) ? onFinish : undefined}
|
|
48
63
|
>
|
|
@@ -77,4 +92,11 @@
|
|
|
77
92
|
{/if}
|
|
78
93
|
</Stack>
|
|
79
94
|
</ModalBody>
|
|
95
|
+
{#if succeeded}
|
|
96
|
+
<ModalFooter>
|
|
97
|
+
<HStack>
|
|
98
|
+
<Button onclick={onFinish}>{$t`Continue`}</Button>
|
|
99
|
+
</HStack>
|
|
100
|
+
</ModalFooter>
|
|
101
|
+
{/if}
|
|
80
102
|
</Modal>
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
footer?: Snippet;
|
|
23
23
|
footerColor?: TileColor;
|
|
24
24
|
actions?: ActionItem[];
|
|
25
|
+
stackOnMobile?: boolean;
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
const {
|
|
@@ -34,19 +35,27 @@
|
|
|
34
35
|
footer,
|
|
35
36
|
footerColor = "primary",
|
|
36
37
|
actions = [],
|
|
38
|
+
stackOnMobile = false,
|
|
37
39
|
}: Props = $props();
|
|
38
40
|
</script>
|
|
39
41
|
|
|
40
42
|
<div>
|
|
41
|
-
<HStack
|
|
43
|
+
<HStack
|
|
44
|
+
gap={4}
|
|
45
|
+
class={`${className} px-5 py-4 ${stackOnMobile ? "items-start sm:items-center" : "items-center"}`}
|
|
46
|
+
>
|
|
42
47
|
{#if icon}
|
|
43
48
|
<IconTile {color}>{@render icon()}</IconTile>
|
|
44
49
|
{/if}
|
|
45
50
|
|
|
46
51
|
{#if title}
|
|
47
52
|
<Stack gap={0} class="flex-1 min-w-0">
|
|
48
|
-
<Text class="truncate">{title}</Text>
|
|
53
|
+
<Text class={stackOnMobile ? "sm:truncate" : "truncate"}>{title}</Text>
|
|
49
54
|
<Text size="small" color="muted">{@render children()}</Text>
|
|
55
|
+
|
|
56
|
+
{#if stackOnMobile && trailing}
|
|
57
|
+
<div class="mt-3 flex sm:hidden">{@render trailing()}</div>
|
|
58
|
+
{/if}
|
|
50
59
|
</Stack>
|
|
51
60
|
{:else}
|
|
52
61
|
<HStack gap={1} class="flex-1 items-baseline">
|
|
@@ -54,7 +63,11 @@
|
|
|
54
63
|
</HStack>
|
|
55
64
|
{/if}
|
|
56
65
|
|
|
57
|
-
{
|
|
66
|
+
{#if stackOnMobile && trailing}
|
|
67
|
+
<div class="hidden sm:block">{@render trailing()}</div>
|
|
68
|
+
{:else}
|
|
69
|
+
{@render trailing?.()}
|
|
70
|
+
{/if}
|
|
58
71
|
|
|
59
72
|
{#if hasActions(actions)}
|
|
60
73
|
<ContextMenuButton
|
package/dist/fetch-client.d.ts
CHANGED
|
@@ -251,6 +251,7 @@ export type OnboardingStatusResponseDto = {
|
|
|
251
251
|
hasBackup: boolean;
|
|
252
252
|
hasSchedule: boolean;
|
|
253
253
|
hasSkippedExtraConfig: boolean;
|
|
254
|
+
restoreJobId?: string;
|
|
254
255
|
};
|
|
255
256
|
export type CurrentRecoveryKeyResponse = {
|
|
256
257
|
recoveryKey: string;
|
|
@@ -484,6 +485,10 @@ export declare function futoBackupsSkipOnboardingExtraConfig(opts?: Oazapfts.Req
|
|
|
484
485
|
* Enable FUTO Backups telemetry
|
|
485
486
|
*/
|
|
486
487
|
export declare function futoBackupsEnableTelemetry(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
488
|
+
/**
|
|
489
|
+
* Continue after a restore
|
|
490
|
+
*/
|
|
491
|
+
export declare function futoBackupsContinueAfterRestore(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
487
492
|
/**
|
|
488
493
|
* Report a startup error
|
|
489
494
|
*/
|
package/dist/fetch-client.js
CHANGED
|
@@ -254,6 +254,15 @@ export function futoBackupsEnableTelemetry(opts) {
|
|
|
254
254
|
method: "POST"
|
|
255
255
|
}));
|
|
256
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Continue after a restore
|
|
259
|
+
*/
|
|
260
|
+
export function futoBackupsContinueAfterRestore(opts) {
|
|
261
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/onboarding/restore/continue", {
|
|
262
|
+
...opts,
|
|
263
|
+
method: "POST"
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
257
266
|
/**
|
|
258
267
|
* Report a startup error
|
|
259
268
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { default as StackListItem } from './components/ui/StackListItem.svelte';
|
|
|
23
23
|
export { default as VisualisationGauge } from './components/ui/VisualisationGauge.svelte';
|
|
24
24
|
export { default as VisualisationSegmentedBar } from './components/ui/VisualisationSegmentedBar.svelte';
|
|
25
25
|
export { default as OnEvents } from './components/util/OnEvents.svelte';
|
|
26
|
+
export { default as RelativeTime } from './components/util/RelativeTime.svelte';
|
|
26
27
|
export { default as YuccaContext } from './components/util/YuccaContext.svelte';
|
|
27
28
|
export * from './providers';
|
|
28
29
|
export * as sdk from './fetch-client';
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export { default as StackListItem } from './components/ui/StackListItem.svelte';
|
|
|
23
23
|
export { default as VisualisationGauge } from './components/ui/VisualisationGauge.svelte';
|
|
24
24
|
export { default as VisualisationSegmentedBar } from './components/ui/VisualisationSegmentedBar.svelte';
|
|
25
25
|
export { default as OnEvents } from './components/util/OnEvents.svelte';
|
|
26
|
+
export { default as RelativeTime } from './components/util/RelativeTime.svelte';
|
|
26
27
|
export { default as YuccaContext } from './components/util/YuccaContext.svelte';
|
|
27
28
|
export * from './providers';
|
|
28
29
|
export * as sdk from './fetch-client';
|