diff --git a/src/locales/en.json b/src/locales/en.json index 718150a..3adae1c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1221,6 +1221,10 @@ "theme": { "colors": "Theme Colors", "reset": "Reset", + "quickPresets": "Quick Presets", + "quickPresetsDescription": "Choose a ready-made color scheme", + "customColors": "Custom Colors", + "customColorsDescription": "Customize each color individually", "accent": "Accent Color", "accentDescription": "Main brand color for buttons, links and interactive elements", "darkTheme": "Dark Theme", diff --git a/src/locales/fa.json b/src/locales/fa.json index a13371a..acf2eaa 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -700,6 +700,10 @@ "theme": { "colors": "رنگ‌های تم", "reset": "بازنشانی", + "quickPresets": "پیش‌تنظیمات سریع", + "quickPresetsDescription": "یک طرح رنگی آماده انتخاب کنید", + "customColors": "رنگ‌های سفارشی", + "customColorsDescription": "هر رنگ را جداگانه سفارشی کنید", "accent": "رنگ تأکیدی", "accentDescription": "رنگ اصلی برند برای دکمه‌ها، لینک‌ها و عناصر تعاملی", "darkTheme": "تم تیره", diff --git a/src/locales/ru.json b/src/locales/ru.json index 310a0ae..9c993c1 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -1379,6 +1379,10 @@ "theme": { "colors": "Цвета темы", "reset": "Сбросить", + "quickPresets": "Быстрые пресеты", + "quickPresetsDescription": "Выберите готовую цветовую схему", + "customColors": "Ручная настройка", + "customColorsDescription": "Настройте каждый цвет отдельно", "accent": "Акцентный цвет", "accentDescription": "Основной цвет бренда для кнопок, ссылок и интерактивных элементов", "darkTheme": "Тёмная тема", diff --git a/src/locales/zh.json b/src/locales/zh.json index f02e127..4396784 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -701,6 +701,10 @@ "theme": { "colors": "主题颜色", "reset": "重置", + "quickPresets": "快速预设", + "quickPresetsDescription": "选择现成的配色方案", + "customColors": "自定义颜色", + "customColorsDescription": "单独自定义每种颜色", "accent": "主题色", "accentDescription": "用于按钮、链接和交互元素的主品牌颜色", "darkTheme": "深色主题", diff --git a/src/pages/AdminSettings.tsx b/src/pages/AdminSettings.tsx index c640336..7b9b78d 100644 --- a/src/pages/AdminSettings.tsx +++ b/src/pages/AdminSettings.tsx @@ -1496,223 +1496,222 @@ export default function AdminSettings() {

- {/* Quick Presets */} -
- -
- {THEME_PRESETS.map((preset) => ( - + {expandedThemeSections.has('presets') && ( +
+
+ {THEME_PRESETS.map((preset) => ( +
-
-
-
-
-
-
- - ))} -
-

- Выберите готовую цветовую схему. Изменения сохраняются автоматически. -

-
- - {/* Accent Color - Collapsible */} -
- - {expandedThemeSections.has('accent') && ( -
- updateColorsMutation.mutate({ accent: color })} - disabled={updateColorsMutation.isPending} - /> +
+
+ + {preset.name} + +
+
+
+
+
+
+
+ + ))} +
)}
- {/* Dark Theme Section - Collapsible */} -
+ {/* Custom Colors - Collapsible */} +
- {expandedThemeSections.has('dark') && ( -
- updateColorsMutation.mutate({ darkBackground: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ darkSurface: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ darkText: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ darkTextSecondary: color })} - disabled={updateColorsMutation.isPending} - /> -
- )} -
- - {/* Light Theme Section - Collapsible */} -
- - {expandedThemeSections.has('light') && ( -
- updateColorsMutation.mutate({ lightBackground: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ lightSurface: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ lightText: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ lightTextSecondary: color })} - disabled={updateColorsMutation.isPending} - /> -
- )} -
- - {/* Status Colors - Collapsible */} -
- - {expandedThemeSections.has('status') && ( -
- updateColorsMutation.mutate({ success: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ warning: color })} - disabled={updateColorsMutation.isPending} - /> - updateColorsMutation.mutate({ error: color })} - disabled={updateColorsMutation.isPending} - /> + {expandedThemeSections.has('custom') && ( +
+ {/* Accent Color */} +
+

{t('theme.accent')}

+ updateColorsMutation.mutate({ accent: color })} + disabled={updateColorsMutation.isPending} + /> +
+ + {/* Dark Theme */} +
+

+ + {t('theme.darkTheme')} +

+
+ updateColorsMutation.mutate({ darkBackground: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ darkSurface: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ darkText: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ darkTextSecondary: color })} + disabled={updateColorsMutation.isPending} + /> +
+
+ + {/* Light Theme */} +
+

+ + {t('theme.lightTheme')} +

+
+ updateColorsMutation.mutate({ lightBackground: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ lightSurface: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ lightText: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ lightTextSecondary: color })} + disabled={updateColorsMutation.isPending} + /> +
+
+ + {/* Status Colors */} +
+

{t('theme.statusColors')}

+
+ updateColorsMutation.mutate({ success: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ warning: color })} + disabled={updateColorsMutation.isPending} + /> + updateColorsMutation.mutate({ error: color })} + disabled={updateColorsMutation.isPending} + /> +
+
+ + {/* Preview */} +
+

{t('theme.preview')}

+
+ + + {t('theme.success')} + {t('theme.warning')} + {t('theme.error')} +
+
)}
- - {/* Preview */} -
-

{t('theme.preview')}

-
- - - {t('theme.success')} - {t('theme.warning')} - {t('theme.error')} -
-