File upload in the profile

This commit is contained in:
yflory
2017-06-28 10:59:29 +02:00
parent 85d8eda847
commit 6c94605b9b
5 changed files with 38 additions and 9 deletions

View File

@@ -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();

View File

@@ -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();

View File

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