Use the product name in the updater screen
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
6b4cfc5805
commit
7f3a5de20c
|
@ -11,6 +11,7 @@
|
||||||
(function() {
|
(function() {
|
||||||
OC.Update = {
|
OC.Update = {
|
||||||
_started : false,
|
_started : false,
|
||||||
|
options: {},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the update process.
|
* Start the update process.
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.options = options;
|
||||||
var hasWarnings = false;
|
var hasWarnings = false;
|
||||||
|
|
||||||
this.$el = $el;
|
this.$el = $el;
|
||||||
|
@ -72,7 +74,7 @@
|
||||||
var updateUnsuccessful = $('<p>');
|
var updateUnsuccessful = $('<p>');
|
||||||
if(message === 'Exception: Updates between multiple major versions and downgrades are unsupported.') {
|
if(message === 'Exception: Updates between multiple major versions and downgrades are unsupported.') {
|
||||||
updateUnsuccessful.append(t('core', 'The update was unsuccessful. For more information <a href="{url}">check our forum post</a> covering this issue.', {'url': 'https://help.nextcloud.com/t/updates-between-multiple-major-versions-are-unsupported/7094'}));
|
updateUnsuccessful.append(t('core', 'The update was unsuccessful. For more information <a href="{url}">check our forum post</a> covering this issue.', {'url': 'https://help.nextcloud.com/t/updates-between-multiple-major-versions-are-unsupported/7094'}));
|
||||||
} else {
|
} else if (OC.Update.options.productName === 'Nextcloud') {
|
||||||
updateUnsuccessful.append(t('core', 'The update was unsuccessful. ' +
|
updateUnsuccessful.append(t('core', 'The update was unsuccessful. ' +
|
||||||
'Please report this issue to the ' +
|
'Please report this issue to the ' +
|
||||||
'<a href="https://github.com/nextcloud/server/issues" target="_blank">Nextcloud community</a>.'));
|
'<a href="https://github.com/nextcloud/server/issues" target="_blank">Nextcloud community</a>.'));
|
||||||
|
@ -90,14 +92,11 @@
|
||||||
|
|
||||||
if (hasWarnings) {
|
if (hasWarnings) {
|
||||||
$el.find('.update-show-detailed').before(
|
$el.find('.update-show-detailed').before(
|
||||||
$('<input type="button" class="update-continue" value="'+t('core', 'Continue to Nextcloud')+'">').on('click', function() {
|
$('<input type="button" class="update-continue" value="'+t('core', 'Continue to {productName}', OC.Update.options)+'">').on('click', function() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// FIXME: use product name
|
|
||||||
|
|
||||||
|
|
||||||
$el.find('.update-show-detailed').before(
|
$el.find('.update-show-detailed').before(
|
||||||
$('<p id="redirect-countdown"></p>')
|
$('<p id="redirect-countdown"></p>')
|
||||||
);
|
);
|
||||||
|
@ -115,7 +114,9 @@
|
||||||
|
|
||||||
updateCountdown: function (i, total) {
|
updateCountdown: function (i, total) {
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$("#redirect-countdown").text(n('core', 'The update was successful. Redirecting you to Nextcloud in %n second.', 'The update was successful. Redirecting you to Nextcloud in %n seconds.', i));
|
$("#redirect-countdown").text(
|
||||||
|
n('core', 'The update was successful. Redirecting you to {productName} in %n second.', 'The update was successful. Redirecting you to {productName} in %n seconds.', i, OC.Update.options)
|
||||||
|
);
|
||||||
}, (total - i) * 1000);
|
}, (total - i) * 1000);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue