feat: add useNotify hook for unified notifications

- Created useNotify hook (src/platform/hooks/useNotify.ts):
  - In Telegram Mini App: uses native showPopup
  - In browser: uses beautiful Toast component
  - Methods: notify(), success(), error(), warning(), info()

- AdminTariffs: improved deletion UX
  - Uses useNotify.warning when tariff has subscriptions
  - Uses useDestructiveConfirm for delete confirmation
  - Shows success toast after deletion
  - Removed custom modal dialog

- AdminEmailTemplates: unified notification style
  - Replaced dialog.alert with useNotify.warning
  - Now shows beautiful Toast on mobile browser

- Added deleteSuccess i18n translations (ru, en, zh, fa)
This commit is contained in:
c0mrade
2026-02-02 02:17:19 +03:00
parent 5b30f24e7e
commit 6f4d1ef085
8 changed files with 125 additions and 49 deletions

View File

@@ -992,6 +992,7 @@
"cannotDeleteHasSubscriptions": "حذف ممکن نیست: اشتراک‌های فعال وجود دارد",
"confirmDelete": "تعرفه حذف شود؟",
"confirmDeleteText": "این عمل قابل بازگشت نیست. تعرفه برای همیشه حذف می‌شود.",
"deleteSuccess": "تعرفه با موفقیت حذف شد",
"days": "روز",
"days_other": "{{count}} روز",
"tabs": {