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:
2026-09-05 02:29:41 +03:30
co-authored by Cursor
parent 20a9ac0d34
commit 092767b6f2
22 changed files with 3946 additions and 1717 deletions
+98 -33
View File
@@ -118,8 +118,7 @@ onMounted(load);
<template>
<section class="page">
<header class="page-head">
<div>
<p class="eyebrow">تنظیمات</p>
<div class="head-copy">
<h1>پایگاه دانش (FAQ)</h1>
<p class="lead">سؤالات پرتکرار برای کاهش تیکت تکراری.</p>
</div>
@@ -129,7 +128,7 @@ onMounted(load);
<p v-if="ok" class="ok">{{ ok }}</p>
<p v-if="loading" class="muted">در حال بارگذاری…</p>
<form class="form" @submit.prevent="save">
<form class="panel" @submit.prevent="save">
<h2>{{ editingId ? 'ویرایش مقاله' : 'مقاله جدید' }}</h2>
<div class="field">
<label>سؤال</label>
@@ -154,12 +153,12 @@ onMounted(load);
</label>
</div>
<div class="form-actions">
<button class="btn" type="submit" :disabled="saving">
<button class="btn primary" type="submit" :disabled="saving">
{{ saving ? '…' : editingId ? 'ذخیره تغییرات' : 'افزودن' }}
</button>
<button
v-if="editingId"
class="btn btn-ghost"
class="btn ghost"
type="button"
@click="resetForm"
>
@@ -177,10 +176,10 @@ onMounted(load);
</header>
<p>{{ row.answer }}</p>
<div class="card-actions">
<button class="btn btn-ghost" type="button" @click="startEdit(row)">
<button class="btn ghost" type="button" @click="startEdit(row)">
ویرایش
</button>
<button class="btn btn-danger" type="button" @click="remove(row)">
<button class="btn danger" type="button" @click="remove(row)">
حذف
</button>
</div>
@@ -193,41 +192,54 @@ onMounted(load);
<style scoped>
.page {
display: grid;
gap: 1.1rem;
gap: 1rem;
max-width: 720px;
min-width: 0;
overflow-x: clip;
}
.eyebrow {
margin: 0;
color: var(--accent);
font-weight: 700;
.page-head {
display: flex;
justify-content: space-between;
gap: 1rem;
align-items: flex-start;
}
.head-copy {
min-width: 0;
}
h1 {
margin: 0.2rem 0;
margin: 0 0 0.3rem;
font-size: clamp(1.45rem, 2.5vw, 1.85rem);
font-weight: 800;
}
h2 {
margin: 0;
font-size: 1.05rem;
font-weight: 700;
color: #0f172a;
}
.lead,
.muted {
color: var(--muted);
margin: 0;
color: #64748b;
}
.form,
.panel,
.list {
display: grid;
gap: 0.75rem;
}
.form {
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 1rem;
.panel {
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 18px;
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
padding: 1.1rem;
}
.field {
@@ -248,13 +260,13 @@ h2 {
}
label {
color: var(--muted);
color: #64748b;
font-size: 0.9rem;
}
input,
textarea {
border: 1px solid var(--line);
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 0.7rem 0.85rem;
font: inherit;
@@ -270,6 +282,39 @@ textarea {
padding-bottom: 0.5rem;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 42px;
padding: 0.55rem 1rem;
border-radius: 12px;
font-weight: 700;
border: 1px solid transparent;
cursor: pointer;
font: inherit;
}
.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;
box-shadow: none;
}
.btn.danger {
background: #fff;
color: #b91c1c;
border-color: #fecaca;
box-shadow: none;
}
.form-actions,
.card-actions {
display: flex;
@@ -278,10 +323,11 @@ textarea {
}
.card {
border: 1px solid var(--line);
border-radius: var(--radius);
border: 1px solid #e2e8f0;
border-radius: 18px;
padding: 0.9rem 1rem;
background: var(--surface);
background: #fff;
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.card header {
@@ -295,31 +341,50 @@ textarea {
.card p {
margin: 0 0 0.65rem;
white-space: pre-wrap;
color: var(--muted);
color: #64748b;
}
.tag {
font-size: 0.75rem;
color: var(--accent);
color: #0f766e;
font-weight: 700;
}
.muted-tag {
color: var(--muted);
color: #64748b;
}
.error {
color: #b42318;
margin: 0;
color: #b91c1c;
}
.ok {
color: #027a48;
margin: 0;
color: #0f766e;
font-weight: 600;
}
.empty {
padding: 1rem;
border: 1px dashed var(--line);
border-radius: var(--radius);
color: var(--muted);
border: 1px dashed #e2e8f0;
border-radius: 18px;
color: #64748b;
}
@media (max-width: 700px) {
.row-fields {
flex-direction: column;
align-items: stretch;
}
.row-fields .field {
min-width: 0;
}
.form-actions,
.card-actions {
flex-direction: column;
}
}
</style>