Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
7439bbaba2
@ -114,14 +114,9 @@ define([
|
|||||||
window.open($link.attr('href'), '_blank');
|
window.open($link.attr('href'), '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO add button to table which copies link to clipboard?
|
|
||||||
//APP.toolbar.addElement(['fileshare'], {});
|
|
||||||
|
|
||||||
var title = metadata.name;
|
var title = metadata.name;
|
||||||
|
|
||||||
common.renamePad(title || "", href, function (err) {
|
var onComplete = function () {
|
||||||
if (err) { return void console.error(err); } // TODO
|
|
||||||
console.log(title);
|
|
||||||
common.log(Messages._getKey('upload_success', [title]));
|
common.log(Messages._getKey('upload_success', [title]));
|
||||||
common.prepareFeedback('upload')();
|
common.prepareFeedback('upload')();
|
||||||
|
|
||||||
@ -132,6 +127,13 @@ define([
|
|||||||
|
|
||||||
queue.inProgress = false;
|
queue.inProgress = false;
|
||||||
queue.next();
|
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);
|
//Title.updateTitle(title || "", href);
|
||||||
//APP.toolbar.title.show();
|
//APP.toolbar.title.show();
|
||||||
|
|||||||
@ -689,6 +689,15 @@ define([
|
|||||||
})
|
})
|
||||||
.filter(function (x) { return x; });
|
.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.push(common.base64ToHex(userChannel));
|
||||||
list.sort();
|
list.sort();
|
||||||
|
|
||||||
|
|||||||
@ -128,6 +128,10 @@ define([
|
|||||||
|
|
||||||
ret.change = function () {};
|
ret.change = function () {};
|
||||||
|
|
||||||
|
ret.getProfile = function () {
|
||||||
|
return storeObj.profile;
|
||||||
|
};
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -204,6 +204,7 @@ define([
|
|||||||
var $block = $('<div>', {id: AVATAR_ID}).appendTo($container);
|
var $block = $('<div>', {id: AVATAR_ID}).appendTo($container);
|
||||||
var $span = $('<span>').appendTo($block);
|
var $span = $('<span>').appendTo($block);
|
||||||
if (APP.lm.proxy.avatar) {
|
if (APP.lm.proxy.avatar) {
|
||||||
|
//var file = APP.lm.proxy.avatar;
|
||||||
var $img = $('<media-tag>').appendTo($span);
|
var $img = $('<media-tag>').appendTo($span);
|
||||||
$img.attr('src', '/blob/45/45170bcd64aae1726b0b0e06c4360181a08bad9596640863');
|
$img.attr('src', '/blob/45/45170bcd64aae1726b0b0e06c4360181a08bad9596640863');
|
||||||
$img.attr('data-crypto-key', 'cryptpad:5vs/ciPzSAyHeP6XRwxpFZt/cjkRC+EE2CRw+/xfcVI=');
|
$img.attr('data-crypto-key', 'cryptpad:5vs/ciPzSAyHeP6XRwxpFZt/cjkRC+EE2CRw+/xfcVI=');
|
||||||
@ -219,8 +220,21 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (APP.readOnly) { return; }
|
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) {
|
var addDescription = function ($container) {
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
//height: 350px;
|
//height: 350px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
span {
|
&> span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 300px;
|
line-height: 300px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user