From 9464ccf6e181e78a93653800d80c4d85a6ffca04 Mon Sep 17 00:00:00 2001 From: Drobysh Date: Wed, 30 Sep 2026 14:40:56 +0300 Subject: [PATCH] =?UTF-8?q?feat(wordsearch):=20=D0=BF=D0=BB=D0=BE=D1=82?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D0=B3=D1=80=D0=B0=D0=B4=D0=B8=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D1=8B=20=D0=BA=D0=BB=D0=B5=D1=82=D0=BE=D0=BA=20+=20?= =?UTF-8?q?=D1=84=D0=B8=D0=BE=D0=BB=D0=B5=D1=82=D0=BE=D0=B2=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LetterGrid.tsx | 40 ++++++++++++++++++----------------- src/pages/WordSearchPage.tsx | 39 +++++++++++++++++++--------------- src/styles/theme.ts | 21 ++++++++++++++---- 3 files changed, 60 insertions(+), 40 deletions(-) diff --git a/src/components/LetterGrid.tsx b/src/components/LetterGrid.tsx index f41580f..4fdd809 100644 --- a/src/components/LetterGrid.tsx +++ b/src/components/LetterGrid.tsx @@ -1,5 +1,5 @@ import { useState, useRef, useCallback, useEffect, memo, useMemo } from 'react'; -import { colors, radius, shadows } from '../styles/theme'; +import { colors, radius, shadows, cellShadows } from '../styles/theme'; interface CellProps { letter: string; @@ -13,6 +13,8 @@ interface CellProps { } const Cell = memo(({ letter, size, fontSize, bg, border, textColor, boxShadow, animation }) => { + // 🔧 ФИКС (30.09.2026): градиенты без бордера (или тонкий полупрозрачный) + const isGradient = typeof bg === 'string' && bg.startsWith('linear-gradient'); return (
(({ letter, size, fontSize, bg, border, textColor, b justifyContent: 'center', borderRadius: radius.sm, background: bg, - border: `2px solid ${border}`, + border: isGradient ? 'none' : `2px solid ${border}`, color: textColor, fontSize: `${fontSize}px`, - fontWeight: bg !== colors.cellDefault ? 700 : 500, + fontWeight: 700, fontFamily: 'Inter, sans-serif', transition: animation ? 'all 0.3s ease' : 'all 0.15s ease', pointerEvents: 'none', boxShadow: boxShadow, animation: animation || undefined, - willChange: bg !== colors.cellDefault ? 'transform, box-shadow' : 'auto', + willChange: 'transform, box-shadow', + textShadow: isGradient ? '0 1px 2px rgba(0,0,0,0.15)' : 'none', }} > {letter} @@ -304,30 +307,29 @@ const LetterGrid: React.FC = ({ const found = foundCells.has(key); const newFound = newFoundCells.has(key); - let bg = colors.cellDefault; - let border = colors.border; - let textColor = colors.text; + // 🔧 ОБНОВЛЕНО (30.09.2026): плотные градиенты + белые буквы. + let bg = colors.cellDefault; // фиолетовый градиент + let border = 'transparent'; + let textColor = '#FFFFFF'; // всегда белый let animation = ''; - let boxShadow = shadows.cell; + let boxShadow = cellShadows.default; if (found) { - bg = colors.cellFound; - border = colors.success; - textColor = '#1a7a3a'; + bg = colors.cellFound; // зелёный градиент + textColor = '#FFFFFF'; + boxShadow = cellShadows.found; if (newFound) { animation = 'cellPopIn 0.4s ease, cellGlow 1s ease 0.4s'; } } else if (first) { - bg = colors.cellFirst; - border = colors.gold; - textColor = '#b8860b'; + bg = colors.cellFirst; // золотой градиент + textColor = '#FFFFFF'; animation = 'firstLetterPulse 1s ease infinite'; - boxShadow = '0 0 10px rgba(255, 215, 0, 0.5)'; + boxShadow = cellShadows.first; } else if (selected) { - bg = colors.cellSelected; - border = colors.accent; - textColor = colors.accent; - boxShadow = `0 0 8px ${colors.accent}40`; + bg = colors.cellSelected; // оранжевый градиент + textColor = '#FFFFFF'; + boxShadow = cellShadows.selected; } return ( diff --git a/src/pages/WordSearchPage.tsx b/src/pages/WordSearchPage.tsx index 6c9d490..7339055 100644 --- a/src/pages/WordSearchPage.tsx +++ b/src/pages/WordSearchPage.tsx @@ -75,8 +75,11 @@ const WordSearchPage: React.FC = () => { const confettiColors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEAA7', '#DDA0DD', '#98D8C8', '#F7DC6F', '#FF8A5C', '#2ECC71']; - const brandColor = '#2ECC71'; - const palette = { play: brandColor }; + // 🔧 ОБНОВЛЕНО (30.09.2026): фиолетовые кнопки, зелёный — только для "найдено" + const brandColor = '#2ECC71'; // зелёный (для очков, "найдено") + const buttonColor = '#7A3AFF'; // фиолетовый (для кнопок) + const buttonGradient = 'linear-gradient(135deg, #7A3AFF 0%, #A86BFF 100%)'; + const palette = { play: buttonColor }; const textColor = '#1A1A2E'; const subColor = '#6B7280'; const bgColor = '#F4F5F7'; @@ -689,15 +692,16 @@ const WordSearchPage: React.FC = () => {