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

pull/1/head
ansuz 8 years ago
commit 7439bbaba2

@ -114,14 +114,9 @@ define([
window.open($link.attr('href'), '_blank');
});
// TODO add button to table which copies link to clipboard?
//APP.toolbar.addElement(['fileshare'], {});
var title = metadata.name;
common.renamePad(title || "", href, function (err) {
if (err) { return void console.error(err); } // TODO
console.log(title);
var onComplete = function () {
common.log(Messages._getKey('upload_success', [title]));
common.prepareFeedback('upload')();
@ -132,6 +127,13 @@ define([
queue.inProgress = false;
queue.next();
};
if (config.noStore) { return void onComplete(); }
common.renamePad(title || "", href, function (err) {
if (err) { return void console.error(err); } // TODO
onComplete();
});
//Title.updateTitle(title || "", href);
//APP.toolbar.title.show();

@ -689,6 +689,15 @@ define([
})
.filter(function (x) { return x; });
// Get the avatar
var profile = store.getProfile();
if (profile) {
var profileChan = profile.edit ? hrefToHexChannelId('/profile/#' + profile.edit) : null;
if (profileChan) { list.push(profileChan); }
var avatarChan = profile.avatar ? hrefToHexChannelId(profile.avatar) : null;
if (avatarChan) { list.push(avatarChan); }
}
list.push(common.base64ToHex(userChannel));
list.sort();

@ -128,6 +128,10 @@ define([
ret.change = function () {};
ret.getProfile = function () {
return storeObj.profile;
};
return ret;
};

@ -204,6 +204,7 @@ define([
var $block = $('<div>', {id: AVATAR_ID}).appendTo($container);
var $span = $('<span>').appendTo($block);
if (APP.lm.proxy.avatar) {
//var file = APP.lm.proxy.avatar;
var $img = $('<media-tag>').appendTo($span);
$img.attr('src', '/blob/45/45170bcd64aae1726b0b0e06c4360181a08bad9596640863');
$img.attr('data-crypto-key', 'cryptpad:5vs/ciPzSAyHeP6XRwxpFZt/cjkRC+EE2CRw+/xfcVI=');
@ -219,8 +220,21 @@ define([
});
}
if (APP.readOnly) { return; }
var $button = $('<button>', {'class': 'btn btn-success'}).text('TODO: change avatar');
$block.append($button);
//var $button = $('<button>', {'class': 'btn btn-success'}).text('TODO: change avatar');
//$block.append($button);
var fmConfig = {
noHandlers: true,
noStore: true,
body: $('body'),
onUploaded: function (ev, data) {
console.log(data);
}
};
APP.FM = Cryptpad.createFileManager(fmConfig);
var data = {FM: APP.FM};
$block.append(Cryptpad.createButton('upload', false, data));
};
var addDescription = function ($container) {

@ -24,7 +24,7 @@
//height: 350px;
margin: 10px;
text-align: center;
span {
&> span {
display: inline-block;
line-height: 300px;
text-align: center;

Loading…
Cancel
Save