font-size: 20px; | font-size: 20px; | ||||
font-weight: 300; | font-weight: 300; | ||||
margin-bottom: 12px; | margin-bottom: 12px; | ||||
line-height: 140%; | |||||
} | } | ||||
h3 { | h3 { | ||||
font-size: 15px; | font-size: 15px; |
} | } | ||||
#body-login .update h2 { | #body-login .update h2 { | ||||
margin: 12px 0 20px; | |||||
margin: 0 0 20px; | |||||
} | } | ||||
#body-login .update a { | #body-login .update a { |
#update-progress-message-error, | #update-progress-message-error, | ||||
#update-progress-message-warnings { | #update-progress-message-warnings { | ||||
font-weight: 600; | font-weight: 600; | ||||
margin-bottom: 10px; | |||||
} | } | ||||
#update-progress-message { | #update-progress-message { | ||||
.update-show-detailed { | .update-show-detailed { | ||||
padding: 13px; | padding: 13px; | ||||
display: block; | display: block; | ||||
opacity: .75; | |||||
} | } | ||||
#body-login .update a.update-show-detailed { | #body-login .update a.update-show-detailed { |
_started : false, | _started : false, | ||||
/** | /** | ||||
* Start the upgrade process. | |||||
* Start the update process. | |||||
* | * | ||||
* @param $el progress list element | * @param $el progress list element | ||||
*/ | */ | ||||
var self = this; | var self = this; | ||||
$(window).on('beforeunload.inprogress', function () { | $(window).on('beforeunload.inprogress', function () { | ||||
return t('core', 'The upgrade is in progress, leaving this page might interrupt the process in some environments.'); | |||||
return t('core', 'The update is in progress, leaving this page might interrupt the process in some environments.'); | |||||
}); | }); | ||||
$('#update-progress-title').html(t( | $('#update-progress-title').html(t( | ||||
'core', | 'core', | ||||
'Updating to {version}', { | |||||
'Update to {version}', { | |||||
version: options.version | version: options.version | ||||
}) | }) | ||||
); | ); | ||||
if (hasWarnings) { | if (hasWarnings) { | ||||
$el.find('.update-show-detailed').before( | $el.find('.update-show-detailed').before( | ||||
$('<span>') | |||||
.append('<br />') | |||||
.append(t('core', 'The update was successful. There were warnings.')) | |||||
$('<input type="button" class="update-continue" value="'+t('core', 'Continue to Nextcloud')+'">').on('click', function() { | |||||
window.location.reload(); | |||||
}) | |||||
); | ); | ||||
var message = t('core', 'Please reload the page.'); | |||||
$('<span>').append(message).append('<br />').appendTo($el); | |||||
} else { | } else { | ||||
// FIXME: use product name | // FIXME: use product name | ||||
$('<span>') | |||||
.append(t('core', 'The update was successful. Redirecting you to Nextcloud now.')) | |||||
.appendTo($el); | |||||
$el.find('.update-show-detailed').before( | |||||
$('<p>'+t('core', 'The update was successful. Redirecting you to Nextcloud now.')+'</p>') | |||||
); | |||||
setTimeout(function () { | setTimeout(function () { | ||||
OC.redirect(OC.webroot + '/'); | OC.redirect(OC.webroot + '/'); | ||||
}, 3000); | }, 3000); | ||||
.append(message) | .append(message) | ||||
.append($('<br>')); | .append($('<br>')); | ||||
}, | }, | ||||
setErrorMessage: function (message) { | setErrorMessage: function (message) { | ||||
$('#update-progress-message-error') | $('#update-progress-message-error') | ||||
.show() | .show() |
</div> | </div> | ||||
<input class="updateButton" type="button" value="<?php p($l->t('Start update')) ?>"> | <input class="updateButton" type="button" value="<?php p($l->t('Start update')) ?>"> | ||||
<div class="infogroup"> | <div class="infogroup"> | ||||
<em> | |||||
<?php p($l->t('To avoid timeouts with larger installations, you can instead run the following command from your installation directory:')) ?> | <?php p($l->t('To avoid timeouts with larger installations, you can instead run the following command from your installation directory:')) ?> | ||||
<pre>./occ upgrade</pre> | <pre>./occ upgrade</pre> | ||||
</em> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<ul id="update-progress-message-warnings" class="hidden"></ul> | <ul id="update-progress-message-warnings" class="hidden"></ul> | ||||
<p id="update-progress-message"></p> | <p id="update-progress-message"></p> | ||||
<a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a> | <a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a> | ||||
<div id="update-progress-detailed" class="hidden warning"></div> | |||||
<div id="update-progress-detailed" class="hidden"></div> | |||||
</div> | </div> | ||||
</div> | </div> |
// render error page | // render error page | ||||
$template = new OC_Template('', 'update.use-cli', 'guest'); | $template = new OC_Template('', 'update.use-cli', 'guest'); | ||||
$template->assign('productName', 'owncloud'); // for now | |||||
$template->assign('productName', 'nextcloud'); // for now | |||||
$template->assign('version', OC_Util::getVersionString()); | $template->assign('version', OC_Util::getVersionString()); | ||||
$template->assign('tooBig', $tooBig); | $template->assign('tooBig', $tooBig); | ||||
$ocVersion = \OCP\Util::getVersion(); | $ocVersion = \OCP\Util::getVersion(); | ||||
$tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); | $tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); | ||||
$tmpl->assign('incompatibleAppsList', $appManager->getIncompatibleApps($ocVersion)); | $tmpl->assign('incompatibleAppsList', $appManager->getIncompatibleApps($ocVersion)); | ||||
$tmpl->assign('productName', 'ownCloud'); // for now | |||||
$tmpl->assign('productName', 'Nextcloud'); // for now | |||||
$tmpl->assign('oldTheme', $oldTheme); | $tmpl->assign('oldTheme', $oldTheme); | ||||
$tmpl->printPage(); | $tmpl->printPage(); | ||||
} | } |