Compare commits
No commits in common. "64985f5983fc73131252082946713eea80bfb82c" and "a2a005687395870280e54bc3e8d113affa2379db" have entirely different histories.
64985f5983
...
a2a0056873
@ -1,16 +0,0 @@
|
|||||||
import {Server} from "./server.model";
|
|
||||||
import {Data} from "./data.model";
|
|
||||||
|
|
||||||
export interface Client extends Data {
|
|
||||||
|
|
||||||
id?: number;
|
|
||||||
discordId?: string;
|
|
||||||
name?: string;
|
|
||||||
sentMessageCount?: number;
|
|
||||||
receivedMessageCount?: number;
|
|
||||||
deletedMessageCount?: number;
|
|
||||||
receivedCommandCount?: number;
|
|
||||||
movedUsersCount?: number;
|
|
||||||
server?: Server;
|
|
||||||
|
|
||||||
}
|
|
@ -1,7 +1,6 @@
|
|||||||
import { Data } from "./data.model";
|
import { Data } from "./data.model";
|
||||||
import { User } from "./user.model";
|
import { User } from "./user.model";
|
||||||
import { Level } from "./level.model";
|
import { Level } from "./level.model";
|
||||||
import {Client} from "./client.model";
|
|
||||||
|
|
||||||
export interface Server extends Data {
|
export interface Server extends Data {
|
||||||
id?: number;
|
id?: number;
|
||||||
@ -11,7 +10,7 @@ export interface Server extends Data {
|
|||||||
autoRoleCount?: number;
|
autoRoleCount?: number;
|
||||||
autoRoles?: [];
|
autoRoles?: [];
|
||||||
clientCount?: number;
|
clientCount?: number;
|
||||||
clients?: Client[];
|
clients?: [];
|
||||||
levelCount?: number;
|
levelCount?: number;
|
||||||
levels?: Level[];
|
levels?: Level[];
|
||||||
userCount?: number;
|
userCount?: number;
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
export class Queries {
|
export class Queries {
|
||||||
|
static serversListQuery = `
|
||||||
|
query ServerInfo($filter: ServerFilter, $page: Page, $sort: Sort) {
|
||||||
|
serverCount
|
||||||
|
servers(filter: $filter, page: $page, sort: $sort) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
iconURL
|
||||||
|
userCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
static serversQuery = `
|
static serversQuery = `
|
||||||
query ServerInfo($filter: ServerFilter, $page: Page, $sort: Sort) {
|
query ServerInfo($filter: ServerFilter, $page: Page, $sort: Sort) {
|
||||||
@ -7,16 +18,6 @@ export class Queries {
|
|||||||
name
|
name
|
||||||
iconURL
|
iconURL
|
||||||
userCount
|
userCount
|
||||||
clients{
|
|
||||||
id
|
|
||||||
discordId
|
|
||||||
name
|
|
||||||
sentMessageCount
|
|
||||||
receivedMessageCount
|
|
||||||
deletedMessageCount
|
|
||||||
receivedCommandCount
|
|
||||||
movedUsersCount
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -84,7 +84,7 @@ export class DashboardComponent implements OnInit {
|
|||||||
|
|
||||||
loadNextPage() {
|
loadNextPage() {
|
||||||
this.spinnerService.showSpinner();
|
this.spinnerService.showSpinner();
|
||||||
this.data.query<Query>(Queries.serversQuery, {
|
this.data.query<Query>(Queries.serversListQuery, {
|
||||||
filter: this.filter,
|
filter: this.filter,
|
||||||
page: this.page,
|
page: this.page,
|
||||||
sort: this.sort
|
sort: this.sort
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
<div class="client">
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.id' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.id}}</label>
|
|
||||||
</div>
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.discord_id' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.discordId}}</label>
|
|
||||||
</div>
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.name' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.name}}</label>
|
|
||||||
</div>
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.sent_message_count' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.sentMessageCount}}</label>
|
|
||||||
</div>
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.received_message_count' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.receivedMessageCount}}</label>
|
|
||||||
</div>
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.deleted_message_count' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.deletedMessageCount}}</label>
|
|
||||||
</div>
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.received_command_count' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.receivedCommandCount}}</label>
|
|
||||||
</div>
|
|
||||||
<div class="client-info">
|
|
||||||
<label class="client-info-header">{{'view.server.dashboard.moved_users_count' | translate}}</label>
|
|
||||||
<label class="client-info-value">{{client.movedUsersCount}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,23 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { ClientComponent } from './client.component';
|
|
||||||
|
|
||||||
describe('ClientComponent', () => {
|
|
||||||
let component: ClientComponent;
|
|
||||||
let fixture: ComponentFixture<ClientComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
declarations: [ ClientComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ClientComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,25 +0,0 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
|
||||||
import {Client} from "../../../../../../models/data/client.model";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-client',
|
|
||||||
templateUrl: './client.component.html',
|
|
||||||
styleUrls: ['./client.component.scss']
|
|
||||||
})
|
|
||||||
export class ClientComponent {
|
|
||||||
|
|
||||||
@Input() client: Client = {
|
|
||||||
createdAt: "", modifiedAt: "",
|
|
||||||
deletedMessageCount: 0,
|
|
||||||
discordId: "",
|
|
||||||
id: 0,
|
|
||||||
movedUsersCount: 0,
|
|
||||||
name: "",
|
|
||||||
receivedCommandCount: 0,
|
|
||||||
receivedMessageCount: 0,
|
|
||||||
sentMessageCount: 0,
|
|
||||||
server: undefined
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -27,12 +27,6 @@
|
|||||||
{{server.userCount}}
|
{{server.userCount}}
|
||||||
{{'view.dashboard.server.member_count' | translate}}
|
{{'view.dashboard.server.member_count' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="client-data"
|
|
||||||
*ngFor="let client of server.clients">
|
|
||||||
<i class="pi pi-discord"></i>
|
|
||||||
<app-client class="client-component" [client]="client"></app-client>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,7 +5,6 @@ import { ServerRoutingModule } from './server-routing.module';
|
|||||||
import { SharedModule } from '../../shared/shared.module';
|
import { SharedModule } from '../../shared/shared.module';
|
||||||
import { ProfileComponent } from './profile/profile.component';
|
import { ProfileComponent } from './profile/profile.component';
|
||||||
import { MembersComponent } from './members/members.component';
|
import { MembersComponent } from './members/members.component';
|
||||||
import { ClientComponent } from './server-dashboard/components/client/client.component';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -13,8 +12,7 @@ import { ClientComponent } from './server-dashboard/components/client/client.com
|
|||||||
declarations: [
|
declarations: [
|
||||||
ServerDashboardComponent,
|
ServerDashboardComponent,
|
||||||
ProfileComponent,
|
ProfileComponent,
|
||||||
MembersComponent,
|
MembersComponent
|
||||||
ClientComponent
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@ -158,15 +158,7 @@
|
|||||||
"server": {
|
"server": {
|
||||||
"header": "Server",
|
"header": "Server",
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"header": "Server dashboard",
|
"header": "Server dashboard"
|
||||||
"id": "Id",
|
|
||||||
"discord_id": "Discord Id",
|
|
||||||
"name": "Name",
|
|
||||||
"sent_message_count": "Gesendete Nachrichten",
|
|
||||||
"received_message_count": "Empfangene Nachrichten",
|
|
||||||
"deleted_message_count": "Gelöschte Nachrichten",
|
|
||||||
"received_command_count": "Empfangene Befehle",
|
|
||||||
"moved_users_count": "Verschobene Benutzer"
|
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"header": "Dein Profil",
|
"header": "Dein Profil",
|
||||||
|
@ -258,6 +258,7 @@ header {
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
@ -269,7 +270,7 @@ header {
|
|||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 100%;
|
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
@ -281,41 +282,6 @@ header {
|
|||||||
|
|
||||||
.data {
|
.data {
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-data {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.client-component {
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.client {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-content: stretch !important;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.client-info {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
margin-left: 2%;
|
|
||||||
|
|
||||||
.client-info-header {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
white-space: nowrap;
|
|
||||||
font-weight: bold
|
|
||||||
}
|
|
||||||
|
|
||||||
.client-info-value {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "kd_discord_bot",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user