Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -481,7 +481,7 @@ define([
|
|||||||
return loadingScreen();
|
return loadingScreen();
|
||||||
};
|
};
|
||||||
|
|
||||||
Pages['/friends/'] = Pages['/friends/index.html'] = function () {
|
Pages['/contacts/'] = Pages['/contacts/index.html'] = function () {
|
||||||
return loadingScreen();
|
return loadingScreen();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
height: @width;
|
height: @width;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: @width / 2px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ body .userlist-drawer {
|
|||||||
.avatar(30px);
|
.avatar(30px);
|
||||||
.default, media-tag {
|
.default, media-tag {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
border: 1px solid black;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,7 +265,7 @@ body {
|
|||||||
@color: @toolbar-file-color;
|
@color: @toolbar-file-color;
|
||||||
.addToolbarColors(@color, @bgcolor);
|
.addToolbarColors(@color, @bgcolor);
|
||||||
}
|
}
|
||||||
&.app-friends {
|
&.app-contacts {
|
||||||
@bgcolor: @toolbar-friends-bg;
|
@bgcolor: @toolbar-friends-bg;
|
||||||
@color: @toolbar-friends-color;
|
@color: @toolbar-friends-color;
|
||||||
.addToolbarColors(@color, @bgcolor);
|
.addToolbarColors(@color, @bgcolor);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $(function () {
|
|||||||
var Messages = Cryptpad.Messages;
|
var Messages = Cryptpad.Messages;
|
||||||
var $body = $('body');
|
var $body = $('body');
|
||||||
var isMainApp = function () {
|
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) {
|
var rightLink = function (ref, loc, txt) {
|
||||||
@@ -148,9 +148,9 @@ $(function () {
|
|||||||
} else if (/\/file\//.test(pathname)) {
|
} else if (/\/file\//.test(pathname)) {
|
||||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||||
require([ '/file/main.js' ], ready);
|
require([ '/file/main.js' ], ready);
|
||||||
} else if (/friends/.test(pathname)) {
|
} else if (/contacts/.test(pathname)) {
|
||||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||||
require([ '/friends/main.js' ], ready);
|
require([ '/contacts/main.js' ], ready);
|
||||||
} else if (/pad/.test(pathname)) {
|
} else if (/pad/.test(pathname)) {
|
||||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||||
require([ '/pad/main.js' ], ready);
|
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_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";
|
out.profile_viewMyProfile = "View my profile";
|
||||||
|
|
||||||
// friends/userlist
|
// contacts/userlist
|
||||||
out.userlist_addAsFriendTitle = 'add "{0}" as a friend';
|
out.userlist_addAsFriendTitle = 'Add "{0}" as a contact';
|
||||||
out.userlist_thisIsYou = 'this is you ("{0}")';
|
out.userlist_thisIsYou = 'This is you ("{0}")';
|
||||||
|
out.contacts_title = "Contacts";
|
||||||
|
|
||||||
// File manager
|
// File manager
|
||||||
|
|
||||||
|
|||||||
4
rpc.js
4
rpc.js
@@ -28,8 +28,8 @@ var WARN = function (e, output) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var isValidId = function (chan) {
|
var isValidId = function (chan) {
|
||||||
return chan && chan.length && /^[a-fA-F0-9]/.test(chan) ||
|
return chan && chan.length && /^[a-fA-F0-9]/.test(chan) &&
|
||||||
[32, 48].indexOf(chan.length) !== -1;
|
[32, 48].indexOf(chan.length) > -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
var uint8ArrayToHex = function (a) {
|
var uint8ArrayToHex = function (a) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
<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>
|
<style>.loading-hidden, .loading-hidden * {display: none !important;}</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="loading-hidden">
|
<body class="loading-hidden">
|
||||||
@@ -2,7 +2,7 @@ define([
|
|||||||
'jquery',
|
'jquery',
|
||||||
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
||||||
'css!/bower_components/bootstrap/dist/css/bootstrap.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',
|
'less!/customize/src/less/toolbar.less',
|
||||||
], function ($) {
|
], function ($) {
|
||||||
$('.loading-hidden').removeClass('loading-hidden');
|
$('.loading-hidden').removeClass('loading-hidden');
|
||||||
@@ -25,14 +25,15 @@ define([
|
|||||||
var $messages = $iframe.find('#messaging');
|
var $messages = $iframe.find('#messaging');
|
||||||
var $bar = $iframe.find('.toolbar-container');
|
var $bar = $iframe.find('.toolbar-container');
|
||||||
|
|
||||||
var displayed = ['useradmin', 'newpad', 'limit'];
|
var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle'];
|
||||||
|
|
||||||
var configTb = {
|
var configTb = {
|
||||||
displayed: displayed,
|
displayed: displayed,
|
||||||
ifrw: ifrw,
|
ifrw: ifrw,
|
||||||
common: Cryptpad,
|
common: Cryptpad,
|
||||||
$container: $bar,
|
$container: $bar,
|
||||||
network: Cryptpad.getNetwork()
|
network: Cryptpad.getNetwork(),
|
||||||
|
pageTitle: Messages.contacts_title,
|
||||||
};
|
};
|
||||||
var toolbar = APP.toolbar = Toolbar.create(configTb);
|
var toolbar = APP.toolbar = Toolbar.create(configTb);
|
||||||
toolbar.$rightside.html(''); // Remove the drawer if we don't use it to hide the toolbar
|
toolbar.$rightside.html(''); // Remove the drawer if we don't use it to hide the toolbar
|
||||||
@@ -2,9 +2,26 @@ define([
|
|||||||
'jquery',
|
'jquery',
|
||||||
'/common/cryptpad-common.js',
|
'/common/cryptpad-common.js',
|
||||||
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
||||||
'/common/curve.js',
|
//'/common/curve.js',
|
||||||
'less!/invite/main.less',
|
'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 APP = window.APP = {};
|
||||||
|
|
||||||
//var Messages = Cryptpad.Messages;
|
//var Messages = Cryptpad.Messages;
|
||||||
@@ -83,4 +100,5 @@ define([
|
|||||||
andThen();
|
andThen();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
/* jshint ignore:end */
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/*
|
||||||
.cp {
|
.cp {
|
||||||
#mainBlock {
|
#mainBlock {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -135,3 +136,15 @@
|
|||||||
justify-content: 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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ define([
|
|||||||
var CREATE_ID = "createProfile";
|
var CREATE_ID = "createProfile";
|
||||||
var HEADER_ID = "header";
|
var HEADER_ID = "header";
|
||||||
var HEADER_RIGHT_ID = "rightside";
|
var HEADER_RIGHT_ID = "rightside";
|
||||||
var CREATE_INVITE_BUTTON = 'inviteButton';
|
var CREATE_INVITE_BUTTON = 'inviteButton'; /* jshint ignore: line */
|
||||||
var VIEW_PROFILE_BUTTON = 'viewProfileButton';
|
var VIEW_PROFILE_BUTTON = 'viewProfileButton';
|
||||||
|
|
||||||
var createEditableInput = function ($block, name, ph, getValue, setValue, realtime, fallbackValue) {
|
var createEditableInput = function ($block, name, ph, getValue, setValue, realtime, fallbackValue) {
|
||||||
@@ -158,12 +158,14 @@ define([
|
|||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* jshint ignore:start */
|
||||||
var isFriend = function (proxy, edKey) {
|
var isFriend = function (proxy, edKey) {
|
||||||
var friends = Cryptpad.find(proxy, ['friends']);
|
var friends = Cryptpad.find(proxy, ['friends']);
|
||||||
return typeof(edKey) === 'string' && friends && (edKey in friends);
|
return typeof(edKey) === 'string' && friends && (edKey in friends);
|
||||||
};
|
};
|
||||||
|
|
||||||
var addCreateInviteLinkButton = function ($container) {
|
var addCreateInviteLinkButton = function ($container) {
|
||||||
|
return;
|
||||||
var obj = APP.lm.proxy;
|
var obj = APP.lm.proxy;
|
||||||
|
|
||||||
var proxy = Cryptpad.getProxy();
|
var proxy = Cryptpad.getProxy();
|
||||||
@@ -204,6 +206,7 @@ define([
|
|||||||
})
|
})
|
||||||
.appendTo($container);
|
.appendTo($container);
|
||||||
};
|
};
|
||||||
|
/* jshint ignore:end */
|
||||||
|
|
||||||
var addViewButton = function ($container) {
|
var addViewButton = function ($container) {
|
||||||
if (!Cryptpad.isLoggedIn() || window.location.hash) {
|
if (!Cryptpad.isLoggedIn() || window.location.hash) {
|
||||||
@@ -238,7 +241,7 @@ define([
|
|||||||
$span.text(value || Messages.anonymous);
|
$span.text(value || Messages.anonymous);
|
||||||
});
|
});
|
||||||
|
|
||||||
addCreateInviteLinkButton($block);
|
//addCreateInviteLinkButton($block);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var setValue = function (value, cb) {
|
var setValue = function (value, cb) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
height: 300px;
|
height: 300px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-radius: 150px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
.delete {
|
.delete {
|
||||||
|
|||||||
Reference in New Issue
Block a user