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
@@ -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",