Add team usage bar

This commit is contained in:
yflory
2019-09-23 15:45:24 +02:00
parent 17fbaea5d0
commit b1dab8e75a
8 changed files with 43 additions and 36 deletions

View File

@@ -213,6 +213,11 @@ define([
if (!proxy.drive || typeof(proxy.drive) !== 'object') {
throw new Error("Corrupted drive");
}
if (APP.usageBar) { APP.usageBar.stop(); }
APP.usageBar = common.createUsageBar(APP.team, function (err, $limitContainer) {
if (err) { return void DriveUI.logError(err); }
driveAPP.$limit = $limitContainer;
}, true);
driveAPP.team = id;
var drive = DriveUI.create(common, {
proxy: proxy,
@@ -722,16 +727,6 @@ define([
driveAPP.$displayName.text(name);
});
/* add the usage */
// XXX Teams
if (false) {
// Synchronous callback...
common.createUsageBar(function (err, $limitContainer) {
if (err) { return void DriveUI.logError(err); }
driveAPP.$limit = $limitContainer;
}, true);
}
// Load the Team module
var onEvent = function (obj) {
var ev = obj.ev;