Remove not required client info for query clients
parent
3b60d45ff1
commit
ea780c403b
|
@ -284,7 +284,7 @@ export class Registry<Events extends { [key: string]: any } = { [key: string]: a
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {Group, GroupManager, GroupTarget, GroupType} from "../permission/GroupMa
|
||||||
import PermissionType from "../permission/PermissionType";
|
import PermissionType from "../permission/PermissionType";
|
||||||
import {createErrorModal, createInputModal} from "../ui/elements/Modal";
|
import {createErrorModal, createInputModal} from "../ui/elements/Modal";
|
||||||
import * as htmltags from "../ui/htmltags";
|
import * as htmltags from "../ui/htmltags";
|
||||||
import {CommandResult, PlaylistSong} from "../connection/ServerConnectionDeclaration";
|
import {CommandResult} from "../connection/ServerConnectionDeclaration";
|
||||||
import {ChannelEntry} from "./Channel";
|
import {ChannelEntry} from "./Channel";
|
||||||
import {ConnectionHandler, ViewReasonId} from "../ConnectionHandler";
|
import {ConnectionHandler, ViewReasonId} from "../ConnectionHandler";
|
||||||
import {createServerGroupAssignmentModal} from "../ui/modal/ModalGroupAssignment";
|
import {createServerGroupAssignmentModal} from "../ui/modal/ModalGroupAssignment";
|
||||||
|
@ -290,7 +290,7 @@ export class ClientEntry<Events extends ClientEvents = ClientEvents> extends Cha
|
||||||
}
|
}
|
||||||
|
|
||||||
getStatusIcon() : ClientIcon {
|
getStatusIcon() : ClientIcon {
|
||||||
if (this.properties.client_type_exact == ClientType.CLIENT_QUERY) {
|
if (this.properties.client_type == ClientType.CLIENT_QUERY) {
|
||||||
return ClientIcon.ServerQuery;
|
return ClientIcon.ServerQuery;
|
||||||
} else if (this.properties.client_away) {
|
} else if (this.properties.client_away) {
|
||||||
return ClientIcon.Away;
|
return ClientIcon.Away;
|
||||||
|
|
|
@ -436,6 +436,24 @@ const ServerGroupRenderer = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ConnectedClientInfoBlock = () => {
|
||||||
|
const client = useContext(ClientContext);
|
||||||
|
if(client.type === "query" || client.type === "none") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<React.Fragment key={"info"}>
|
||||||
|
<ClientOnlineSince />
|
||||||
|
<ClientCountry />
|
||||||
|
<ClientForumAccount />
|
||||||
|
<ClientVolume />
|
||||||
|
<ClientVersion />
|
||||||
|
<ClientStatus />
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const ClientInfoProvider = () => {
|
const ClientInfoProvider = () => {
|
||||||
const events = useContext(EventsContext);
|
const events = useContext(EventsContext);
|
||||||
|
|
||||||
|
@ -468,12 +486,7 @@ const ClientInfoProvider = () => {
|
||||||
</div>
|
</div>
|
||||||
<div className={cssStyle.generalInfo}>
|
<div className={cssStyle.generalInfo}>
|
||||||
<div className={cssStyle.block + " " + cssStyle.blockLeft}>
|
<div className={cssStyle.block + " " + cssStyle.blockLeft}>
|
||||||
<ClientOnlineSince />
|
<ConnectedClientInfoBlock />
|
||||||
<ClientCountry />
|
|
||||||
<ClientForumAccount />
|
|
||||||
<ClientVolume />
|
|
||||||
<ClientVersion />
|
|
||||||
<ClientStatus />
|
|
||||||
</div>
|
</div>
|
||||||
<div className={cssStyle.block + " " + cssStyle.blockRight}>
|
<div className={cssStyle.block + " " + cssStyle.blockRight}>
|
||||||
<ChannelGroupRenderer />
|
<ChannelGroupRenderer />
|
||||||
|
|
Loading…
Reference in New Issue