[DigitalPoint] PWA 1.2.5.1

XF 2.0 / 2.1 / 2.2 / 2.3 [DigitalPoint] PWA 1.2.5.1

Add-on xenforo 2

Ressources et modules complémentaires pour XenForo 2

Styles xenforo 2

Styles / Thèmes et apparence pour xenforo 2

Templates xenforo 2

Codes pour modifier les templates sur xenforo 2

Section Premium

Add-on et Styles pour membre Premium
[DigitalPoint] PWA 1.2.5.1

XF 2.0 / 2.1 / 2.2 / 2.3 [DigitalPoint] PWA 1.2.5.1

Catégorie Catégorie Add-Ons
Titre du sujet Titre du sujet [DigitalPoint] PWA 1.2.5.1
Auteur de la discussion Auteur de la discussion laurent68
Date de début Date de début
Réponses Réponses 17
Affichages Affichages 1 003
Réaction Réaction 0
Dernier message par Dernier message par Dar_Boga

laurent68

Fondateur

Staff
fondateur
Réputation: 100%
Discussions
4 844
Messages
12 567
Solutions
85
J'aime
7 864
Points
198
This addon adds a few things that I felt were missing from XenForo's PWA app:
  • If the user that is installing the PWA app is logged in, auto-log them into the PWA app (don't need to force users to log-in from scratch when they first load the installed app).
  • Use Sec-Fetch-Site header as replacement for CSRF with a fallback to CSRF if browser doesn't support Sec-Fetch-Site (prevent stale sessions from causing security error message)
  • Automatic refresh of badge counters when app is loaded/brought to front (this also applies to the site when being used in a normal browser)
  • Give more prominent push notification permission message when initially loading app (see screenshot for example)
  • Allow editing of of web app manifest JSON
IMG_5735.jpeg


Some things to note:
  • While this works in the testing I've done, I'm going to call it a beta for now. If there are any issues in setups different than my own, I'll address them as needed, but just to be safe, let's call it a beta for now.
  • In exchange for being free, this addon has a single attribution link buried on the bottom of XenForo's Help -> Privacy policy page (there are no site-wide or footer links).
Télécharger V1.0.0 :

Version 1.1.0 Allow editing of webmanifest :

This adds an option to specify JSON you want to merge into the web application manifest. This allows you to edit existing properties as well as add new properties (what you specify to merge into the manifest file takes precedent over what XenForo generates by default). Note: the option is an "advanced" option, so you need to show advanced options to see it.

As an example, say you had an older version of XenForo (<2.2.13) where the display property wasn't set to standalone, you could set display to standalone and you could also add a screenshots property :

1690300720932.png


Télécharger V1.1.0 :

Version 1.2.0 New thingies...
  • Added ability to send push notices to users (Admin -> Communications -> Push users)
  • New PWA option: Enable debugging (you are welcome to enable this, but it was intended for me. It spews stuff to your server error log... but feel free)
    • Logs changes to user push subscriptions
    • Logs web push server errors
  • Delete push_subscription_updated session cookie when a new session is created (causes push subscription endpoint to be updated if old one was expired)
  • Add attribute to manifest tag to instruct browsers to include credentials (cookies) when making request for manifest file (allows auto-login to PWA)
  • Don't unsubscribe user from push notifications if they log into admin area (normally XenForo will stop sending push notices if a user logs into the admin area until they return to a public page)
d5wzvh.png


Télécharger V1.2.0 :

Version 1.2.1 Compatibility fixes :

- PHP 8.1+ compatibility fix
- Requires XenForo 2.2.13+
- Require a CSRF token for a user to use logout link

Télécharger V1.2.1 :

Version 1.2.2 Removed dependency on jQuery :

All JavaScript has been rewritten to be "native" (does not use jQuery) in preparation for removal of jQuery in XenForo 2.3.
If you aren't using XenForo 2.3, you don't need to upgrade (might be some unmeasurable speed increase [think nanoseconds] when running its JavaScript since it doesn't dip into jQuery any longer).

Télécharger V1.2.2 :

Version 1.2.3: Handles Safari/iOS PWA's security requirements that push subscribe requires a user gesture

By default XenForo relies on a browser being willing to subscribe to push notifications if the user previously granted permission. Safari (and iOS PWA) does not work that way, even a re-subscribe needs to be initiated by a user gesture (see this post). This causes iOS PWA (and desktop Safari browsers) to "lose" their push subscription since XenForo is relying on browsers to re-subscribe. This updates changes some XenForo behavior to fix that:

Push subscriptions are not unsubscribed when a user is re-authenticating two-step.
Ideally, this shouldn't be the case, but if (for whatever reason) XenForo triggers a push unsubscribe, if the browser is Safari (or PWA), we also clear the push_history_user_ids localStorage, which will allow the push notice to show again for the user so they can choose to re-subscribe (with a user gesture, so it works). It's not realistic to expect users to know to resubscribe with a button buried in their settings.

TL;DR: This should solve the issue XenForo has where iOS PWA users lose their push subscriptions (or at the very least least make it happen less often).

Télécharger V1.2.3 :

Version 1.2.4 : XenForo 2.3 compatibility
  • Changed JavaScript to work regardless if XenForo core JavaScript is lazy loaded or not (2.3 compatibility)
Télécharger V1.2.4 :

Version 1.2.5 : Fixed issue where bringing the app to front wouldn't update counters in XenForo 2.3

Télécharger V1.2.5 :

Version 1.2.5.1 Update for XF 2.3 : Fix for XF 2.3 (prevent push notifications being lost on iOS during two-step reauthorization).

Télécharger V1.2.5.1 :
 
Dernière édition par un modérateur:
Ajout de la version 1.1.0 :)
 
Ajout de la version 1.2.0 :)
 
Ajout de la version 1.2.1 :)
 
Ajout de la version 1.2.2 :)
 
Ajout de la version 1.2.4
 
Ajout de la version 1.2.5 :)
 
Ajout de la version 1.2.5.1 :)
 
Contenu similaire Les plus vues Voir plus
Retour
Haut Bas