From 62aaa5d7c9eaedb5a118469587a35585f9e4f549 Mon Sep 17 00:00:00 2001 From: Fringg Date: Wed, 29 Jul 2026 14:45:36 +0300 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=D1=84=D0=B8=D0=BA=D1=81=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D1=8B=D0=B9=20=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D0=B5=D0=B3=D1=80=D0=B0=D0=BC-=D1=81=D0=B8=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=83=20=D1=81=D0=B2=D0=BE=D1=82=D1=87=D0=B0=20=C2=AB?= =?UTF-8?q?=D0=A1=D0=B8=D0=BD=D0=B8=D0=B9=C2=BB=20=D0=B2=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=BE=20=D0=B0=D0=BA=D1=86=D0=B5=D0=BD=D1=82=D0=B0=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Свотч и превью-чип стиля primary красились в bg-accent-500 — акцент темы кабинета, который перекрашивается (у оранжевой темы «Синий» выглядел оранжевым). Реальный цвет кнопки задаёт Telegram Bot API: primary — синий независимо от темы кабинета, поэтому свотч теперь фиксированный #54a9eb (тот же телеграм-синий, что у кнопки Telegram-логина). --- src/components/admin/ButtonsTab.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/admin/ButtonsTab.tsx b/src/components/admin/ButtonsTab.tsx index c7b05d8..6869d3e 100644 --- a/src/components/admin/ButtonsTab.tsx +++ b/src/components/admin/ButtonsTab.tsx @@ -3,10 +3,10 @@ import { useTranslation } from 'react-i18next'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { buttonStylesApi, - ButtonStylesConfig, + type ButtonStylesConfig, DEFAULT_BUTTON_STYLES, BUTTON_SECTIONS, - ButtonSection, + type ButtonSection, BOT_LOCALES, } from '../../api/buttonStyles'; import { ChevronDownIcon } from '@/components/icons'; @@ -18,7 +18,10 @@ type StyleValue = 'primary' | 'success' | 'danger' | 'default'; const STYLE_OPTIONS: { value: StyleValue; colorClass: string }[] = [ { value: 'default', colorClass: 'bg-dark-500' }, - { value: 'primary', colorClass: 'bg-accent-500' }, + // 'primary' — синяя кнопка Telegram Bot API: свотч фиксированный телеграм-синий, + // а не bg-accent-500 — акцент темы кабинета перекрашивается (например, в оранжевый) + // и не имеет отношения к цвету реальной кнопки в боте. + { value: 'primary', colorClass: 'bg-[#54a9eb]' }, { value: 'success', colorClass: 'bg-success-500' }, { value: 'danger', colorClass: 'bg-error-500' }, ]; @@ -228,7 +231,7 @@ export function ButtonsTab() { ? 'bg-success-500 text-white' : cfg.style === 'danger' ? 'bg-error-500 text-white' - : 'bg-accent-500 text-on-accent' + : 'bg-[#54a9eb] text-white' }`} > {t(`admin.buttons.styles.${cfg.style}`)}