fix: normalize all API responses, add error handling and reset confirmation

- Extract normalizeConfig() for consistent response normalization
- Add onError handlers to mutations with useNotify
- Add window.confirm before destructive reset action
- Add resetConfirm translation key to all locales
This commit is contained in:
Fringg
2026-02-13 00:41:00 +03:00
parent 1a0a5ff453
commit 150a1b2dba
6 changed files with 33 additions and 12 deletions

View File

@@ -1292,6 +1292,7 @@
"emojiId": "Custom Emoji ID",
"emojiPlaceholder": "Custom emoji ID (optional)",
"resetAll": "Reset all styles",
"resetConfirm": "Reset all button styles to defaults?",
"hidden": "Hidden",
"customLabels": "Button labels",
"labelPlaceholder": "Custom button text",

View File

@@ -1001,6 +1001,7 @@
"emojiId": "شناسه ایموجی سفارشی",
"emojiPlaceholder": "شناسه ایموجی سفارشی (اختیاری)",
"resetAll": "بازنشانی همه سبک‌ها",
"resetConfirm": "همه سبک‌های دکمه به حالت پیش‌فرض بازنشانی شوند؟",
"hidden": "پنهان",
"customLabels": "نام‌های دکمه",
"labelPlaceholder": "متن سفارشی دکمه",

View File

@@ -1807,6 +1807,7 @@
"emojiId": "Custom Emoji ID",
"emojiPlaceholder": "ID кастомного эмодзи (необязательно)",
"resetAll": "Сбросить все стили",
"resetConfirm": "Сбросить все стили кнопок к значениям по умолчанию?",
"hidden": "Скрыта",
"customLabels": "Названия кнопки",
"labelPlaceholder": "Свой текст кнопки",

View File

@@ -1039,6 +1039,7 @@
"emojiId": "自定义表情 ID",
"emojiPlaceholder": "自定义表情 ID可选",
"resetAll": "重置所有样式",
"resetConfirm": "将所有按钮样式重置为默认值?",
"hidden": "已隐藏",
"customLabels": "按钮名称",
"labelPlaceholder": "自定义按钮文本",