show the size of your files, if you're logged in

This commit is contained in:
ansuz
2017-04-18 15:49:04 +02:00
parent 2b8579e8b7
commit 347459781c
3 changed files with 71 additions and 20 deletions

View File

@@ -676,6 +676,14 @@ define([
rpc.getFileListSize(cb);
};
var getFileSize = common.getFileSize = function (href, cb) {
var channelId = Hash.hrefToHexChannelId(href);
rpc.getFileSize(channelId, function (e, bytes) {
if (e) { return void cb(e); }
cb(void 0, bytes);
});
};
var createButton = common.createButton = function (type, rightside, data, callback) {
var button;
var size = "17px";