fix(админка): свежие файлы без ручной чистки кеша, скелетон вместо «Загрузки»

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
anor
2026-11-10 01:26:08 +10:00
co-authored by Claude Code
parent 40dcb44a7c
commit 55aca56b3f
12 changed files with 92 additions and 10 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import { api } from '/static/admin2/api.js';
import { Card } from '/static/admin2/ui/card.js';
import { Bars, Line } from '/static/admin2/ui/chart.js';
import { Table } from '/static/admin2/ui/table.js';
import { Loading } from '/static/admin2/ui/loading.js';
const html = htm.bind(h);
const rub = (v) => v == null ? '—' : Number(v).toLocaleString('ru-RU',
@@ -81,7 +82,7 @@ export function MoneyPage() {
class=${d === days ? 'active' : ''} onClick=${() => { setDays(d); setPpage(1); }}>${d} дней</button>`)}
</div>
${error ? html`<div class="card error" role="alert">${error}</div>`
: !data ? html`<div class="card">Загрузка…</div>` : html`
: !data ? html`<${Loading} />` : html`
<div class="grid">
<${Card} title="Поступления" value=${rub(data.revenue_rub)}
note=${'возвраты ' + rub(data.refunded_rub)} />
@@ -124,7 +125,7 @@ export function MoneyPage() {
{key: 'status', label: 'Статус', render: (r) => html`<span class=${'badge s-' + r.status}>${r.status}</span>`},
{key: 'yk_payment_id', label: 'ID платежа'},
]} rows=${payments.items.map((r) => ({...r, key: r.id}))} empty="Платежей за период нет" />`
: html`<p class="note">Загрузка…</p>`}
: html`<${Loading} rows={2} />`}
</section>
<section class="card accounts">
<h2>Счета клиентов</h2>