Add the Complaints List and Make a Complaint
Tools > Complaints List (Ctrl+Shift+C) shows the server's complaints grouped by target, with Remove, Reload and Ban Client, as TS3 does. The client menu gains Make a Complaint below Poke. The complaint delete permissions are missing from the needed-permissions subset, so they are asked for alongside the move/kick/ban powers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,7 @@ final class ServerTab {
|
||||
/** The one open ban list window for this server, if any. */
|
||||
private BanListDialog banList;
|
||||
private PrivilegeKeysDialog privilegeKeys;
|
||||
private ComplaintsDialog complaints;
|
||||
|
||||
ServerTab(MainFrame host, Settings settings, IdentityStore identities, AudioBackend audio,
|
||||
SoundNotifier sounds, ContactStore contacts, PictureDownloads pictures) {
|
||||
@@ -190,6 +191,16 @@ final class ServerTab {
|
||||
banList.toFront();
|
||||
}
|
||||
|
||||
/** Opens the server's complaints, or brings the already open window forward. */
|
||||
void showComplaints() {
|
||||
if (!session.isConnected()) return;
|
||||
if (complaints == null || !complaints.isDisplayable()) {
|
||||
complaints = new ComplaintsDialog(host, conn, treeActions::banClient);
|
||||
}
|
||||
complaints.setVisible(true);
|
||||
complaints.toFront();
|
||||
}
|
||||
|
||||
/** Asks for a privilege key and redeems it on this server. */
|
||||
void usePrivilegeKey() {
|
||||
if (!session.isConnected()) return;
|
||||
@@ -213,12 +224,16 @@ final class ServerTab {
|
||||
privilegeKeys.toFront();
|
||||
}
|
||||
|
||||
/** The server's name changed or the connection went; the ban list and privilege keys windows follow. */
|
||||
/** The server's name changed or the connection went; the ban list, complaints and privilege keys windows follow. */
|
||||
void serverWindowsChanged(boolean connected) {
|
||||
if (banList != null) {
|
||||
if (connected) banList.serverNameChanged();
|
||||
else banList.connectionLost();
|
||||
}
|
||||
if (complaints != null) {
|
||||
if (connected) complaints.serverNameChanged();
|
||||
else complaints.connectionLost();
|
||||
}
|
||||
if (privilegeKeys != null) {
|
||||
if (connected) privilegeKeys.serverNameChanged();
|
||||
else privilegeKeys.connectionLost();
|
||||
|
||||
Reference in New Issue
Block a user