Skip to content

Commit fbb1c90

Browse files
wip
1 parent 800fa7c commit fbb1c90

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

client/src/components/Backup.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Listing, DropdownItem, Header, Button } from "@statamic/cms/ui";
33
import { requireElevatedSession } from "@statamic/cms"
44
import { useBackupStore } from "../store";
5-
import { ref } from "vue";
5+
import { ref, watch } from "vue";
66
import { useResumable } from "../resumable";
77
88
const props = defineProps(['chunkSize']);
@@ -20,6 +20,11 @@ const { files } = useResumable({ chunkSize: props.chunkSize ?? 2 * 1024 * 1024,
2020
2121
backupStore.startPolling();
2222
23+
watch(() => backupStore.status, (newStatus, oldStatus) => {
24+
if (newStatus !== oldStatus) {
25+
listing.value.refresh();
26+
}
27+
});
2328
2429
2530
const restoreFrom = async (id) => {

client/src/resumable.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const useResumable = ({
6767
path: null,
6868
},
6969
];
70+
window.Statamic.$progress.start(file.uniqueIdentifier);
7071
resumable.upload();
7172
});
7273

@@ -75,6 +76,7 @@ export const useResumable = ({
7576

7677
window.Statamic.$toast.success(data.message);
7778

79+
window.Statamic.$progress.complete(file.uniqueIdentifier);
7880
onFileUploaded?.(findFile(file));
7981

8082
files.value = files.value.filter(

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function configureNavigation(): void
8787
->can('manage backups')
8888
->section('Tools')
8989
->route('itiden.backup.index')
90-
->icon('table');
90+
->icon('save');
9191
});
9292
}
9393

0 commit comments

Comments
 (0)