Remove old code
parent
bc38c50e0c
commit
8e749d6a36
@ -1,51 +0,0 @@
|
||||
define([
|
||||
'/common/curve.js',
|
||||
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
||||
], function (Curve, Listmap) {
|
||||
var Edit = {};
|
||||
|
||||
Edit.create = function (config, cb) { //network, channel, theirs, mine, cb) {
|
||||
var network = config.network;
|
||||
var channel = config.channel;
|
||||
var keys = config.keys;
|
||||
|
||||
try {
|
||||
var encryptor = Curve.createEncryptor(keys);
|
||||
var lm = Listmap.create({
|
||||
network: network,
|
||||
data: {},
|
||||
channel: channel,
|
||||
readOnly: false,
|
||||
validateKey: keys.validateKey || undefined,
|
||||
crypto: encryptor,
|
||||
userName: 'lol',
|
||||
logLevel: 1,
|
||||
});
|
||||
|
||||
var done = function () {
|
||||
// TODO make this abort and disconnect the session after the
|
||||
// user has finished making changes to the object, and they
|
||||
// have propagated.
|
||||
};
|
||||
|
||||
lm.proxy
|
||||
.on('create', function () {
|
||||
console.log('created');
|
||||
})
|
||||
.on('ready', function () {
|
||||
console.log('ready');
|
||||
cb(lm, done);
|
||||
})
|
||||
.on('disconnect', function () {
|
||||
console.log('disconnected');
|
||||
})
|
||||
.on('change', [], function (o, n, p) {
|
||||
console.log(o, n, p);
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
};
|
||||
|
||||
return Edit;
|
||||
});
|
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<head>
|
||||
<title data-localization="main_title">CryptPad: Zero Knowledge, Collaborative Real Time Editing</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
|
||||
<link rel="stylesheet" href="/bower_components/codemirror/lib/codemirror.css">
|
||||
<link rel="stylesheet" href="/bower_components/codemirror/addon/dialog/dialog.css">
|
||||
<link rel="stylesheet" href="/bower_components/codemirror/addon/fold/foldgutter.css" />
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
|
||||
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
|
||||
</noscript>
|
||||
</html>
|
@ -1,88 +0,0 @@
|
||||
define([
|
||||
'jquery',
|
||||
'/common/cryptpad-common.js',
|
||||
'/common/common-interface.js',
|
||||
//'/common/common-hash.js',
|
||||
//'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
||||
//'/common/curve.js',
|
||||
'less!/invite/main.less',
|
||||
], function ($, Cryptpad, UI/*, Hash , Listmap, Curve*/) {
|
||||
var Messages = Cryptpad.Messages;
|
||||
var comingSoon = function () {
|
||||
return $('<div>', {
|
||||
'class': 'coming-soon',
|
||||
})
|
||||
.text(Messages.comingSoon)
|
||||
.append('<br>');
|
||||
};
|
||||
|
||||
$(function () {
|
||||
UI.removeLoadingScreen();
|
||||
console.log("wut");
|
||||
$('body #mainBlock').append(comingSoon());
|
||||
});
|
||||
return;
|
||||
|
||||
/* jshint ignore:start */
|
||||
var APP = window.APP = {};
|
||||
|
||||
//var Messages = Cryptpad.Messages;
|
||||
var onInit = function () {};
|
||||
|
||||
var onDisconnect = function () {};
|
||||
var onChange = function () {};
|
||||
|
||||
var andThen = function () {
|
||||
var hash = window.location.hash.slice(1);
|
||||
|
||||
var info = Hash.parseTypeHash('invite', hash);
|
||||
console.log(info);
|
||||
|
||||
if (!info.pubkey) {
|
||||
UI.removeLoadingScreen();
|
||||
UI.alert('invalid invite');
|
||||
return;
|
||||
}
|
||||
|
||||
var proxy = Cryptpad.getProxy();
|
||||
var mySecret = proxy.curvePrivate;
|
||||
|
||||
var keys = Curve.deriveKeys(info.pubkey, mySecret);
|
||||
var encryptor = Curve.createEncryptor(keys);
|
||||
|
||||
UI.removeLoadingScreen();
|
||||
|
||||
var listmapConfig = {
|
||||
data: {},
|
||||
network: Cryptpad.getNetwork(),
|
||||
channel: info.channel,
|
||||
readOnly: false,
|
||||
validateKey: keys.validateKey,
|
||||
crypto: encryptor,
|
||||
userName: 'profile',
|
||||
logLevel: 1,
|
||||
};
|
||||
var lm = APP.lm = Listmap.create(listmapConfig);
|
||||
lm.proxy.on('create', onInit)
|
||||
.on('ready', function () {
|
||||
APP.initialized = true;
|
||||
console.log(JSON.stringify(lm.proxy));
|
||||
})
|
||||
.on('disconnect', onDisconnect)
|
||||
.on('change', [], onChange);
|
||||
};
|
||||
|
||||
$(function () {
|
||||
var $main = $('#mainBlock');
|
||||
|
||||
// main block is hidden in case javascript is disabled
|
||||
$main.removeClass('hidden');
|
||||
|
||||
APP.$container = $('#container');
|
||||
|
||||
Cryptpad.ready(function () {
|
||||
andThen();
|
||||
});
|
||||
});
|
||||
/* jshint ignore:end */
|
||||
});
|
@ -1,150 +0,0 @@
|
||||
/*
|
||||
.cp {
|
||||
#mainBlock {
|
||||
z-index: 1;
|
||||
width: 1000px;
|
||||
max-width: 90%;
|
||||
margin: auto;
|
||||
#container {
|
||||
font-size: 25px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
#header {
|
||||
display: flex;
|
||||
#rightside {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
}
|
||||
}
|
||||
#avatar {
|
||||
width: 300px;
|
||||
//height: 350px;
|
||||
margin: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
&> span {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
border: 1px solid black;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.delete {
|
||||
right: 0;
|
||||
position: absolute;
|
||||
opacity: 0.7;
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
media-tag {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
img {
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
max-width: none;
|
||||
max-height: none;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
button {
|
||||
height: 40px;
|
||||
margin: 5px;
|
||||
}
|
||||
}
|
||||
#displayName, #link {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
margin: 10px 0;
|
||||
input {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
box-sizing: border-box;
|
||||
padding-right: 30px;
|
||||
}
|
||||
input:focus ~ .edit {
|
||||
display: none;
|
||||
}
|
||||
.edit {
|
||||
position: absolute;
|
||||
margin-left: -25px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.temp {
|
||||
font-weight: 400;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.displayName {
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
}
|
||||
.displayName, .link {
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
#description {
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
border: 1px solid #DDD;
|
||||
margin-bottom: 20px;
|
||||
.rendered {
|
||||
padding: 0 15px;
|
||||
}
|
||||
.ok, .spin {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
display: none;
|
||||
z-index: 1000;
|
||||
}
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
.CodeMirror {
|
||||
border: 1px solid #DDD;
|
||||
font-family: monospace;
|
||||
font-size: 16px;
|
||||
line-height: initial;
|
||||
pre {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
#createProfile {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
.coming-soon {
|
||||
text-align: center;
|
||||
font-size: 25px;
|
||||
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
Loading…
Reference in New Issue