Add layout shells, desktop views, module-level page caches, and UI fixes for auth, home, wallet, transactions, address, and related pages. Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
1.4 KiB
Vue
50 lines
1.4 KiB
Vue
<template>
|
|
<header class="flex items-center justify-between gap-4">
|
|
<div>
|
|
<p class="text-sm text-gray-500">خوش آمدید</p>
|
|
<h1 class="text-xl font-bold text-gray-900">
|
|
{{ userStore.userInfo?.name ?? 'کاربر' }}
|
|
</h1>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-3">
|
|
<button
|
|
type="button"
|
|
class="flex items-center gap-2 rounded-lg border border-[#d4e3de] bg-[#eff5f3] px-4 py-2 text-sm font-bold text-primary transition hover:bg-[#e4efea]"
|
|
@click="router.push({ name: 'user' })"
|
|
>
|
|
<BasicIcon icon="vuesax-linear:user" size="18" />
|
|
<span>حساب کاربری</span>
|
|
</button>
|
|
<button
|
|
v-if="showLogout"
|
|
type="button"
|
|
class="flex items-center gap-2 rounded-lg border border-gray-200 px-4 py-2 text-sm font-bold text-gray-600 transition hover:bg-gray-50"
|
|
@click="$emit('logout')"
|
|
>
|
|
<BasicIcon icon="vuesax-linear:logout" size="18" />
|
|
<span>خروج</span>
|
|
</button>
|
|
</div>
|
|
</header>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
|
import { useUserStore } from '@/store/userStore'
|
|
import router from '@/router'
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
showLogout?: boolean
|
|
}>(),
|
|
{ showLogout: true },
|
|
)
|
|
|
|
defineEmits<{
|
|
logout: []
|
|
}>()
|
|
|
|
const userStore = useUserStore()
|
|
</script>
|