TodoApp - Init

This commit is contained in:
Nicolas Lemoine 2017-07-23 16:28:49 +03:00
parent 658b00814b
commit e3b9c03fc0
1 changed files with 25 additions and 6 deletions

View File

@ -1,7 +1,7 @@
define([
'jquery',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js',
'/bower_components/chainpad-listmap/chainpad-listmap.js',
'/common/toolbar2.js',
'/common/cryptpad-common.js',
'/common/visible.js',
@ -12,11 +12,8 @@ define([
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/customize/src/less/cryptpad.less',
], function ($, Crypto, realtimeInput, Toolbar, Cryptpad /*, Visible, Notify*/) {
], function ($, Crypto, Listmap, Toolbar, Cryptpad /*, Visible, Notify*/) {
var Messages = Cryptpad.Messages;
Messages = Messages; // jshint
//var saveAs = window.saveAs;
//var Nacl = window.nacl;
var APP = window.APP = {};
$(function () {
@ -52,12 +49,34 @@ define([
};
APP.toolbar = Toolbar.create(configTb);
//toolbar.$rightside.html(''); // Remove the drawer if we don't use it to hide the toolbar
APP.toolbar.$rightside.html(''); // Remove the drawer if we don't use it to hide the toolbar
// we're in upload mode
Cryptpad.removeLoadingScreen();
};
var createTodo = function() {
var obj = Cryptpad.getProxy();
var hash = Cryptpad.createRandomHash();
if(obj.todo) {
hash = obj.todo;
}
Cryptpad.getSecrets('todo', hash);
var listmapConfig = {
data: {},
websocketURL: Cryptpad.getWebsocketURL(),
channel: secret.channel,
validateKey: secret.keys.validateKey || undefined,
crypto: Crypto.createEncryptor(secret.keys),
userName: 'todo',
logLevel: 1,
};
var lm = Listmap.create(listmapConfig);
}
Cryptpad.ready(function () {
andThen();
//Cryptpad.reportAppUsage();