More improvements

This commit is contained in:
yflory 2020-10-15 14:58:56 +02:00 committed by ansuz
parent c4aa9ff8dc
commit bafd3405ae
3 changed files with 11 additions and 3 deletions

View File

@ -297,7 +297,7 @@ button.primary:hover{
var built = false;
// XXX
var types = ['less', 'drive', 'migrate', 'sf', 'team', 'pad'];
var types = ['less', 'drive', 'migrate', 'sf', 'team', 'pad', 'end'];
Messages.loading_state_0 = "Less";
Messages.loading_state_1 = "Drive";
Messages.loading_state_2 = "Migrate";
@ -309,7 +309,7 @@ button.primary:hover{
var c = types.indexOf(data.type);
current = c;
var getLi = function (i) {
var check = (i < c || (i === c && data.progress === 100)) ? 'fa-check-square-o'
var check = (i < c || (i === c && data.progress >= 100)) ? 'fa-check-square-o'
: 'fa-square-o';
var p = Math.min(Math.floor(data.progress), 100);
var percent = i < c ? '(100%)' : (i === c ? '('+p+'%)' : '(0%)');
@ -318,6 +318,7 @@ button.primary:hover{
};
var list = '<ul>';
types.forEach(function (el, i) {
if (i >= 6) { return; }
list += getLi(i);
});
list += '</ul>';

View File

@ -167,7 +167,7 @@ define([
if (window.CryptPad_updateLoadingProgress) {
window.CryptPad_updateLoadingProgress({
type: 'less',
progress: idx++
progress: 4*idx++
});
}
cacheGet(url, function (css) {

View File

@ -149,6 +149,13 @@ define([
});
sframeChan.on('EV_RT_READY', function () {
if (isReady) { return; }
if (updateLoadingProgress) {
updateLoadingProgress({
type: 'end',
progress: 0
}, false);
isHistory++;
}
isReady = true;
isHistory = false;
chainpad.start();