feat(web): add Ant workspace tabs and harden page chrome
Persist workspace tabs in the app shell with Ant Design styling aligned to the desktop top bar, and fix tab bar layout flicker on select. Add shared PageHeader components, query helpers, and missing header state across CRM views; improve mobile shell layout and Vite HMR stability on Windows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,7 +3,6 @@ import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { RouterLink, useRoute, useRouter } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { api } from '@/lib/api';
|
||||
import UiIcon from '@/components/UiIcon.vue';
|
||||
import type { ActivityDto, PaginatedResponse } from '@mento/shared';
|
||||
import {
|
||||
addJalaliMonths,
|
||||
@@ -15,6 +14,8 @@ import {
|
||||
jalaliToDate,
|
||||
toFaDigits,
|
||||
} from '@/lib/jalali';
|
||||
import { PageHeader } from '@/components/page';
|
||||
import { CalendarOutlined, UnorderedListOutlined } from '@/icons/ant-bridge';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -257,30 +258,19 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<section class="page">
|
||||
<nav class="crumbs" aria-label="مسیر">
|
||||
<RouterLink :to="{ name: 'home' }">خانه</RouterLink>
|
||||
<span>‹</span>
|
||||
<RouterLink :to="{ name: 'activities' }">فعالیتها</RouterLink>
|
||||
<span>‹</span>
|
||||
<span>تقویم</span>
|
||||
</nav>
|
||||
|
||||
<header class="page-head">
|
||||
<div class="head-copy">
|
||||
<h1>تقویم فعالیتها</h1>
|
||||
<p class="lead">نمای ماهانه شمسی موعد تماس، جلسه و وظیفه.</p>
|
||||
</div>
|
||||
<div class="head-actions">
|
||||
<RouterLink class="btn ghost" :to="{ name: 'activities' }">
|
||||
<UiIcon name="list" :size="18" />
|
||||
لیست
|
||||
</RouterLink>
|
||||
<RouterLink class="btn primary" :to="newForSelected()">
|
||||
<span>+</span>
|
||||
فعالیت جدید
|
||||
</RouterLink>
|
||||
</div>
|
||||
</header>
|
||||
<PageHeader
|
||||
title="تقویم فعالیتها"
|
||||
subtitle="نمای ماهانه شمسی موعد تماس، جلسه و وظیفه."
|
||||
:icon="CalendarOutlined"
|
||||
primary-label="فعالیت جدید"
|
||||
:view-options="[
|
||||
{ value: 'list', label: 'لیست', icon: UnorderedListOutlined },
|
||||
{ value: 'calendar', label: 'تقویم', icon: CalendarOutlined },
|
||||
]"
|
||||
view="calendar"
|
||||
@primary="router.push(newForSelected())"
|
||||
@update:view="(v) => { if (v === 'list') void router.push({ name: 'activities' }) }"
|
||||
/>
|
||||
|
||||
<div class="nav">
|
||||
<button class="btn ghost nav-btn" type="button" @click="goMonth(-1)">ماه قبل</button>
|
||||
@@ -366,48 +356,6 @@ onMounted(() => {
|
||||
overflow-x: clip;
|
||||
}
|
||||
|
||||
.crumbs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem;
|
||||
align-items: center;
|
||||
color: #94a3b8;
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
.crumbs a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.crumbs a:hover {
|
||||
color: #0f766e;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.head-copy {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.head-actions {
|
||||
display: flex;
|
||||
gap: 0.55rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 0.3rem;
|
||||
font-size: clamp(1.45rem, 2.5vw, 1.85rem);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 1.05rem;
|
||||
@@ -650,26 +598,10 @@ h2 {
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.crumbs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.head-actions {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.head-actions .btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.day {
|
||||
min-height: 68px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user