Use less2 for the loading screen

This commit is contained in:
yflory
2017-09-13 16:19:26 +02:00
parent 8c41e0bdd6
commit ab64bf9e59
15 changed files with 47 additions and 617 deletions

View File

@@ -77,7 +77,6 @@ define([
funcs.openTemplatePicker = callWithCommon(UI.openTemplatePicker);
funcs.displayAvatar = callWithCommon(UI.displayAvatar);
funcs.createButton = callWithCommon(UI.createButton);
funcs.getFileSize = callWithCommon(UI.getFileSize);
// History
funcs.getHistory = callWithCommon(History.create);
@@ -106,6 +105,19 @@ define([
}
return;
};
funcs.getFileSize = function (href, cb) {
var channelId = Cryptpad.hrefToHexChannelId(href);
funcs.sendAnonRpcMsg("GET_FILE_SIZE", channelId, function (data) {
if (!data) { return void cb("No response"); }
if (data.error) { return void cb(data.error); }
if (data.response && data.response.length && typeof(data.response[0]) === 'number') {
return void cb(void 0, data.response[0]);
} else {
cb('INVALID_RESPONSE');
}
});
};
// CodeMirror
funcs.initCodeMirrorApp = callWithCommon(CodeMirror.create);