Add basic support for notifications to web app (closes #29) #33

Open
luca0N wants to merge 2 commits from dev_client_notifications into dev
Owner

Add basic support for notifications to the web client. When a host is
detected while the web page is not focused, the number of unread
notifications increments. The number of unread notifications is
displayed in the host list page title (if any) when the page is not in
focus. The number of unread notifications is reset when the user
focuses on the page once again, removing the counter from the page
title.

  • Display unread in-app notifications in the host list page title
  • Play sound effect
  • Add option to disable in-app notifications
Add basic support for notifications to the web client. When a host is detected while the web page is not focused, the number of unread notifications increments. The number of unread notifications is displayed in the host list page title (if any) when the page is not in focus. The number of unread notifications is reset when the user focuses on the page once again, removing the counter from the page title. - [x] Display unread in-app notifications in the host list page title - [ ] Play sound effect - [ ] Add option to disable in-app notifications
luca0N self-assigned this 2025-12-23 23:42:33 +00:00
Add basic support for notifications to the web client.  When a host is
detected while the web page is not focused, the number of unread
notifications increments.  The number of unread notifications is
displayed in the host list page title (if any) when the page is not in
focus.  The number of unread notifications is reset when the user
focuses on the page once again, removing the counter from the page
title.
luca0N added this to the v1.0.0 project 2025-12-23 23:42:34 +00:00
Author
Owner

At this time, there are no options to configure or disable the in-app notifications (as mentioned in the linked issue). If sounds are implemented in the future, the end-user may disable them in their user-agent by disabling the permission to play sounds and music, but the page title still changes, which may be undesirable by some users.

At this time, there are no options to configure or disable the in-app notifications (as mentioned in the linked issue). If sounds are implemented in the future, the end-user may disable them in their user-agent by disabling the permission to play sounds and music, but the page title still changes, which may be undesirable by some users.
Add support for playing a sound effect on in-app notifications using
HTMLAudioElement, and create a function for notifying.  This requires
permission from the user-agent.  The sound effect used is taken from the
obsolete `luca0N/Forca` repository.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dev_client_notifications:dev_client_notifications
git switch dev_client_notifications

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch dev
git merge --no-ff dev_client_notifications
git switch dev_client_notifications
git rebase dev
git switch dev
git merge --ff-only dev_client_notifications
git switch dev_client_notifications
git rebase dev
git switch dev
git merge --no-ff dev_client_notifications
git switch dev
git merge --squash dev_client_notifications
git switch dev
git merge --ff-only dev_client_notifications
git switch dev
git merge dev_client_notifications
git push origin dev
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
luca0N/lanbassador!33
No description provided.