More improvements

pull/1/head
yflory 4 years ago
parent 6bdebad352
commit 854ab77f14

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

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

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

Loading…
Cancel
Save