feat(ui): standardize design system, modals, sidebar, and form inputs
- Implement unified design system tokens, 10px radius, and IRANSans typography - Modernize sidebar with Gemini-style collapsed expander, square 1:1 items, and elevated profile flyout - Standardize all modal dialogs with 16px padding, fixed header/footer, 16px medium title, and sticky bottom actions - Refactor DealFormView and CustomFieldsSection with standard UiField, UiInput, and UiSelect components - Add draggable bottom-left QuickCreate floating action button
This commit is contained in:
@@ -4,6 +4,11 @@ import { RouterLink, useRoute, useRouter } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { api } from '@/lib/api';
|
||||
import { toFaDigits } from '@/lib/jalali';
|
||||
import {
|
||||
UiButton,
|
||||
UiPageHeader,
|
||||
UiEmptyState,
|
||||
} from '@/components/ui';
|
||||
import UiIcon from '@/components/UiIcon.vue';
|
||||
import type {
|
||||
PaginatedResponse,
|
||||
@@ -127,15 +132,19 @@ onMounted(load);
|
||||
|
||||
<template>
|
||||
<section class="page" @click="filterOpen = false">
|
||||
<header class="page-head">
|
||||
<div class="head-copy">
|
||||
<h1>تیکتها</h1>
|
||||
<p class="lead">درخواستهای پشتیبانی را ثبت و پیگیری کنید.</p>
|
||||
</div>
|
||||
<RouterLink class="add-btn" :to="{ name: 'ticket-new' }" aria-label="تیکت جدید">
|
||||
<span>+</span>
|
||||
</RouterLink>
|
||||
</header>
|
||||
<UiPageHeader
|
||||
title="تیکتها"
|
||||
lead="درخواستهای پشتیبانی را ثبت و پیگیری کنید."
|
||||
>
|
||||
<template #actions>
|
||||
<RouterLink :to="{ name: 'ticket-new' }">
|
||||
<UiButton variant="primary">
|
||||
<UiIcon name="plus" :size="16" />
|
||||
تیکت جدید
|
||||
</UiButton>
|
||||
</RouterLink>
|
||||
</template>
|
||||
</UiPageHeader>
|
||||
|
||||
<div class="tools">
|
||||
<form class="search" @submit.prevent="onSearch">
|
||||
@@ -177,25 +186,20 @@ onMounted(load);
|
||||
<p v-if="error" class="error">{{ error }}</p>
|
||||
<p v-else-if="loading" class="muted">در حال بارگذاری…</p>
|
||||
|
||||
<div v-else-if="listEmpty" class="empty-card">
|
||||
<div class="art" aria-hidden="true">
|
||||
<svg viewBox="0 0 168 148" fill="none">
|
||||
<rect x="38" y="18" width="92" height="112" rx="16" fill="#E7F6F3" />
|
||||
<rect x="50" y="32" width="68" height="84" rx="10" fill="#fff" />
|
||||
<path d="M62 52h28" stroke="#14b8a6" stroke-width="4" stroke-linecap="round" />
|
||||
<path d="M62 68h36" stroke="#99f6e4" stroke-width="4" stroke-linecap="round" />
|
||||
<path d="M62 84h22" stroke="#99f6e4" stroke-width="4" stroke-linecap="round" />
|
||||
<circle cx="118" cy="112" r="20" fill="#14b8a6" />
|
||||
<path d="M118 104v16M110 112h16" stroke="#fff" stroke-width="3" stroke-linecap="round" />
|
||||
</svg>
|
||||
</div>
|
||||
<h2>هنوز تیکتی نیست</h2>
|
||||
<p>اولین درخواست پشتیبانی را ثبت کنید تا پیگیریها اینجا جمع شوند.</p>
|
||||
<RouterLink class="btn primary wide" :to="{ name: 'ticket-new' }">
|
||||
<span>+</span>
|
||||
تیکت جدید
|
||||
</RouterLink>
|
||||
</div>
|
||||
<UiEmptyState
|
||||
v-else-if="listEmpty"
|
||||
title="هنوز تیکتی ثبت نشده است"
|
||||
description="اولین درخواست پشتیبانی را ثبت کنید تا پیگیریها اینجا جمع شوند."
|
||||
>
|
||||
<template #action>
|
||||
<RouterLink :to="{ name: 'ticket-new' }">
|
||||
<UiButton variant="primary">
|
||||
<UiIcon name="plus" :size="16" />
|
||||
تیکت جدید
|
||||
</UiButton>
|
||||
</RouterLink>
|
||||
</template>
|
||||
</UiEmptyState>
|
||||
|
||||
<template v-else>
|
||||
<div class="list-head">
|
||||
@@ -304,7 +308,7 @@ onMounted(load);
|
||||
h1 {
|
||||
margin: 0 0 0.3rem;
|
||||
font-size: clamp(1.45rem, 2.5vw, 1.85rem);
|
||||
font-weight: 800;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.lead,
|
||||
@@ -346,25 +350,38 @@ h1 {
|
||||
}
|
||||
|
||||
.search {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
flex: 1 1 200px;
|
||||
min-width: 180px;
|
||||
max-width: 400px;
|
||||
height: var(--control-h);
|
||||
min-height: var(--control-h);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
background: #fff;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 12px;
|
||||
padding: 0 0.85rem;
|
||||
color: #94a3b8;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
padding: 0 0.75rem;
|
||||
color: var(--muted);
|
||||
box-sizing: border-box;
|
||||
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
||||
}
|
||||
|
||||
.search:focus-within {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 2px var(--accent-soft);
|
||||
}
|
||||
|
||||
.search input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
border: 0;
|
||||
outline: none;
|
||||
background: none;
|
||||
padding: 0.75rem 0;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.filter-wrap {
|
||||
@@ -377,31 +394,40 @@ h1 {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.35rem;
|
||||
height: var(--control-h);
|
||||
min-height: var(--control-h);
|
||||
padding: 0 0.95rem;
|
||||
padding: 0 0.85rem;
|
||||
border-radius: var(--radius);
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
font-size: var(--fs-sm);
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
text-decoration: none;
|
||||
box-sizing: border-box;
|
||||
transition: background var(--transition-fast), border-color var(--transition-fast);
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background: #14b8a6;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 18px rgba(20, 184, 166, 0.24);
|
||||
}
|
||||
|
||||
.btn.ghost {
|
||||
background: #fff;
|
||||
color: #0f766e;
|
||||
border-color: #99f6e4;
|
||||
color: var(--ink-secondary);
|
||||
border-color: var(--line);
|
||||
}
|
||||
|
||||
.btn.ghost:hover {
|
||||
background: var(--surface-subtle);
|
||||
border-color: var(--line-strong);
|
||||
}
|
||||
|
||||
.btn.ghost.on {
|
||||
background: #f0fdfa;
|
||||
border-color: #14b8a6;
|
||||
background: var(--accent-subtle);
|
||||
border-color: var(--accent);
|
||||
color: var(--accent-deep);
|
||||
}
|
||||
|
||||
.btn.wide {
|
||||
@@ -427,7 +453,7 @@ h1 {
|
||||
inset-inline-end: 0;
|
||||
min-width: 11rem;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
border-radius: var(--radius);
|
||||
box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
|
||||
padding: 0.35rem;
|
||||
display: grid;
|
||||
@@ -441,7 +467,7 @@ h1 {
|
||||
border: 0;
|
||||
background: none;
|
||||
padding: 0.6rem 0.7rem;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
color: #0f172a;
|
||||
@@ -455,7 +481,7 @@ h1 {
|
||||
|
||||
.empty-card {
|
||||
background: #fff;
|
||||
border-radius: 22px;
|
||||
border-radius: var(--radius);
|
||||
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
|
||||
padding: 2.4rem 1.2rem 2rem;
|
||||
display: grid;
|
||||
@@ -487,7 +513,7 @@ h1 {
|
||||
|
||||
.table-wrap {
|
||||
background: #fff;
|
||||
border-radius: 18px;
|
||||
border-radius: var(--radius);
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -601,7 +627,7 @@ h1 {
|
||||
|
||||
.m-card {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
border-radius: var(--radius);
|
||||
padding: 0.95rem 1rem;
|
||||
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
|
||||
text-decoration: none;
|
||||
|
||||
Reference in New Issue
Block a user