replace progressbar with inhouse

This commit is contained in:
2023-02-26 13:21:01 +10:00
parent c1dbde2fb7
commit b718212702
7 changed files with 213 additions and 17 deletions

View File

@@ -1,7 +1,5 @@
import { useUserStore } from "../store/UserStore";
import { ProgressFinisher, useProgress } from "@marcoschulte/vue3-progress";
const progresses = [] as ProgressFinisher[];
import { useProgressStore } from "../store/ProgressStore";
interface ApiProgressData {
loaded: number;
total: number;
@@ -82,7 +80,8 @@ export const api = {
let receivedData = false;
progresses.push(useProgress().start());
const progressStore = useProgressStore();
progressStore.start();
fetch(url, fetchOptions)
.then((response) => {
@@ -177,7 +176,7 @@ export const api = {
});
})
.finally(() => {
progresses.pop()?.finish();
progressStore.finish();
});
});
},