Files
tehran_tala/apps/user-app/src/components/DialogVant.vue
T
s.esmaeiliandClaude Sonnet 5 c05352d6fd refactor(ui): replace modal dialogs with toast/sheet components
Remove DialogVant/NotifyVant and add Toast and Sheet components with
useToast, useReveal, and usePageTransition composables. Rework
Navigation, RegisterView, and styles across both apps; rebuild dist assets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-04 13:57:25 +03:30

57 lines
1.6 KiB
Vue

<!--
Ported from legacy henza_pwa/src/components/DialogVant.vue.
EXISTING ISSUE, ported as-is (not fixed): this component doesn't declare a
`show`/`modelValue` prop, and the internal `watch(() => props.modelValue, ...)`
references a prop that was never declared (always undefined, so that watcher
effectively never fires — its `showNotify`/timeout auto-hide logic is dead
code). Actual visibility works anyway, because <van-dialog> is this
component's sole root element and Vue's automatic attribute fallthrough
passes the parent's `v-model:show` straight through to it. Preserved exactly.
-->
<template>
<van-dialog>
<div class="my-4">
<div class="w-full flex justify-center">
<slot name="img">{{ text2 }}</slot>
</div>
<div class="w-full flex justify-center text-[18px] font-semibold">
<slot name="title">{{ text1 }}</slot>
</div>
<div class="grid grid-cols-2 border-t border-solid border-[#E5E7EB] pt-4 mx-2 mt-6 font-semibold text-[15px]">
<slot name="button">{{ text3 }}</slot>
</div>
</div>
</van-dialog>
</template>
<script setup lang="ts">
import { Dialog as VanDialog } from 'vant'
withDefaults(
defineProps<{
timeOut: number
text1?: string
text2?: string
text3?: string
}>(),
{},
)
</script>
<style lang="less">
.van-dialog__confirm,
.van-dialog__cancel {
display: none !important;
}
.van-dialog__confirm .van-button__text {
color: #23493c;
font-weight: 600;
font-size: 15px;
}
.van-dialog__cancel .van-button__text {
color: #6b7280;
font-weight: 600;
font-size: 15px;
}
</style>