mirror of
https://github.com/nextcloud/server.git
synced 2026-04-25 08:08:33 -04:00
Prevent leaving the DB update page while in progress
This commit is contained in:
parent
64dc222ce5
commit
06ddd40886
1 changed files with 7 additions and 0 deletions
|
|
@ -27,6 +27,11 @@
|
|||
this.$el = $el;
|
||||
|
||||
this._started = true;
|
||||
|
||||
$(window).on('beforeunload.inprogress', function () {
|
||||
return t('core', 'The upgrade is in progress, leaving this page might interrupt the process in some environments.');
|
||||
});
|
||||
|
||||
this.addMessage(t(
|
||||
'core',
|
||||
'Updating {productName} to version {version}, this may take a while.', {
|
||||
|
|
@ -61,6 +66,8 @@
|
|||
.appendTo($el);
|
||||
});
|
||||
updateEventSource.listen('done', function() {
|
||||
$(window).off('beforeunload.inprogress');
|
||||
|
||||
if (hasWarnings) {
|
||||
$('<span>').addClass('bold')
|
||||
.append('<br />')
|
||||
|
|
|
|||
Loading…
Reference in a new issue