Complete client context menu: channel/server group assignment

Fills out the last two disabled entries in the client right-click menu
(#72): "Channel-Gruppe zuweisen" and "Server-Gruppe zuweisen".

- Connector: exposes each client's database_id, channel_group, and
  server_groups (already present in tsclientlib's bookkeeping Client
  struct, just not threaded through before) on the "channels" snapshot.
  Adds raw commands for channelgrouplist/servergrouplist (list requests,
  same InMessage pattern as banlist/complainlist) and
  setclientchannelgroup/servergroupaddclient/servergroupdelclient
  (assignment, fire-and-forget like kick/ban).
- Gateway: typed passthrough for the new client fields and five new
  message types (getChannelGroupList, getServerGroupList,
  setChannelGroup, addServerGroup, removeServerGroup).
- Frontend: new GroupAssignDialog reused for both channel groups
  (single-select, closes after assigning) and server groups
  (multi-select, checkmarked entries toggle add/remove and the dialog
  stays open). Demo mode simulates real group membership changes,
  including live re-render after assignment.

Verified against the real server: the client's own database_id/
channel_group/server_groups now flow correctly end-to-end (confirmed
via a throwaway gateway test script). The list-request commands are
permission-gated for the guest test account and decline silently, same
as serverlog/serverconninfo before them - the dialog's existing 6s
"unavailable" timeout already covers this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
MoepchiandClaude Sonnet 5 committed 2026-08-05 20:40:52 +02:00
1 parent 203e8fba51
commit db8b5ea958
7 files changed
+464 -8

No files matched your search

+27
View File
@@ -1121,6 +1121,33 @@
font-family: inherit;
}
.ts-group-assign-dialog {
width: 420px;
}
.ts-group-assign-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.ts-group-assign-list .ts-menu-item {
width: 100%;
}
.ts-group-assign-current {
background: var(--bg-hover, rgba(255, 255, 255, 0.06));
}
.ts-group-assign-hint {
margin-left: auto;
color: var(--text-muted);
font-size: 11px;
}
.ts-server-protocol-log-line {
padding: 0.15rem 0.4rem;
border-bottom: 1px solid var(--border-soft);