From 0c7735ef85410505fddcafa099c9a6f3c1758f33 Mon Sep 17 00:00:00 2001 From: vladtechno Date: Tue, 18 Aug 2026 17:53:08 +1000 Subject: [PATCH] =?UTF-8?q?style(pwa):=20=D0=BF=D0=B0=D0=BB=D0=B8=D1=82?= =?UTF-8?q?=D1=80=D0=B0=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BD=D0=B0=20=D0=BF=D0=B0=D0=BB=D0=B8=D1=82?= =?UTF-8?q?=D1=80=D1=83=20=D1=81=D0=B0=D0=B9=D1=82=D0=B0=20pptaxi.ru?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Светлый сине-серый фон #EEF1F5, белые карточки, чернильный текст #0F172A, фирменный красный акцент #DC2626 у кнопки действия, зелёный #059669 у прихода денег, янтарный #D97706 у предупреждений — токены сняты с живого сайта (переменные --s-* в его инлайн-CSS). Имена токенов теперь роли, а не краски: canvas / surface / line / ink / muted / accent / pos / neg / warn. Прежние cream и ink описывали конкретный цвет, и при смене палитры «cream» стал бы синим. Тема браузера и манифест PWA переведены на новый фон — иначе шторка адресной строки и заставка запуска остаются от прежней темы. Co-Authored-By: Claude Opus 5 --- driver-pwa/frontend/index.html | 2 +- .../frontend/public/manifest.webmanifest | 4 +-- .../frontend/src/components/DriverPicker.tsx | 2 +- .../src/components/ImpersonationBar.tsx | 2 +- .../frontend/src/components/Segment.tsx | 2 +- .../frontend/src/components/Statement.tsx | 4 +-- .../frontend/src/components/operationIcon.tsx | 2 +- driver-pwa/frontend/src/index.css | 9 ++++-- .../frontend/src/pages/DevLoginPage.tsx | 6 ++-- driver-pwa/frontend/src/pages/LoginPage.tsx | 4 +-- driver-pwa/frontend/src/pages/PaymentPage.tsx | 2 +- driver-pwa/frontend/tailwind.config.js | 29 +++++++++++++++++-- 12 files changed, 47 insertions(+), 21 deletions(-) diff --git a/driver-pwa/frontend/index.html b/driver-pwa/frontend/index.html index 175446b..bdd67ec 100644 --- a/driver-pwa/frontend/index.html +++ b/driver-pwa/frontend/index.html @@ -3,7 +3,7 @@ - + diff --git a/driver-pwa/frontend/public/manifest.webmanifest b/driver-pwa/frontend/public/manifest.webmanifest index 39e027a..bf6dde8 100644 --- a/driver-pwa/frontend/public/manifest.webmanifest +++ b/driver-pwa/frontend/public/manifest.webmanifest @@ -4,8 +4,8 @@ "start_url": "/", "display": "standalone", "orientation": "portrait", - "background_color": "#F3EEE3", - "theme_color": "#F3EEE3", + "background_color": "#EEF1F5", + "theme_color": "#EEF1F5", "icons": [ { "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" } diff --git a/driver-pwa/frontend/src/components/DriverPicker.tsx b/driver-pwa/frontend/src/components/DriverPicker.tsx index 8804293..03001fe 100644 --- a/driver-pwa/frontend/src/components/DriverPicker.tsx +++ b/driver-pwa/frontend/src/components/DriverPicker.tsx @@ -46,7 +46,7 @@ export function DriverPicker({ onPicked }: { onPicked: (d: DriverBrief) => void return (
-
+
+
Смотрю как {driverName ?? `водитель #${driverId}`} diff --git a/driver-pwa/frontend/src/components/Segment.tsx b/driver-pwa/frontend/src/components/Segment.tsx index 633b095..fc2bd9b 100644 --- a/driver-pwa/frontend/src/components/Segment.tsx +++ b/driver-pwa/frontend/src/components/Segment.tsx @@ -8,7 +8,7 @@ export function Segment({ value, options, onChange }: Props) { type="button" onClick={() => onChange(o.value)} className={`flex-1 py-2.5 rounded-xl2 text-xs border ${ - value === o.value ? "bg-ink text-cream border-ink font-bold" : "bg-surface border-line text-muted" + value === o.value ? "bg-ink text-white border-ink font-bold" : "bg-surface border-line text-muted" }`} > {o.label} diff --git a/driver-pwa/frontend/src/components/Statement.tsx b/driver-pwa/frontend/src/components/Statement.tsx index 3a108b0..9a3ee9e 100644 --- a/driver-pwa/frontend/src/components/Statement.tsx +++ b/driver-pwa/frontend/src/components/Statement.tsx @@ -37,11 +37,11 @@ export function Statement({ from, to, kind, onFrom, onTo, onKind }: { {/* Нативный date-input: календарь телефона знакомее любого нашего. */} onFrom(e.target.value)} aria-label="Начало периода" - className="card flex-1 px-3 py-2 text-xs bg-white" /> + className="card flex-1 px-3 py-2 text-xs bg-surface" /> onTo(e.target.value)} aria-label="Конец периода" - className="card flex-1 px-3 py-2 text-xs bg-white" /> + className="card flex-1 px-3 py-2 text-xs bg-surface" />
diff --git a/driver-pwa/frontend/src/components/operationIcon.tsx b/driver-pwa/frontend/src/components/operationIcon.tsx index c9be2c7..c50f3e2 100644 --- a/driver-pwa/frontend/src/components/operationIcon.tsx +++ b/driver-pwa/frontend/src/components/operationIcon.tsx @@ -45,7 +45,7 @@ export function OperationIcon({ title }: { title: string }) { return ( diff --git a/driver-pwa/frontend/src/index.css b/driver-pwa/frontend/src/index.css index b72f7a6..5d075da 100644 --- a/driver-pwa/frontend/src/index.css +++ b/driver-pwa/frontend/src/index.css @@ -3,11 +3,14 @@ @tailwind utilities; html, body, #root { height: 100%; } -body { @apply bg-cream text-ink font-sans antialiased; margin: 0; } +body { @apply bg-canvas text-ink font-sans antialiased; margin: 0; } button { font-family: inherit; } @layer components { - .btn-primary { @apply bg-ink text-cream rounded-xl2 py-3.5 px-4 text-sm font-bold text-center w-full active:opacity-90 disabled:opacity-50; } - .btn-ghost { @apply border border-ink text-ink rounded-xl2 py-3 px-4 text-sm font-semibold text-center w-full; } + /* Кнопки повторяют сайт: действие — фирменным красным с белым текстом + (.s-btn--accent), второстепенное — белым с чернильным текстом и рамкой + (.s-btn--ghost). */ + .btn-primary { @apply bg-accent text-white rounded-xl2 py-3.5 px-4 text-sm font-bold text-center w-full active:bg-accent-press disabled:opacity-50; } + .btn-ghost { @apply bg-surface border border-line text-ink rounded-xl2 py-3 px-4 text-sm font-semibold text-center w-full active:bg-canvas-soft; } .card { @apply bg-surface border border-line rounded-2xl; } } diff --git a/driver-pwa/frontend/src/pages/DevLoginPage.tsx b/driver-pwa/frontend/src/pages/DevLoginPage.tsx index e5771ef..a53076e 100644 --- a/driver-pwa/frontend/src/pages/DevLoginPage.tsx +++ b/driver-pwa/frontend/src/pages/DevLoginPage.tsx @@ -94,7 +94,7 @@ export function DevLoginPage() { }} onKeyDown={(e) => { if (e.key === "Enter") void submit2fa(); }} placeholder="000000" - className="card w-full px-4 py-3 mb-3 text-base tracking-widest bg-white" + className="card w-full px-4 py-3 mb-3 text-base tracking-widest bg-surface" />