replace contacts with contacts2
parent
57d0c6c973
commit
54eefd3d94
@ -1,30 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="cp pad">
|
||||
<head>
|
||||
<title>CryptPad</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.1.15"></script>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
#pad-iframe {
|
||||
position:fixed;
|
||||
top:0px;
|
||||
left:0px;
|
||||
bottom:0px;
|
||||
right:0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
border:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
overflow:hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="pad-iframe"></iframe><script src="/common/noscriptfix.js"></script>
|
||||
|
@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script async data-bootload="/contacts/inner.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.1.15"></script>
|
||||
<style>.loading-hidden, .loading-hidden * {display: none !important;}</style>
|
||||
</head>
|
||||
<body class="loading-hidden">
|
||||
<div id="toolbar" class="toolbar-container"></div>
|
||||
<div id="app">
|
||||
<div id="friendList"></div>
|
||||
<div id="messaging"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,75 +0,0 @@
|
||||
define([
|
||||
'jquery',
|
||||
'/bower_components/chainpad-crypto/crypto.js',
|
||||
'/common/toolbar2.js',
|
||||
'/common/cryptpad-common.js',
|
||||
|
||||
'/common/common-messenger.js',
|
||||
'/contacts2/messenger-ui.js',
|
||||
|
||||
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
||||
'less!/customize/src/less/cryptpad.less',
|
||||
], function ($, Crypto, Toolbar, Cryptpad, Messenger, UI) {
|
||||
var Messages = Cryptpad.Messages;
|
||||
|
||||
var APP = window.APP = {
|
||||
Cryptpad: Cryptpad
|
||||
};
|
||||
|
||||
$(function () {
|
||||
|
||||
var andThen = function () {
|
||||
Cryptpad.addLoadingScreen();
|
||||
|
||||
var ifrw = $('#pad-iframe')[0].contentWindow;
|
||||
var $iframe = $('#pad-iframe').contents();
|
||||
//var $appContainer = $iframe.find('#app');
|
||||
var $list = $iframe.find('#friendList');
|
||||
var $messages = $iframe.find('#messaging');
|
||||
var $bar = $iframe.find('.toolbar-container');
|
||||
|
||||
var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle'];
|
||||
|
||||
|
||||
var configTb = {
|
||||
displayed: displayed,
|
||||
ifrw: ifrw,
|
||||
common: Cryptpad,
|
||||
$container: $bar,
|
||||
network: Cryptpad.getNetwork(),
|
||||
pageTitle: Messages.contacts_title,
|
||||
};
|
||||
var toolbar = APP.toolbar = Toolbar.create(configTb);
|
||||
toolbar.$rightside.html(''); // Remove the drawer if we don't use it to hide the toolbar
|
||||
|
||||
Cryptpad.getProxy().on('disconnect', function () {
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||
Cryptpad.enableMessaging(false);
|
||||
});
|
||||
Cryptpad.getProxy().on('reconnect', function (uid) {
|
||||
console.error('reconnecting: ', uid);
|
||||
Cryptpad.findOKButton().click();
|
||||
|
||||
//APP.messenger.cleanFriendChannels();
|
||||
//APP.messenger.openFriendChannels();
|
||||
//APP.messenger.setEditable(true);
|
||||
});
|
||||
|
||||
var $infoBlock = $('<div>', {'class': 'info'}).appendTo($messages);
|
||||
$('<h2>').text(Messages.contacts_info1).appendTo($infoBlock);
|
||||
var $ul = $('<ul>').appendTo($infoBlock);
|
||||
$('<li>').text(Messages.contacts_info2).appendTo($ul);
|
||||
$('<li>').text(Messages.contacts_info3).appendTo($ul);
|
||||
//$('<li>').text(Messages.contacts_info4).appendTo($ul);
|
||||
|
||||
var messenger = window.messenger = Messenger.messenger(Cryptpad);
|
||||
UI.create(messenger, $list, $messages);
|
||||
};
|
||||
|
||||
Cryptpad.ready(function () {
|
||||
andThen();
|
||||
Cryptpad.reportAppUsage();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue