feat(notifications): proactively ask the browser for popup permission
CI/CD / CI · API (dotnet build + test) (push) Successful in 1m1s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 30s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m11s
CI/CD / CI · Admin Web (tsc) (push) Successful in 39s
CI/CD / CI · Website (tsc) (push) Successful in 46s
CI/CD / CI · Koja (tsc) (push) Successful in 50s
CI/CD / Deploy · all services (push) Successful in 2m52s

Previously desktop popups had to be enabled from Settings. Now a dismissible
prompt card appears for signed-in users on a supporting browser that haven't
decided yet ("Turn on notifications?" + Enable/Later). Tapping Enable triggers
the browser permission request (user gesture, as browsers require), turns on
desktop popups, and immediately fires one (force) so the user sees it works.
Shown once per device (remembered in localStorage); mounted on both the
dashboard and POS/queue layouts. fa/en/ar added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-25 10:32:12 +03:30
parent 27b3ac60c7
commit b162335b48
6 changed files with 130 additions and 3 deletions
+4 -1
View File
@@ -1289,7 +1289,10 @@
"tabBadge": "عدد غير المقروء على تبويب المتصفح",
"tabBadgeHint": "يعرض عدد الإشعارات غير المقروءة في عنوان التبويب والأيقونة المفضلة.",
"toast": "تنبيه داخل التطبيق",
"toastHint": "إظهار شريط صغير داخل لوحة التحكم للإشعارات الجديدة."
"toastHint": "إظهار شريط صغير داخل لوحة التحكم للإشعارات الجديدة.",
"promptTitle": "تفعيل الإشعارات؟",
"promptBody": "احصل على نافذة منبثقة وصوت للطلبات الجديدة ونداءات النادل — حتى عندما يكون هذا التبويب في الخلفية.",
"later": "لاحقًا"
},
"customRoles": {
"title": "الأدوار المخصصة",
+4 -1
View File
@@ -1361,7 +1361,10 @@
"tabBadge": "Unread count on the browser tab",
"tabBadgeHint": "Shows the number of unread notifications in the tab title and favicon.",
"toast": "In-app toast",
"toastHint": "Show a small banner inside the dashboard for new notifications."
"toastHint": "Show a small banner inside the dashboard for new notifications.",
"promptTitle": "Turn on notifications?",
"promptBody": "Get a popup + sound for new orders and waiter calls — even when this tab is in the background.",
"later": "Later"
},
"customRoles": {
"title": "Custom Roles",
+4 -1
View File
@@ -1362,7 +1362,10 @@
"tabBadge": "شمارش خوانده‌نشده روی تب مرورگر",
"tabBadgeHint": "تعداد اعلان‌های خوانده‌نشده را در عنوان تب و فاویکون نشان می‌دهد.",
"toast": "نوتیف درون‌برنامه",
"toastHint": "نمایش یک بنر کوچک داخل داشبورد برای اعلان‌های جدید."
"toastHint": "نمایش یک بنر کوچک داخل داشبورد برای اعلان‌های جدید.",
"promptTitle": "اعلان‌ها روشن شود؟",
"promptBody": "برای سفارش‌های جدید و درخواست میز، پاپ‌آپ و صدا دریافت کنید — حتی وقتی این تب در پس‌زمینه است.",
"later": "بعداً"
},
"customRoles": {
"title": "نقش‌های سفارشی",