6387706be6
A11y rescan Pattern B — scoped CSS `.sep { color: #92907b; }` повторяется
в 8 компонентах (page-stats / page-meta / hero-meta containers с точкой-
разделителем `·`). На ivory page background #f6f3ec даёт contrast
2.92:1, ниже WCAG 2.1 AA 4.5:1 threshold.
Fix: #92907b → #6b6356 — same warm-grey hue, darker tone, gives
5.33:1 contrast. 8 files:
- views/{DealsView,BillingView,KanbanView,ReportsView}.vue
- components/dashboard/DashboardPageHead.vue
- components/deals/DealDetailHero.vue
- components/admin/tenants/TenantsStatsHeader.vue
- components/admin/tenant-detail/TenantDetailHeader.vue
Closes Pa11y «color-contrast» violations на /dashboard /billing /reports
(8 .sep elements total flagged).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
93 lines
2.5 KiB
Vue
93 lines
2.5 KiB
Vue
<script setup lang="ts">
|
|
interface Stats {
|
|
total: number;
|
|
active: number;
|
|
trial: number;
|
|
overdue: number;
|
|
monthlyRevenueRub: number;
|
|
}
|
|
|
|
defineProps<{
|
|
stats: Stats;
|
|
loading: boolean;
|
|
}>();
|
|
|
|
const emit = defineEmits<{
|
|
refresh: [];
|
|
}>();
|
|
|
|
function formatRub(v: number): string {
|
|
return new Intl.NumberFormat('ru-RU').format(v) + ' ₽';
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<header class="page-head">
|
|
<div>
|
|
<h1 class="text-h4 mb-2 page-title">Тенанты</h1>
|
|
<div class="page-stats text-body-2 text-medium-emphasis">
|
|
<span
|
|
><span class="num">{{ stats.total }}</span> всего</span
|
|
>
|
|
<span class="sep">·</span>
|
|
<span
|
|
><span class="num text-success">{{ stats.active }}</span> активны</span
|
|
>
|
|
<span class="sep">·</span>
|
|
<span
|
|
><span class="num">{{ stats.trial }}</span> trial</span
|
|
>
|
|
<span class="sep">·</span>
|
|
<span
|
|
><span class="num text-warning">{{ stats.overdue }}</span> просрочка</span
|
|
>
|
|
<span class="sep">·</span>
|
|
<span
|
|
>выручка месяц <span class="num text-primary">{{ formatRub(stats.monthlyRevenueRub) }}</span></span
|
|
>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex ga-2">
|
|
<v-btn
|
|
variant="outlined"
|
|
prepend-icon="mdi-refresh"
|
|
:loading="loading"
|
|
data-testid="reload-btn"
|
|
@click="emit('refresh')"
|
|
>
|
|
Обновить
|
|
</v-btn>
|
|
<v-btn variant="outlined" prepend-icon="mdi-download">Экспорт</v-btn>
|
|
</div>
|
|
</header>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.page-head {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
gap: 16px;
|
|
}
|
|
.page-title {
|
|
font-variation-settings: 'opsz' 28;
|
|
letter-spacing: -0.018em;
|
|
}
|
|
.page-stats {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
align-items: center;
|
|
}
|
|
.page-stats .sep {
|
|
/* WCAG2AA 4.5:1 fix (was #92907b → 2.92:1 on ivory; #6b6356 → 5.33:1). */
|
|
color: #6b6356;
|
|
}
|
|
.num {
|
|
font-family: 'JetBrains Mono', ui-monospace, monospace;
|
|
font-feature-settings: 'tnum';
|
|
font-weight: 500;
|
|
}
|
|
</style>
|