summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-page.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/group-page.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
index 470f169..4ebe5a7 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
@@ -9,6 +9,7 @@ import {
HUB, session, cacheGroupIndex, hubFetch, ensureFreshToken, _loadBundleKey,
} from './hub-client.js';
import { visibleApps } from './apps.js';
+import { GroupName } from './group-name.js';
import { FilePreview } from './files-app.js';
import { VideoPlayer } from './video-player.js';
import { MusicPlayerBar } from './music-player.js';
@@ -160,7 +161,8 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
setEntries(fresh);
if (indexMsg.dirs) setNodeDirs(indexMsg.dirs);
if (indexMsg.roots) setNodeRoots(indexMsg.roots);
- cacheGroupIndex(groupId, group ? group.name : groupId, fresh);
+ cacheGroupIndex(groupId, group ? group.name : groupId,
+ group ? group.owner_username : null, fresh);
}, [groupId, group]);
// additions/deletions/updates (daemon.py _broadcast_index_change, once
@@ -181,7 +183,8 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
const keptIds = new Set(updated.map((e) => e.id));
const additions = (deltaMsg.additions || []).filter((e) => !keptIds.has(e.id));
const fresh = updated.concat(additions);
- cacheGroupIndex(groupId, group ? group.name : groupId, fresh);
+ cacheGroupIndex(groupId, group ? group.name : groupId,
+ group ? group.owner_username : null, fresh);
return fresh;
});
}, [groupId, group]);
@@ -493,7 +496,9 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
<div class="group-header">
<div>
<h2 style="margin-bottom:${group && group.description ? '4px' : '0'}">
- ${group ? group.name : t('group.default_name')}
+ ${group
+ ? html`<${GroupName} name=${group.name} owner=${group.owner_username} />`
+ : t('group.default_name')}
</h2>
${editingDesc
? html`