changes 1

This commit is contained in:
2026-10-29 15:26:08 +03:30
parent 5141ce8073
commit 4efb4e6ab1
116 changed files with 70120 additions and 9299 deletions
-158
View File
@@ -18,12 +18,6 @@ const {
showFullDialog,
submitting,
submitError,
addressPickerOpen,
addresses,
selectedAddressId,
newAddress,
addressBusy,
confirmAddressAndOrder,
removeItem,
proceedToCheckout,
proceedAnyway,
@@ -71,49 +65,6 @@ function goToOrdering() {
@back="goToOrdering"
/>
<div
v-if="addressPickerOpen"
class="dialog-overlay"
@click.self="addressPickerOpen = false"
>
<div class="dialog card">
<h3>آدرس ارسال</h3>
<p class="text-sm">یکی از آدرس‌های ذخیره‌شده را انتخاب کنید، یا آدرس تازه بنویسید.</p>
<ul v-if="addresses.length" class="address-pick">
<li v-for="row in addresses" :key="row.id">
<label class="address-card" :class="{ 'is-on': selectedAddressId === row.id && !newAddress.trim() }">
<input v-model="selectedAddressId" type="radio" :value="row.id" @change="newAddress = ''" />
<span class="address-card__body">
<span class="address-card__title">
<strong>{{ row.label || 'آدرس' }}</strong>
<em v-if="row.isDefault">پیش‌فرض</em>
</span>
<small>{{ row.text }}</small>
</span>
</label>
</li>
</ul>
<label class="address-new" :class="{ 'is-on': Boolean(newAddress.trim()) }">
<span>آدرس جدید</span>
<textarea
v-model="newAddress"
rows="3"
maxlength="500"
placeholder="خیابان، پلاک، واحد…"
@input="selectedAddressId = ''"
/>
</label>
<div class="dialog-actions">
<BaseButton variant="outline" :disabled="addressBusy" @click="addressPickerOpen = false">
انصراف
</BaseButton>
<BaseButton :loading="addressBusy || submitting" @click="confirmAddressAndOrder">
ثبت سفارش
</BaseButton>
</div>
</div>
</div>
<div v-if="showFullDialog" class="dialog-overlay" @click.self="showFullDialog = false">
<div class="dialog card">
<h3>سقف متراژ تکمیل شد</h3>
@@ -148,115 +99,6 @@ function goToOrdering() {
margin: 0 0 12px;
}
.address-pick {
list-style: none;
margin: 12px 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
}
.address-card {
display: flex;
align-items: flex-start;
gap: 10px;
min-width: 0;
padding: 10px 12px;
border: 1px solid #e7e5e4;
border-radius: 14px;
background: #fafaf9;
}
.address-card.is-on {
border-color: #1e293b;
background: #f8fafc;
}
.address-card input {
margin-top: 4px;
flex-shrink: 0;
}
.address-card__body {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
flex: 1;
}
.address-card__title {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.address-card__title strong {
min-width: 0;
overflow-wrap: anywhere;
}
.address-card__title em {
flex-shrink: 0;
padding: 1px 8px;
border-radius: 999px;
background: #1e293b;
color: #fff;
font-style: normal;
font-size: 0.7rem;
}
.address-card small {
display: block;
color: var(--color-text-muted);
line-height: 1.7;
overflow-wrap: anywhere;
}
.address-new {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 4px;
padding: 12px;
border: 1px dashed #cbd5e1;
border-radius: 16px;
background: #f8fafc;
font-size: 0.875rem;
}
.address-new.is-on {
border-style: solid;
border-color: #1e293b;
background: #fff;
}
.address-new span {
font-weight: 700;
color: #1e293b;
}
.address-new textarea {
width: 100%;
box-sizing: border-box;
min-height: 88px;
padding: 10px 12px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
font: inherit;
line-height: 1.7;
resize: vertical;
}
.address-new textarea:focus {
outline: none;
border-color: #1e293b;
}
@media (min-width: 768px) {
.cart-view {
flex: 1 0 auto;