Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GéoContrib
Géocontrib Frontend
Merge requests
!382
REDMINE_ISSUE-13600
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
REDMINE_ISSUE-13600
redmine-issues/13600
into
develop
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Timothee P
requested to merge
redmine-issues/13600
into
develop
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
check if automated test before displaying update alert
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
d3ac86c2
1 commit,
3 years ago
1 file
+
12
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/registerServiceWorker.js
+
12
−
8
Options
@@ -26,15 +26,19 @@ if (process.env.NODE_ENV === 'production') {
console
.
log
(
'
New content is downloading.
'
);
},
updated
(
registration
)
{
alert
(
'
Une nouvelle version de l
\'
application est disponible, l
\'
application va se recharger
'
);
console
.
log
(
'
New content is available; please refresh.
'
);
//
if
(
!
registration
||
!
registration
.
waiting
)
{
return
;
if
(
!
navigator
.
webdriver
)
{
alert
(
'
Une nouvelle version de l
\'
application est disponible, l
\'
application va se recharger
'
);
console
.
log
(
'
New content is available; please refresh.
'
);
//
if
(
!
registration
||
!
registration
.
waiting
)
{
return
;
}
// Send message to SW to skip the waiting and activate the new SW
registration
.
waiting
.
postMessage
({
type
:
'
SKIP_WAITING
'
});
//window.location.reload(true);
}
else
{
console
.
log
(
'
Execution dans un navigateur controlé par un agent automatisé, la mise à jour n
\'
est pas appliqué pendant le test.
'
);
}
// Send message to SW to skip the waiting and activate the new SW
registration
.
waiting
.
postMessage
({
type
:
'
SKIP_WAITING
'
});
//window.location.reload(true);
},
offline
()
{
console
.
log
(
'
No internet connection found. App is running in offline mode.
'
);
Loading