Expose env-dependent constant to service worker; Add Brave Browser-specific push registration error and guidance; Remove unused fetch debug plugin (#1947)
This commit is contained in:
parent
75d0a8e3d9
commit
b03e02e4cf
@ -733,7 +733,10 @@ export function NotificationAlert () {
|
|||||||
error
|
error
|
||||||
? (
|
? (
|
||||||
<Alert variant='danger' dismissible onClose={() => setError(null)}>
|
<Alert variant='danger' dismissible onClose={() => setError(null)}>
|
||||||
<span>{error.toString()}</span>
|
<span>{navigator?.brave && error.name === 'AbortError'
|
||||||
|
? 'Push registration failed. Enable "Use Google services for push messaging" in Brave\'s privacy settings and try again.'
|
||||||
|
: error.toString()}
|
||||||
|
</span>
|
||||||
</Alert>
|
</Alert>
|
||||||
)
|
)
|
||||||
: showAlert
|
: showAlert
|
||||||
|
@ -220,6 +220,7 @@ module.exports = withPlausibleProxy()({
|
|||||||
'process.env.NEXT_PUBLIC_NORMAL_POLL_INTERVAL': JSON.stringify(process.env.NEXT_PUBLIC_NORMAL_POLL_INTERVAL),
|
'process.env.NEXT_PUBLIC_NORMAL_POLL_INTERVAL': JSON.stringify(process.env.NEXT_PUBLIC_NORMAL_POLL_INTERVAL),
|
||||||
'process.env.NEXT_PUBLIC_LONG_POLL_INTERVAL': JSON.stringify(process.env.NEXT_PUBLIC_LONG_POLL_INTERVAL),
|
'process.env.NEXT_PUBLIC_LONG_POLL_INTERVAL': JSON.stringify(process.env.NEXT_PUBLIC_LONG_POLL_INTERVAL),
|
||||||
'process.env.NEXT_PUBLIC_EXTRA_LONG_POLL_INTERVAL': JSON.stringify(process.env.NEXT_PUBLIC_EXTRA_LONG_POLL_INTERVAL),
|
'process.env.NEXT_PUBLIC_EXTRA_LONG_POLL_INTERVAL': JSON.stringify(process.env.NEXT_PUBLIC_EXTRA_LONG_POLL_INTERVAL),
|
||||||
|
'process.env.SANCTIONED_COUNTRY_CODES': JSON.stringify(process.env.SANCTIONED_COUNTRY_CODES),
|
||||||
'process.env.NEXT_IS_EXPORT_WORKER': 'true'
|
'process.env.NEXT_IS_EXPORT_WORKER': 'true'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
@ -31,10 +31,6 @@ self.addEventListener('install', () => self.skipWaiting())
|
|||||||
// Also, the offline fallback only works if request matched a route
|
// Also, the offline fallback only works if request matched a route
|
||||||
setDefaultHandler(new NetworkOnly({
|
setDefaultHandler(new NetworkOnly({
|
||||||
plugins: [{
|
plugins: [{
|
||||||
fetchDidFail: async (args) => {
|
|
||||||
// tell us why a request failed in dev
|
|
||||||
process.env.NODE_ENV !== 'production' && console.log('fetch did fail', ...args)
|
|
||||||
},
|
|
||||||
fetchDidSucceed: async ({ request, response, event, state }) => {
|
fetchDidSucceed: async ({ request, response, event, state }) => {
|
||||||
if (
|
if (
|
||||||
response.ok &&
|
response.ok &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user