Align older CRM pages with the Mento visual language.
Restyle list, form, settings, and secondary modules to match contacts/activities patterns with teal chrome, soft panels, and mobile layouts — without changing already-redesigned screens. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,6 +3,7 @@ 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,
|
||||
@@ -256,25 +257,38 @@ 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>
|
||||
<p class="eyebrow">پیگیری</p>
|
||||
<div class="head-copy">
|
||||
<h1>تقویم فعالیتها</h1>
|
||||
<p class="lead">نمای ماهانه شمسی موعد تماس، جلسه و وظیفه.</p>
|
||||
</div>
|
||||
<div class="head-actions">
|
||||
<RouterLink class="btn btn-ghost" :to="{ name: 'activities' }">لیست</RouterLink>
|
||||
<RouterLink class="btn" :to="newForSelected()">فعالیت جدید</RouterLink>
|
||||
<RouterLink class="btn ghost" :to="{ name: 'activities' }">
|
||||
<UiIcon name="list" :size="18" />
|
||||
لیست
|
||||
</RouterLink>
|
||||
<RouterLink class="btn primary" :to="newForSelected()">
|
||||
<span>+</span>
|
||||
فعالیت جدید
|
||||
</RouterLink>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="nav">
|
||||
<button class="btn btn-ghost" type="button" @click="goMonth(-1)">ماه قبل</button>
|
||||
<button class="btn ghost nav-btn" type="button" @click="goMonth(-1)">ماه قبل</button>
|
||||
<div class="nav-center">
|
||||
<strong>{{ monthLabel }}</strong>
|
||||
<button class="linkish" type="button" @click="goToday">برو به امروز</button>
|
||||
</div>
|
||||
<button class="btn btn-ghost" type="button" @click="goMonth(1)">ماه بعد</button>
|
||||
<button class="btn ghost nav-btn" type="button" @click="goMonth(1)">ماه بعد</button>
|
||||
</div>
|
||||
|
||||
<p v-if="error" class="error">{{ error }}</p>
|
||||
@@ -319,7 +333,7 @@ onMounted(() => {
|
||||
<aside class="day-panel">
|
||||
<header>
|
||||
<h2>{{ selectedLabel || 'یک روز را انتخاب کنید' }}</h2>
|
||||
<RouterLink v-if="selectedKey" class="btn btn-ghost" :to="newForSelected()">
|
||||
<RouterLink v-if="selectedKey" class="btn ghost sm" :to="newForSelected()">
|
||||
افزودن در این روز
|
||||
</RouterLink>
|
||||
</header>
|
||||
@@ -349,6 +363,25 @@ onMounted(() => {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
min-width: 0;
|
||||
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 {
|
||||
@@ -359,27 +392,66 @@ onMounted(() => {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.head-copy {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.head-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
gap: 0.55rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0;
|
||||
color: var(--accent);
|
||||
font-weight: 700;
|
||||
h1 {
|
||||
margin: 0 0 0.3rem;
|
||||
font-size: clamp(1.45rem, 2.5vw, 1.85rem);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0.2rem 0;
|
||||
font-size: 1.85rem;
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 1.05rem;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.lead,
|
||||
.muted,
|
||||
.meta {
|
||||
color: var(--muted);
|
||||
margin: 0;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.35rem;
|
||||
min-height: 42px;
|
||||
padding: 0.55rem 1rem;
|
||||
border-radius: 12px;
|
||||
font-weight: 700;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background: #14b8a6;
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 18px rgba(20, 184, 166, 0.24);
|
||||
}
|
||||
|
||||
.btn.ghost {
|
||||
background: #fff;
|
||||
color: #0f766e;
|
||||
border-color: #99f6e4;
|
||||
}
|
||||
|
||||
.btn.sm {
|
||||
min-height: 36px;
|
||||
padding: 0.4rem 0.75rem;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.nav {
|
||||
@@ -388,25 +460,27 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.65rem 0.85rem;
|
||||
background: #fff;
|
||||
border-radius: 18px;
|
||||
padding: 0.75rem 0.95rem;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.nav-center {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 0.15rem;
|
||||
color: #0f766e;
|
||||
}
|
||||
|
||||
.linkish {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
color: #14b8a6;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 700;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -418,11 +492,10 @@ h1 {
|
||||
}
|
||||
|
||||
.calendar {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
padding: 0.75rem;
|
||||
background: #fff;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
padding: 0.85rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@@ -431,10 +504,10 @@ h1 {
|
||||
grid-template-columns: repeat(7, minmax(0, 1fr));
|
||||
gap: 0.35rem;
|
||||
margin-bottom: 0.35rem;
|
||||
color: var(--muted);
|
||||
color: #94a3b8;
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.grid {
|
||||
@@ -445,9 +518,9 @@ h1 {
|
||||
|
||||
.day {
|
||||
min-height: 92px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 12px;
|
||||
background: #fbfcfb;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 14px;
|
||||
background: #f8fafc;
|
||||
padding: 0.45rem;
|
||||
text-align: right;
|
||||
cursor: pointer;
|
||||
@@ -457,6 +530,11 @@ h1 {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
min-width: 0;
|
||||
transition: border-color 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
|
||||
.day:hover {
|
||||
border-color: #99f6e4;
|
||||
}
|
||||
|
||||
.day.outside {
|
||||
@@ -464,17 +542,19 @@ h1 {
|
||||
}
|
||||
|
||||
.day.today {
|
||||
border-color: var(--accent);
|
||||
background: var(--accent-soft);
|
||||
border-color: #14b8a6;
|
||||
background: #f0fdfa;
|
||||
}
|
||||
|
||||
.day.selected {
|
||||
outline: 2px solid var(--accent);
|
||||
outline: 2px solid #14b8a6;
|
||||
outline-offset: 1px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.day.has .num {
|
||||
font-weight: 700;
|
||||
font-weight: 800;
|
||||
color: #0f766e;
|
||||
}
|
||||
|
||||
.num {
|
||||
@@ -484,10 +564,11 @@ h1 {
|
||||
.count {
|
||||
justify-self: start;
|
||||
font-size: 0.72rem;
|
||||
background: #13201b;
|
||||
color: #edf5f1;
|
||||
background: #0f766e;
|
||||
color: #fff;
|
||||
border-radius: 999px;
|
||||
padding: 0.05rem 0.4rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.previews {
|
||||
@@ -501,7 +582,7 @@ h1 {
|
||||
|
||||
.previews li {
|
||||
font-size: 0.72rem;
|
||||
color: var(--muted);
|
||||
color: #64748b;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -512,10 +593,9 @@ h1 {
|
||||
}
|
||||
|
||||
.day-panel {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
background: #fff;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
padding: 1rem;
|
||||
display: grid;
|
||||
gap: 0.85rem;
|
||||
@@ -530,11 +610,6 @@ h1 {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.day-panel h2 {
|
||||
margin: 0;
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.day-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
@@ -546,15 +621,22 @@ h1 {
|
||||
.day-list a {
|
||||
display: grid;
|
||||
gap: 0.15rem;
|
||||
padding: 0.7rem 0.8rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 12px;
|
||||
background: #fbfcfb;
|
||||
padding: 0.75rem 0.85rem;
|
||||
border: 1px solid #f1f5f9;
|
||||
border-radius: 14px;
|
||||
background: #f8fafc;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: border-color 0.15s ease;
|
||||
}
|
||||
|
||||
.day-list a:hover {
|
||||
border-color: #99f6e4;
|
||||
}
|
||||
|
||||
.day-list .type {
|
||||
font-size: 0.78rem;
|
||||
color: var(--accent);
|
||||
color: #0f766e;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@@ -562,11 +644,32 @@ h1 {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0;
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
@@ -576,11 +679,20 @@ h1 {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
@media (max-width: 700px) {
|
||||
h1 {
|
||||
font-size: 1.55rem;
|
||||
}
|
||||
|
||||
.nav {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.day {
|
||||
min-height: 54px;
|
||||
padding: 0.3rem;
|
||||
|
||||
Reference in New Issue
Block a user