Files
hedena_gold/apps/user-app/src/components/DialogVantOneButton.vue
T
mahmoodandCursor c438ab2159 feat(brand): rebrand to Hedena Gold and bring main user-app chrome
Rename the brand, ship Hedena logos, persist login OTP text in the SMS list, and port home/nav/auth/theme polish from main while keeping expert customers intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-27 16:40:54 +03:30

123 lines
2.4 KiB
Vue

<!--
Island-style single-action dialog. Same fallthrough v-model:show pattern
as DialogVant.vue.
-->
<template>
<van-dialog class="hg-dialog" :show-confirm-button="false" :show-cancel-button="false">
<div class="hg-dialog__inner">
<div class="hg-dialog__media">
<slot name="img">{{ text2 }}</slot>
</div>
<div class="hg-dialog__body">
<slot name="title">{{ text1 }}</slot>
</div>
<div class="hg-dialog__actions">
<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.hg-dialog {
width: min(86vw, 340px) !important;
max-width: 340px;
overflow: hidden;
border-radius: 28px !important;
background: @canvas !important;
box-shadow:
0 18px 48px rgba(15, 23, 42, 0.18),
0 2px 8px rgba(15, 23, 42, 0.06) !important;
}
.van-dialog.hg-dialog .van-dialog__content {
padding: 0 !important;
}
.van-dialog__confirm,
.van-dialog__cancel,
.van-dialog.hg-dialog .van-dialog__footer {
display: none !important;
}
.hg-dialog__inner {
display: flex;
flex-direction: column;
align-items: stretch;
padding: 8px 0 0;
}
.hg-dialog__media {
display: flex;
justify-content: center;
padding: 12px 20px 0;
img {
max-width: 78%;
max-height: 128px;
width: auto;
height: auto;
object-fit: contain;
}
}
.hg-dialog__body {
padding: 10px 22px 6px;
text-align: center;
font-size: 14.5px;
font-weight: 600;
line-height: 1.75;
color: @ink;
> div {
padding: 0 !important;
margin: 0 !important;
text-align: center !important;
font-size: inherit;
font-weight: inherit;
line-height: inherit;
}
}
.hg-dialog__actions {
display: flex;
flex-direction: column;
gap: 8px;
padding: 14px 16px 16px;
> * {
display: flex;
align-items: center;
justify-content: center;
min-height: 46px;
padding: 0 14px;
border-radius: 14px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
user-select: none;
background: @primary !important;
color: #fff !important;
transition: transform 0.12s ease;
&:active {
transform: scale(0.985);
}
}
}
</style>