From 6a712a7b5232fbe2c9cd7f1a6797e1eb6dc173c3 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 17 Dec 2019 11:24:49 +0100 Subject: [PATCH] View pending invitation links and remove them (if admin) --- www/teams/inner.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/www/teams/inner.js b/www/teams/inner.js index 16ef22adb..4d8cb6bfc 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -763,10 +763,19 @@ define([ }); var pending = Object.keys(roster).filter(function (k) { if (!roster[k].pending) { return; } + if (roster[k].inviteChannel) { return; } return roster[k].role === "MEMBER" || roster[k].role === "VIEWER" || !roster[k].role; }).map(function (k) { return makeMember(common, roster[k], me); }); + var links = Object.keys(roster).filter(function (k) { + if (!roster[k].pending) { return; } + if (!roster[k].inviteChannel) { return; } + roster[k].curvePublic = k; // XXX "if (!data.curvePublic) { return; }" in makeMember + return roster[k].role === "VIEWER" || !roster[k].role; + }).map(function (k) { + return makeMember(common, roster[k], me); + }); var header = h('div.cp-app-team-roster-header'); var $header = $(header); @@ -820,6 +829,7 @@ define([ $header.append(table); var noPending = pending.length ? '' : '.cp-hidden'; + var noLinks = links.length ? '' : '.cp-hidden'; return [ header, @@ -832,7 +842,9 @@ define([ h('h3', Messages.team_viewers || 'VIEWERS'), h('div', viewers), h('h3'+noPending, Messages.team_pending), - h('div'+noPending, pending) + h('div'+noPending, pending), + h('h3'+noLinks, Messages.team_links), + h('div'+noLinks, links) ]; }; makeBlock('roster', function (common, cb) {