From a080ef5a8ec10275337473df79bd602a508c0404 Mon Sep 17 00:00:00 2001 From: "diana.dolgolyova" Date: Fri, 10 Apr 2026 21:36:33 +0300 Subject: [PATCH] fix: remaining admin & layout light theme polish - Admin forms, dialogs, and page editors: light-mode borders, text contrast - YandexMap: theme-aware map styles - Layout: theme init script adjustments --- src/app/admin/_components/ConfirmDialog.tsx | 10 ++-- src/app/admin/_components/FormField.tsx | 62 ++++++++++---------- src/app/admin/_components/ImageCropField.tsx | 10 ++-- src/app/admin/_components/PriceField.tsx | 6 +- src/app/admin/about/page.tsx | 2 +- src/app/admin/bookings/AddBookingModal.tsx | 28 ++++----- src/app/admin/bookings/SearchBar.tsx | 4 +- src/app/admin/classes/page.tsx | 12 ++-- src/app/admin/contact/page.tsx | 12 ++-- src/app/admin/layout.tsx | 28 +++++---- src/app/admin/login/page.tsx | 14 ++--- src/app/admin/master-classes/page.tsx | 30 +++++----- src/app/admin/page.tsx | 14 ++--- src/app/admin/schedule/page.tsx | 42 ++++++------- src/app/admin/team/page.tsx | 8 +-- src/app/layout.tsx | 9 ++- src/components/ui/YandexMap.tsx | 30 ++++++++-- 17 files changed, 177 insertions(+), 144 deletions(-) diff --git a/src/app/admin/_components/ConfirmDialog.tsx b/src/app/admin/_components/ConfirmDialog.tsx index e98123d..2248706 100644 --- a/src/app/admin/_components/ConfirmDialog.tsx +++ b/src/app/admin/_components/ConfirmDialog.tsx @@ -52,13 +52,13 @@ export function ConfirmDialog({ >
e.stopPropagation()} > @@ -70,8 +70,8 @@ export function ConfirmDialog({
)}
-

{title}

-

{message}

+

{title}

+

{message}

@@ -79,7 +79,7 @@ export function ConfirmDialog({ diff --git a/src/app/admin/_components/FormField.tsx b/src/app/admin/_components/FormField.tsx index 856d86b..7216559 100644 --- a/src/app/admin/_components/FormField.tsx +++ b/src/app/admin/_components/FormField.tsx @@ -12,10 +12,10 @@ interface InputFieldProps { type?: "text" | "url" | "tel"; } -const baseInput = "w-full rounded-lg border border-white/10 bg-neutral-800 px-4 py-2.5 text-white placeholder-neutral-500 outline-none hover:border-gold/30 focus:border-gold transition-colors"; +const baseInput = "w-full rounded-lg border border-neutral-200 bg-neutral-100 px-4 py-2.5 text-neutral-900 placeholder-neutral-400 outline-none hover:border-gold/30 focus:border-gold transition-colors dark:border-white/10 dark:bg-neutral-800 dark:text-white dark:placeholder-neutral-500"; const textAreaInput = `${baseInput} resize-none overflow-hidden`; -const smallInput = "rounded-md border border-white/10 bg-neutral-800 px-2.5 py-1.5 text-sm text-white placeholder-neutral-600 outline-none hover:border-gold/30 focus:border-gold transition-colors"; -const dashedInput = "flex-1 rounded-lg border border-dashed border-white/10 bg-neutral-800/50 px-4 py-2 text-sm text-white placeholder-neutral-600 outline-none hover:border-gold/30 hover:placeholder-neutral-500 focus:border-gold/50 transition-colors"; +const smallInput = "rounded-md border border-neutral-200 bg-neutral-100 px-2.5 py-1.5 text-sm text-neutral-900 placeholder-neutral-400 outline-none hover:border-gold/30 focus:border-gold transition-colors dark:border-white/10 dark:bg-neutral-800 dark:text-white dark:placeholder-neutral-600"; +const dashedInput = "flex-1 rounded-lg border border-dashed border-neutral-200 bg-neutral-100/50 px-4 py-2 text-sm text-neutral-900 placeholder-neutral-400 outline-none hover:border-gold/30 hover:placeholder-neutral-500 focus:border-gold/50 transition-colors dark:border-white/10 dark:bg-neutral-800/50 dark:text-white dark:placeholder-neutral-600"; const inputCls = baseInput; export function InputField({ @@ -311,7 +311,7 @@ export function RichTextarea({ `rounded p-1.5 transition-colors ${ active ? "text-gold bg-gold/15" - : "text-neutral-500 hover:text-white hover:bg-white/10" + : "text-neutral-500 hover:text-neutral-900 hover:bg-neutral-200 dark:hover:text-white dark:hover:bg-white/10" }`; // Preview mode: show rendered markup @@ -324,9 +324,9 @@ export function RichTextarea({ setEditing(true); requestAnimationFrame(() => ref.current?.focus()); }} - className="group rounded-lg border border-white/10 bg-neutral-800 px-4 py-2.5 cursor-text hover:border-gold/30 transition-colors relative" + className="group rounded-lg border border-neutral-200 bg-neutral-100 px-4 py-2.5 cursor-text hover:border-gold/30 transition-colors relative dark:border-white/10 dark:bg-neutral-800" > -
+
{formatMarkup(value)}
@@ -343,9 +343,9 @@ export function RichTextarea({ return (
-
+
{/* Toolbar */} -
+
@@ -480,8 +480,8 @@ export function SelectField({ {label} {hint && ( - ? - + ? + {hint} @@ -500,9 +500,9 @@ export function SelectField({ aria-expanded={open} aria-haspopup="listbox" placeholder={placeholder || "Выберите..."} - className={`w-full rounded-lg border bg-neutral-800 outline-none transition-colors ${ + className={`w-full rounded-lg border bg-neutral-100 text-neutral-900 outline-none transition-colors dark:bg-neutral-800 dark:text-white ${ label ? "px-4 py-2.5" : "px-2 py-1 text-xs" - } ${open ? "border-gold" : "border-white/10"} ${!open && value ? "text-white" : "text-white"} placeholder-neutral-500`} + } ${open ? "border-gold" : "border-neutral-200 dark:border-white/10"} placeholder-neutral-400 dark:placeholder-neutral-500`} /> ) : ( )} {open && ( -
+
{filtered.length === 0 && (
Ничего не найдено
@@ -541,8 +541,8 @@ export function SelectField({ inputRef.current?.blur(); }} className={`w-full px-4 py-2 text-left text-sm transition-colors ${ - idx === highlightIndex ? "bg-white/10" : "hover:bg-white/5" - } ${opt.value === value ? "text-gold bg-gold/5" : "text-white"}`} + idx === highlightIndex ? "bg-neutral-100 dark:bg-white/10" : "hover:bg-neutral-50 dark:hover:bg-white/5" + } ${opt.value === value ? "text-gold bg-gold/5" : "text-neutral-900 dark:text-white"}`} > {opt.label} @@ -598,7 +598,7 @@ export function TimeRangeField({ label, value, onChange, onBlur }: TimeRangeFiel value={start} onChange={(e) => handleStartChange(e.target.value)} onBlur={onBlur} - className="flex-1 rounded-lg border border-white/10 bg-neutral-800 px-3 py-2.5 text-white outline-none focus:border-gold transition-colors" + className="flex-1 rounded-lg border border-neutral-200 bg-neutral-100 px-3 py-2.5 text-neutral-900 outline-none focus:border-gold transition-colors [color-scheme:light] dark:border-white/10 dark:bg-neutral-800 dark:text-white dark:[color-scheme:dark]" /> handleEndChange(e.target.value)} onBlur={onBlur} - className="flex-1 rounded-lg border border-white/10 bg-neutral-800 px-3 py-2.5 text-white outline-none focus:border-gold transition-colors" + className="flex-1 rounded-lg border border-neutral-200 bg-neutral-100 px-3 py-2.5 text-neutral-900 outline-none focus:border-gold transition-colors [color-scheme:light] dark:border-white/10 dark:bg-neutral-800 dark:text-white dark:[color-scheme:dark]" />
@@ -677,7 +677,7 @@ export function ListField({ label, items, onChange, placeholder }: ListFieldProp type="text" value={item} onChange={(e) => update(i, e.target.value)} - className="flex-1 rounded-lg border border-white/10 bg-neutral-800 px-4 py-2 text-sm text-white outline-none focus:border-gold transition-colors" + className="flex-1 rounded-lg border border-neutral-200 bg-neutral-100 px-4 py-2 text-sm text-neutral-900 outline-none focus:border-gold transition-colors dark:border-white/10 dark:bg-neutral-800 dark:text-white" /> ))} diff --git a/src/app/admin/_components/ImageCropField.tsx b/src/app/admin/_components/ImageCropField.tsx index eb16c83..1ebb9bb 100644 --- a/src/app/admin/_components/ImageCropField.tsx +++ b/src/app/admin/_components/ImageCropField.tsx @@ -106,14 +106,14 @@ export function ImageCropField({ return (
-