Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 8 years ago
commit 73e32f273e

@ -481,7 +481,7 @@ define([
return loadingScreen();
};
Pages['/friends/'] = Pages['/friends/index.html'] = function () {
Pages['/contacts/'] = Pages['/contacts/index.html'] = function () {
return loadingScreen();
};

@ -78,7 +78,7 @@
height: @width;
justify-content: center;
align-items: center;
border-radius: @width / 2px;
border-radius: 4px;
overflow: hidden;
box-sizing: content-box;
}

@ -115,7 +115,6 @@ body .userlist-drawer {
.avatar(30px);
.default, media-tag {
margin-right: 5px;
border: 1px solid black;
}
}
}
@ -266,7 +265,7 @@ body {
@color: @toolbar-file-color;
.addToolbarColors(@color, @bgcolor);
}
&.app-friends {
&.app-contacts {
@bgcolor: @toolbar-friends-bg;
@color: @toolbar-friends-color;
.addToolbarColors(@color, @bgcolor);

@ -12,7 +12,7 @@ $(function () {
var Messages = Cryptpad.Messages;
var $body = $('body');
var isMainApp = function () {
return /^\/(pad|code|slide|poll|whiteboard|file|media|friends|drive|settings|profile)\/$/.test(location.pathname);
return /^\/(pad|code|slide|poll|whiteboard|file|media|contacts|drive|settings|profile)\/$/.test(location.pathname);
};
var rightLink = function (ref, loc, txt) {
@ -148,9 +148,9 @@ $(function () {
} else if (/\/file\//.test(pathname)) {
$('body').append(h('body', Pages[pathname]()).innerHTML);
require([ '/file/main.js' ], ready);
} else if (/friends/.test(pathname)) {
} else if (/contacts/.test(pathname)) {
$('body').append(h('body', Pages[pathname]()).innerHTML);
require([ '/friends/main.js' ], ready);
require([ '/contacts/main.js' ], ready);
} else if (/pad/.test(pathname)) {
$('body').append(h('body', Pages[pathname]()).innerHTML);
require([ '/pad/main.js' ], ready);

@ -262,9 +262,10 @@ define(function () {
out.profile_inviteExplanation = "Clicking <strong>OK</strong> will create a link to a secure messaging session that <em>only {0} will be able to redeem.</em><br><br>The link will be copied to your clipboard and can be shared publicly.";
out.profile_viewMyProfile = "View my profile";
// friends/userlist
out.userlist_addAsFriendTitle = 'add "{0}" as a friend';
out.userlist_thisIsYou = 'this is you ("{0}")';
// contacts/userlist
out.userlist_addAsFriendTitle = 'Add "{0}" as a contact';
out.userlist_thisIsYou = 'This is you ("{0}")';
out.contacts_title = "Contacts";
// File manager

@ -28,8 +28,8 @@ var WARN = function (e, output) {
};
var isValidId = function (chan) {
return chan && chan.length && /^[a-fA-F0-9]/.test(chan) ||
[32, 48].indexOf(chan.length) !== -1;
return chan && chan.length && /^[a-fA-F0-9]/.test(chan) &&
[32, 48].indexOf(chan.length) > -1;
};
var uint8ArrayToHex = function (a) {

File diff suppressed because one or more lines are too long

@ -3,7 +3,7 @@
<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="/friends/inner.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.1.15"></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">

@ -2,7 +2,7 @@ define([
'jquery',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'less!/friends/main.less',
'less!/contacts/main.less',
'less!/customize/src/less/toolbar.less',
], function ($) {
$('.loading-hidden').removeClass('loading-hidden');

@ -25,14 +25,15 @@ define([
var $messages = $iframe.find('#messaging');
var $bar = $iframe.find('.toolbar-container');
var displayed = ['useradmin', 'newpad', 'limit'];
var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle'];
var configTb = {
displayed: displayed,
ifrw: ifrw,
common: Cryptpad,
$container: $bar,
network: Cryptpad.getNetwork()
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

@ -2,9 +2,26 @@ define([
'jquery',
'/common/cryptpad-common.js',
'/bower_components/chainpad-listmap/chainpad-listmap.js',
'/common/curve.js',
//'/common/curve.js',
'less!/invite/main.less',
], function ($, Cryptpad, Listmap, Curve) {
], function ($, Cryptpad /*, Listmap, Curve*/) {
var Messages = Cryptpad.Messages;
var comingSoon = function () {
return $('<div>', {
'class': 'coming-soon',
})
.text(Messages.comingSoon)
.append('<br>');
};
$(function () {
Cryptpad.removeLoadingScreen();
console.log("wut");
$('body #mainBlock').append(comingSoon());
});
return;
/* jshint ignore:start */
var APP = window.APP = {};
//var Messages = Cryptpad.Messages;
@ -83,4 +100,5 @@ define([
andThen();
});
});
/* jshint ignore:end */
});

@ -1,3 +1,4 @@
/*
.cp {
#mainBlock {
z-index: 1;
@ -135,3 +136,15 @@
justify-content: center;
}
}
*/
.coming-soon {
text-align: center;
font-size: 25px;
height: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
}

@ -82,7 +82,7 @@ define([
var CREATE_ID = "createProfile";
var HEADER_ID = "header";
var HEADER_RIGHT_ID = "rightside";
var CREATE_INVITE_BUTTON = 'inviteButton';
var CREATE_INVITE_BUTTON = 'inviteButton'; /* jshint ignore: line */
var VIEW_PROFILE_BUTTON = 'viewProfileButton';
var createEditableInput = function ($block, name, ph, getValue, setValue, realtime, fallbackValue) {
@ -158,12 +158,14 @@ define([
};
*/
/* jshint ignore:start */
var isFriend = function (proxy, edKey) {
var friends = Cryptpad.find(proxy, ['friends']);
return typeof(edKey) === 'string' && friends && (edKey in friends);
};
var addCreateInviteLinkButton = function ($container) {
return;
var obj = APP.lm.proxy;
var proxy = Cryptpad.getProxy();
@ -204,6 +206,7 @@ define([
})
.appendTo($container);
};
/* jshint ignore:end */
var addViewButton = function ($container) {
if (!Cryptpad.isLoggedIn() || window.location.hash) {
@ -238,7 +241,7 @@ define([
$span.text(value || Messages.anonymous);
});
addCreateInviteLinkButton($block);
//addCreateInviteLinkButton($block);
return;
}
var setValue = function (value, cb) {

@ -23,7 +23,7 @@
height: 300px;
width: 300px;
border: 1px solid black;
border-radius: 150px;
border-radius: 4px;
overflow: hidden;
position: relative;
.delete {

Loading…
Cancel
Save