fix: show file upload errors

This commit is contained in:
Ramires Viana
2025-08-01 13:44:38 -03:00
committed by GitHub
parent af9b42549f
commit 06e8713fa5
3 changed files with 18 additions and 10 deletions

View File

@@ -26,6 +26,7 @@
import {
computed,
defineAsyncComponent,
inject,
onBeforeUnmount,
onMounted,
onUnmounted,
@@ -50,6 +51,8 @@ import { name } from "../utils/constants";
const Editor = defineAsyncComponent(() => import("@/views/files/Editor.vue"));
const Preview = defineAsyncComponent(() => import("@/views/files/Preview.vue"));
const $showError = inject<IToastError>("$showError")!;
const layoutStore = useLayoutStore();
const fileStore = useFileStore();
const uploadStore = useUploadStore();
@@ -109,7 +112,7 @@ watch(reload, (newValue) => {
newValue && fetchData();
});
watch(uploadError, (newValue) => {
newValue && layoutStore.showError();
newValue && $showError(newValue);
});
// Define functions