Allow mixed-company cart, add delete confirmations, and fix profile settings routes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 14:07:42 +02:00
co-authored by Cursor
parent fd3e5e5126
commit 7eef5e64b3
20 changed files with 802 additions and 145 deletions
@@ -106,21 +106,21 @@ const settingsItems: Array<{
label: 'امنیت حساب',
description: 'تغییر رمز عبور و تنظیمات ورود',
icon: IconLock,
path: '/profile/edit',
path: '/profile/security',
},
{
id: 'notifications',
label: 'اعلان‌ها',
description: 'مدیریت اعلان‌های ایمیل و پیامک',
icon: IconBell,
path: '/profile/edit',
path: '/profile/notifications',
},
{
id: 'display',
label: 'تنظیمات نمایش',
description: 'زبان، واحد پول و حالت نمایش',
icon: IconLayoutGrid,
path: '/profile/edit',
path: '/profile/display',
},
]
@@ -0,0 +1,118 @@
<script setup lang="ts">
import { useRouter } from 'vue-router'
import IconChevronBack from '@/components/icons/IconChevronBack.vue'
defineProps<{
title: string
subtitle?: string
}>()
const router = useRouter()
function goBack() {
router.push('/profile')
}
</script>
<template>
<!-- Mobile -->
<div class="page profile-subpage mobile-only">
<header class="profile-subpage__nav">
<button type="button" class="nav-btn" aria-label="بازگشت" @click="goBack">
<IconChevronBack :size="20" />
</button>
<h1 class="profile-subpage__title">{{ title }}</h1>
<button type="button" class="nav-btn nav-btn--ghost" aria-hidden="true" tabindex="-1">
<IconChevronBack :size="18" class="nav-btn__flip" />
</button>
</header>
<div class="page__scroll page__scroll--with-nav">
<div class="profile-subpage__card card">
<slot />
</div>
</div>
</div>
<!-- Desktop -->
<div class="desktop-page profile-subpage-desktop desktop-only">
<header class="desktop-page__head">
<button type="button" class="profile-subpage-desktop__back" @click="goBack">
<IconChevronBack :size="18" />
بازگشت به پروفایل
</button>
<h1 class="desktop-page__title">{{ title }}</h1>
<p v-if="subtitle" class="desktop-page__subtitle">{{ subtitle }}</p>
</header>
<div class="profile-subpage-desktop__card card">
<slot />
</div>
</div>
</template>
<style scoped>
.profile-subpage {
overflow: hidden;
}
.profile-subpage__nav {
flex-shrink: 0;
display: grid;
grid-template-columns: 40px 1fr 40px;
align-items: center;
margin-bottom: 16px;
}
.profile-subpage__title {
margin: 0;
font-size: 1.0625rem;
font-weight: 700;
text-align: center;
}
.nav-btn {
width: 40px;
height: 40px;
border: none;
background: none;
color: var(--color-text);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
}
.nav-btn--ghost {
visibility: hidden;
pointer-events: none;
}
.nav-btn__flip {
transform: scaleX(-1);
}
.profile-subpage__card {
padding: 20px 16px;
}
.profile-subpage-desktop__back {
display: inline-flex;
align-items: center;
gap: 6px;
margin-bottom: 12px;
padding: 0;
border: none;
background: none;
color: var(--color-primary);
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
}
.profile-subpage-desktop__card {
max-width: 560px;
padding: 24px;
}
</style>