Team APP UI

This commit is contained in:
yflory
2019-09-06 18:47:18 +02:00
parent 15387af020
commit 634d24b46c
8 changed files with 230 additions and 138 deletions

View File

@@ -1883,6 +1883,7 @@ define([
If changes are made to your drive in the interim, they will trigger an
update.
*/
// NOTE: The callback must stay SYNCHRONOUS
var LIMIT_REFRESH_RATE = 30000; // milliseconds
UIElements.createUsageBar = function (common, cb) {
if (AppConfig.hideUsageBar) { return cb('USAGE_BAR_HIDDEN'); }

View File

@@ -535,7 +535,6 @@ define([
// manager
config.loggedIn = APP.loggedIn;
config.sframeChan = sframeChan;
// XXX Teams. provide team id
var manager = ProxyManager.createInner(files, sframeChan, edPublic, config);
var LS = makeLS(teamId);
@@ -585,7 +584,6 @@ define([
var virtualCategories = [SEARCH, RECENT, OWNED, TAGS];
// XXX Teams. not logged in should not be allowe din the team APP
if (!APP.loggedIn) {
$tree.hide();
if (APP.newSharedFolder) {
@@ -4318,7 +4316,6 @@ define([
refresh();
UI.removeLoadingScreen();
// XXX Teams. should provide a team ID (or null for main drive)
sframeChan.query('Q_DRIVE_GETDELETED', null, function (err, data) {
var ids = manager.findChannels(data);
var titles = [];
@@ -4331,6 +4328,10 @@ define([
if (!titles.length) { return; }
UI.log(Messages._getKey('fm_deletedPads', [titles.join(', ')]));
});
return {
refresh: refresh
};
};
return {

View File

@@ -145,11 +145,10 @@ define([
}));
Object.keys(teams).forEach(function (id) {
// XXX waitFor?
// only if we want to make sure teams are loaded before remore the loading screen
openChannel(ctx, teams[id], id, function () {
openChannel(ctx, teams[id], id, waitFor(function () {
console.error('team '+id+' ready');
});
}));
});
team.getTeam = function (id) {
@@ -169,6 +168,9 @@ define([
// Only the team app will subscribe to events?
return void subscribe(ctx, data, clientId, cb);
}
if (cmd === 'LIST_TEAMS') {
return void cb(ctx.teams);
}
};
return team;

View File

@@ -692,9 +692,10 @@ define([
});
ctx.sframeChan.ready();
cb(funcs);
Mailbox.create(funcs);
cb(funcs);
});
} };
});