From 75f0d535666884c99b43bec3a5d635893a721d0b Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 14 Feb 2023 15:46:44 +0100 Subject: [PATCH] refactor --- src/components/ui/VnConfirm.vue | 30 +++++++---- src/pages/Claim/Card/ClaimPhoto.vue | 77 ++++++++++++++++++----------- 2 files changed, 69 insertions(+), 38 deletions(-) diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue index 2c84eeac3..1b92477eb 100644 --- a/src/components/ui/VnConfirm.vue +++ b/src/components/ui/VnConfirm.vue @@ -3,28 +3,29 @@ import { ref } from 'vue'; import { useDialogPluginComponent } from 'quasar'; import { useI18n } from 'vue-i18n'; -const $props = defineProps({ +const { t } = useI18n(); + +const props = defineProps({ icon: { type: String, - default: '', + default: null, }, question: { type: String, - default: 'Confirm', + default: null, }, message: { type: String, - default: 'Are you sure you want to continue?', + default: null, }, }); defineEmits(['confirm', ...useDialogPluginComponent.emits]); const { dialogRef, onDialogOK } = useDialogPluginComponent(); -const { t } = useI18n(); -const question = ref($props.question); -const message = ref($props.message); +const question = props.question || t('question'); +const message = props.message || t('message'); const isLoading = ref(false); + + + "en": { + "message": "This file will be deleted" + } + + "es": { + "message": "Este archivo va a ser borrado" + } +