Procházet zdrojové kódy

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

tomoya před 2 roky
rodič
revize
c5b7f12bd7

binární
frontend/src/assets/img/step/step-08.png


+ 47 - 0
frontend/src/components/Dialog.vue

@@ -0,0 +1,47 @@
+<script setup lang="ts">
+import { computed } from "vue";
+import { useI18n } from "vue-i18n";
+
+const { t } = useI18n();
+const showDialog = computed(() => props.dialog);
+
+const props = defineProps({
+  msg: {
+    type: String,
+    default: "",
+  },
+  dialog: {
+    type: Boolean,
+    default: false,
+  },
+  state: {
+    type: String,
+  },
+});
+
+const emit = defineEmits(["close"]);
+
+function close() {
+  emit("close", false);
+}
+</script>
+<template>
+  <v-dialog
+    :value="showDialog"
+    v-model="showDialog"
+    width="400"
+    @click:outside="close()"
+  >
+    <v-card>
+      <v-card-text>
+        <section class="d-flex flex-column align-center">
+          <v-icon style="font-size: 70px" icon="info" :color="state" />
+          <p class="mt-3">{{ msg }}</p>
+        </section>
+      </v-card-text>
+      <v-card-actions>
+        <v-btn @click="close()" class="mx-auto"> {{ t("close") }}</v-btn>
+      </v-card-actions>
+    </v-card>
+  </v-dialog>
+</template>