Переглянути джерело

Merge branch 'front-dev' of http://git.choozmo.com:3000/ai-anchor/video-maker

tomoya 2 роки тому
батько
коміт
1f3e00931f
2 змінених файлів з 7 додано та 3 видалено
  1. 2 1
      frontend/src/stores/main.ts
  2. 5 2
      frontend/src/views/main/Upload.vue

+ 2 - 1
frontend/src/stores/main.ts

@@ -241,7 +241,7 @@ export const useMainStore = defineStore("MainStoreId", {
         const response = (
           await Promise.all([
             api.uploadPlot(mainStore.token, title, file),
-            await new Promise<void>((resolve, _) => setTimeout(() => resolve(), 500)),
+            await new Promise<void>((resolve, _) => setTimeout(() => resolve(), 0)),
           ])
         );
         mainStore.removeNotification(loadingNotification);
@@ -249,6 +249,7 @@ export const useMainStore = defineStore("MainStoreId", {
           content: i18n.global.t("fileReceived"),
           color: "success",
         })
+        this.actionGetVideos();
       } catch (error) {
         await mainStore.checkApiError(error);
       }

+ 5 - 2
frontend/src/views/main/Upload.vue

@@ -21,11 +21,14 @@ watch(dialog, (newVal, oldVal) => {
 });
 
 async function Submit() {
-  dialog.value = true;
+  setTimeout(() => {
+    dialog.value = true;
+  }, 2000);
   await (Form as any).value.validate();
   if (valid.value) {
+    valid.value = false;
     await mainStore.uploadPlot(title.value, zipFiles.value[0]);
-    (Form as any).value.reset();
+    // (Form as any).value.reset();
   }
 }
 </script>