khmyznikov / pwa-install

Installation dialog for Progressive Web Application. Provides a more convenient user experience and fixes the lack of native dialogs in some browsers.
https://www.khmyznikov.com/pwa-install
MIT License
379 stars 61 forks source link

Allow disable button to close the modal #48

Closed jalamprea closed 8 months ago

jalamprea commented 8 months ago

One of the requirements from some clients is they want to allow access to their PWA only if the app is installed, if not, it should always ask for the installation. Currently, there is no way to hide/disable the button to close the modal, so if users tap on the close icon, they will be able to continue using the app without installing it. Having an option like disableClose with false as the default value, so it will be always available, but allowing users to change it to true will fix this simple use case.

jalamprea commented 8 months ago

@khmyznikov Check the PR and let me know if this behavior looks good for you

khmyznikov commented 8 months ago

LGTM! 🤝