diff --git a/web/src/App.tsx b/web/src/App.tsx index 9574a05..8a9a2aa 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -2072,7 +2072,19 @@ function PermissionsEditorDialog({ const [addNegated, setAddNegated] = useState(false); const [addSkip, setAddSkip] = useState(false); + const isGroupScope = scope === "server" || scope === "channelgroup"; const groupList = scope === "server" ? serverGroups : scope === "channelgroup" ? channelGroups : null; + // The channelgrouplist/servergrouplist requests decline silently when the + // account lacks the permission to see them (no reply at all, same as + // banlist/complainlist elsewhere) - without this, a permission-limited + // account just sees a permanently blank panel with no explanation. + const [groupsTimedOut, setGroupsTimedOut] = useState(false); + useEffect(() => { + setGroupsTimedOut(false); + if (groupList) return; + const id = window.setTimeout(() => setGroupsTimedOut(true), 6000); + return () => window.clearTimeout(id); + }, [groupList]); // (ids, ready) for the currently selected target under the active tab - // ready is false while a required piece (channel/client) hasn't been picked yet. @@ -2146,24 +2158,31 @@ function PermissionsEditorDialog({
- {groupList && ( - - )} + {isGroupScope && + (groupList ? ( + + ) : ( +
+ {groupsTimedOut ? t("connectionInfo.unavailable") : t("connectionInfo.loading")} +
+ ))} {(scope === "channel" || scope === "channelclient") && (