Closed drma-tech closed 2 years ago
@drma-dev Thank you for asking me.
is there a way to put an extra button?
Currently, there are two options. One of them is "implement your own UI component from scratch". For more details, please follow the link below.
Another one is to try to use the latest preview release version of the "PWA Update" component, ver.2.1.0 preview 1.
This version allows you to add custom child contents to the "PWA Update" component by ordinal Blazor way. For example, if you want to add a hyperlink to the blazor.net site inside of the PWA update notification UI, you can implement it like below:
<PWAUpdater>
<!-- 👇 These contents will be rendered inside of the PWA update notification UI. -->
<span style="color: var(--pwa-updater-bar-color);">
<a href="https://blazor.net" target="_blank" style="color: var(--pwa-updater-bar-color);">
about Blazor
</a> |
</span>
</PWAUpdater>
And as one convenient feature to implement custom child contents above, the latest preview version of the "PWAUpdater" component has exposed its visibility status as a bindable property, State
. If you specify that the State
property of the "PWAUpdater" component to Showing
like the code below,
<PWAUpdater State="PWAUpdater.States.Showing">
...
</PWAUpdater>
the "PWAUpdater" will always be visible forcibly even if the service worker updates are unavailable. This should be useful to implement your own custom child content during the developing phase. Please remember to remove the setting the State
property for the release build.
ok, i see you did that now. I will test when possible.
First of all, I loved your component. I've been struggling with this for over a year. finally solved my problem.
but I was wondering, is there a way to put an extra button? to show the user what are the changes of the new version.