diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 475c85a..d538857 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -29,6 +29,7 @@ import {FormsModule} from "@angular/forms";
import {ServerService} from "./services/server.service";
import {registerLocaleData} from "@angular/common";
import localeRu from "@angular/common/locales/ru";
+import {Tf2dataService} from "./services/tf2data.service";
registerLocaleData(localeRu, "ru")
@@ -65,7 +66,8 @@ registerLocaleData(localeRu, "ru")
AnnonceService,
PlayerService,
BanService,
- ServerService
+ ServerService,
+ Tf2dataService
],
bootstrap: [AppComponent]
})
diff --git a/src/app/entities/servers/Player.ts b/src/app/entities/servers/Player.ts
index d18004d..99f2d1e 100644
--- a/src/app/entities/servers/Player.ts
+++ b/src/app/entities/servers/Player.ts
@@ -1,3 +1,5 @@
+import {SteamIDs} from "../profile/SteamIDs";
+
export interface Player {
clz: number|null;
deads: number;
@@ -10,7 +12,7 @@ export interface Player {
pos: number[];
score: number;
state: string;
- steam: any;
+ steam: SteamIDs;
steam2: string;
team: number;
}
diff --git a/src/app/pages/servers-page/servers-page.component.html b/src/app/pages/servers-page/servers-page.component.html
index 7bf87d3..526a8ab 100644
--- a/src/app/pages/servers-page/servers-page.component.html
+++ b/src/app/pages/servers-page/servers-page.component.html
@@ -85,9 +85,68 @@
{{player.score}} / {{player.deads}} / {{player.duration}}
-
Ид игрока: {{player.id}}
- Пинг: {{player.ping}}
- Потери пакетов: {{player.loss}}
+
+
+ {{player.score}}
+ очков набрано
+
+
+ {{player.deads}}
+ смертей
+
+
+ {{player.ping}}
+ пинг игрока
+
+
+ {{player.loss}}
+ потери пакетов
+
+
+ {{tf2data.TFClassType[player.clz]}}
+ на сервере
+
+
+ {{tf2data.TFTeam[player.team]}}
+ команда
+
+
+
+
+
+ {{player.steam.steam2}}
+ {{player.steam.steam3}}
+ {{player.steam.steam64}}
+
+
+
+ Открыть профиль
+ на сайте
+
+
+ Открыть профиль
+ в стиме
+
+
+ Пожаловаться
+ на игрока который играет
+
+
+
+
+ Забанить
+
+
+ Кикнуть
+
+
+ Кинуть в мут
+
+
diff --git a/src/app/pages/servers-page/servers-page.component.ts b/src/app/pages/servers-page/servers-page.component.ts
index 3a36aee..86696c6 100644
--- a/src/app/pages/servers-page/servers-page.component.ts
+++ b/src/app/pages/servers-page/servers-page.component.ts
@@ -3,6 +3,7 @@ import {WebsocketServersListenerService} from "../../services/websocket-servers-
import {Server} from "../../entities/servers/Server";
import {KeyValue} from "@angular/common";
import {ActionService} from "../../services/action.service";
+import {Tf2dataService} from "../../services/tf2data.service";
@Component({
selector: 'app-servers-page',
@@ -14,7 +15,8 @@ export class ServersPageComponent implements OnInit {
servers:{[srv_name: string]:Server|any} = {};
constructor(private servers_ws:WebsocketServersListenerService,
- public actionService: ActionService) { }
+ public actionService: ActionService,
+ public tf2data: Tf2dataService) { }
ngOnInit(): void {
this.servers_ws.getServers().subscribe((r) => {
@@ -22,10 +24,6 @@ export class ServersPageComponent implements OnInit {
});
}
- private updateProp(obj: TObj, key: K, value: TObj[K]) {
- return {...obj, [key]: value};
- }
-
setServers(servers: {[srv_name: string]:Server|any}) {
const keys_current = Object.keys(this.servers);
const keys_update = Object.keys(servers);
diff --git a/src/app/services/action.service.ts b/src/app/services/action.service.ts
index b2f451f..85a4a84 100644
--- a/src/app/services/action.service.ts
+++ b/src/app/services/action.service.ts
@@ -20,7 +20,8 @@ export class ActionService {
return true;
}
- public goToUrlViaRouter(...url: string[]): boolean {
+ public goToUrlViaRouter(url: string[]|null|undefined): boolean {
+ if (url == null) return false;
this.router.navigate(url)
return true;
}
diff --git a/src/app/services/tf2data.service.ts b/src/app/services/tf2data.service.ts
new file mode 100644
index 0000000..8aec175
--- /dev/null
+++ b/src/app/services/tf2data.service.ts
@@ -0,0 +1,28 @@
+import { Injectable } from '@angular/core';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class Tf2dataService {
+ TFClassType: string[] = [
+ "ХЗ",
+ "Скаут",
+ "Снайпер",
+ "Солдат",
+ "Подрывник",
+ "Медик",
+ "Пулеметчик",
+ "Пиро",
+ "Шпион",
+ "Инженер"
+ ]
+
+ TFTeam: string[] = [
+ "ХЗ",
+ "Наблюдатель",
+ "Красная",
+ "Синия"
+ ]
+
+ constructor() { }
+}
diff --git a/src/styles.scss b/src/styles.scss
index 69479b8..f16e383 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -67,7 +67,7 @@ span {
font-family: LatoBlack, Roboto, "Helvetica Neue", sans-serif;
}
-.mat-card-subtitle {
+.mat-card-subtitle, mat-card-content {
font-family: LatoThin, Roboto, "Helvetica Neue", sans-serif;
}
@@ -194,3 +194,14 @@ span {
gap: 24px;
}
+.responsive-grid-100 {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
+ gap: 24px;
+}
+
+.responsive-grid-300 {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
+ gap: 24px;
+}