TodoApp - Init

pull/1/head
Nicolas Lemoine 8 years ago
parent 658b00814b
commit e3b9c03fc0

@ -1,7 +1,7 @@
define([ define([
'jquery', 'jquery',
'/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js', '/bower_components/chainpad-listmap/chainpad-listmap.js',
'/common/toolbar2.js', '/common/toolbar2.js',
'/common/cryptpad-common.js', '/common/cryptpad-common.js',
'/common/visible.js', '/common/visible.js',
@ -12,11 +12,8 @@ define([
'css!/bower_components/components-font-awesome/css/font-awesome.min.css', 'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/customize/src/less/cryptpad.less', 'less!/customize/src/less/cryptpad.less',
], function ($, Crypto, realtimeInput, Toolbar, Cryptpad /*, Visible, Notify*/) { ], function ($, Crypto, Listmap, Toolbar, Cryptpad /*, Visible, Notify*/) {
var Messages = Cryptpad.Messages; var Messages = Cryptpad.Messages;
Messages = Messages; // jshint
//var saveAs = window.saveAs;
//var Nacl = window.nacl;
var APP = window.APP = {}; var APP = window.APP = {};
$(function () { $(function () {
@ -52,12 +49,34 @@ define([
}; };
APP.toolbar = Toolbar.create(configTb); 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 // we're in upload mode
Cryptpad.removeLoadingScreen(); 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 () { Cryptpad.ready(function () {
andThen(); andThen();
//Cryptpad.reportAppUsage(); //Cryptpad.reportAppUsage();

Loading…
Cancel
Save