diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 357ef21..c4faa19 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -9,6 +9,7 @@ import {MessagesPageComponent} from "./pages/messages-page/messages-page.compone
import {VipPageComponent} from "./pages/vip-page/vip-page.component";
import {DowngamePageComponent} from "./pages/downgame-page/downgame-page.component";
import {StatisticPageComponent} from "./pages/statistic-page/statistic-page.component";
+import {AboutPageComponent} from "./pages/about-page/about-page.component";
const routes: Routes = [
{ path: "", component: MainPageComponent},
@@ -19,7 +20,8 @@ const routes: Routes = [
{ path: "messages", component: MessagesPageComponent },
{ path: "vip", component: VipPageComponent },
{ path: "putisRun", component: DowngamePageComponent },
- { path: "statistic", component: StatisticPageComponent }
+ { path: "statistic", component: StatisticPageComponent },
+ { path: "about", component: AboutPageComponent }
];
@NgModule({
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 775ca5c..54f971f 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -68,6 +68,8 @@ import {MatCheckboxModule} from "@angular/material/checkbox";
import {PromocodeService} from "./services/promocode.service";
import { DowngamePageComponent } from './pages/downgame-page/downgame-page.component';
import { StatisticPageComponent } from './pages/statistic-page/statistic-page.component';
+import {DonateSearchTable} from "./pages/internal-components/DonateSearchTable";
+import { AboutPageComponent } from './pages/about-page/about-page.component';
registerLocaleData(localeRu, "ru")
@@ -88,6 +90,7 @@ registerLocaleData(localeRu, "ru")
MessageSearchTable,
BanlistSearchTable,
AnnoncesListCarules,
+ DonateSearchTable,
//search filters
FilterMatChipAccount,
FilterMatChipMessage,
@@ -105,7 +108,8 @@ registerLocaleData(localeRu, "ru")
VipFreeDialog,
VipPromocodeDialog,
DowngamePageComponent,
- StatisticPageComponent
+ StatisticPageComponent,
+ AboutPageComponent
],
imports: [
BrowserModule,
diff --git a/src/app/entities/DonateStat.ts b/src/app/entities/DonateStat.ts
new file mode 100644
index 0000000..9d30c0c
--- /dev/null
+++ b/src/app/entities/DonateStat.ts
@@ -0,0 +1,12 @@
+export class DonateStat {
+ amount!:number;
+ utime!:number;
+ timestamp!:Date;
+ accountId!:number;
+ tf2Keys!:number;
+ tf2Refs!:number;
+ rubles!:number;
+ beExtended!:string;
+ accountName!:string;
+ status!:string;
+}
diff --git a/src/app/pages/about-page/about-page.component.html b/src/app/pages/about-page/about-page.component.html
new file mode 100644
index 0000000..318f975
--- /dev/null
+++ b/src/app/pages/about-page/about-page.component.html
@@ -0,0 +1,52 @@
+
+
+
+
+
Факты 13 — это дружный сервачок русского народа, где вы можете хорошо отдохнуть со своими друзьями или тупыми рандомами после школы или завода.
+
+
+
+
У нас обширный список серверов, на котором стоят уникальные карты, сделанные картоделом Русский Путин
+
+
+
+
Прекрасные плагины недающие заскучать и написанные таким же прекрасным кодером ОТДЫХАЕМ
+
+
+
+
Зачем ждать? Заходи сейчас! Если админ не разлил пиво на сервера
+
+
+
+
Мы стараемся держаться открытости говнокода, чтоб у вас не было мысли что мы пытаемся вас наебать. Можешь проверить кпопки ниже.
+
+
+ Backend
+ "стабильность"
+
+
+ Frontend
+ "дизайн"
+
+
+ Плагины
+ не все
+
+
+ DiscordBot
+ гебня бот
+
+
+ SourceManager
+ руль этой помойки
+
+
+ TradeBot
+ иногда работает
+
+
+
+
diff --git a/src/app/pages/about-page/about-page.component.scss b/src/app/pages/about-page/about-page.component.scss
new file mode 100644
index 0000000..d6eca91
--- /dev/null
+++ b/src/app/pages/about-page/about-page.component.scss
@@ -0,0 +1,3 @@
+::ng-deep mat-card {
+ cursor: pointer;
+}
diff --git a/src/app/pages/about-page/about-page.component.ts b/src/app/pages/about-page/about-page.component.ts
new file mode 100644
index 0000000..8d99e9d
--- /dev/null
+++ b/src/app/pages/about-page/about-page.component.ts
@@ -0,0 +1,20 @@
+import { Component, OnInit } from '@angular/core';
+import {ActionService} from "../../services/action.service";
+
+@Component({
+ selector: 'app-about-page',
+ templateUrl: './about-page.component.html',
+ styleUrls: ['./about-page.component.scss']
+})
+export class AboutPageComponent implements OnInit {
+
+ constructor(public actionService: ActionService) { }
+
+ ngOnInit(): void {
+ }
+
+ getYear():number {
+ return new Date().getFullYear();
+ }
+
+}
diff --git a/src/app/pages/internal-components/DonateSearchTable.ts b/src/app/pages/internal-components/DonateSearchTable.ts
new file mode 100644
index 0000000..cc2fa76
--- /dev/null
+++ b/src/app/pages/internal-components/DonateSearchTable.ts
@@ -0,0 +1,131 @@
+import {AbstractSearchTable} from "./abstract-search-table.component";
+import {SearchFilter} from "../../entities/search/SearchFilter";
+import {DonateStat} from "../../entities/DonateStat";
+import {Component} from "@angular/core";
+import {AuthService} from "../../services/auth.service";
+import {ServerService} from "../../services/server.service";
+import {PlayerService} from "../../services/player.service";
+import {ActivatedRoute, Router} from "@angular/router";
+import {VipService} from "../../services/vip.service";
+import {MatTableDataSource} from "@angular/material/table";
+
+@Component({
+ selector: 'app-donate-search-table',
+ template: `
+
+
+ Искать по...
+
+ Профилю
+ Времени
+
+
+ До ...
+ После ...
+
+
+ Обновить
+
+
+
+
+
+
+
+
+
+
+
+ Слишком много запросов или сервер не отвечает, обнови страницу.
+
+ Закрыть
+
+
+
+
+ Имя игрока
+ {{row.accountName}}
+
+ Добавить в поиск
+ Добавить в поиск используя ID
+ Открыть профиль
+
+
+
+ Время
+ {{row.timestamp | date:"HH:mm dd/MM/yyyy"}}
+
+ Искать до {{row.timestamp | date:"HH:mm:ss dd/MM/yyyy"}}
+ Искать после {{row.timestamp | date:"HH:mm:ss dd/MM/yyyy"}}
+
+
+
+ Статус
+ {{row.status}}
+
+
+ Выдано на
+ {{getFancyAmount(row.amount)}}
+
+
+
+
+
+
+
+
+ Но никто не пришел...
+
+
+
+
+
+
+ `
+})
+export class DonateSearchTable extends AbstractSearchTable {
+ displayedColumns: string[] = ['accountName', 'timestamp', 'status', 'amount'];
+
+ constructor(authService: AuthService,
+ serverService: ServerService,
+ playerService: PlayerService,
+ router: Router,
+ route: ActivatedRoute,
+ private vipService: VipService) {
+ super(authService, serverService, playerService, route, router);
+ super.filter = new SearchFilter();
+ }
+
+ private getDonateStat(): boolean {
+ this.filter.updated = false;
+ this.loading = true;
+ this.vipService.getDonateStat(this.filter, this.paginator).subscribe(
+ (res) => {
+ this.dataSource = new MatTableDataSource(res.data)
+ this.err = false;
+ }, (e) => this.err = true, () => this.loading = false
+ )
+ return true;
+ }
+
+ override updateData() {
+ super.updateData();
+ this.getDonateStat();
+ }
+
+ getFancyAmount(amount: number):string {
+ if (amount == -1) return '';
+ if (amount <= 24 * 60 * 60) return `${amount/60} минут`;
+ else return `${amount/(24 * 60 * 60)} день`;
+ }
+}
diff --git a/src/app/pages/profile-page/profile-page.component.html b/src/app/pages/profile-page/profile-page.component.html
index ad65b7e..dc5f108 100644
--- a/src/app/pages/profile-page/profile-page.component.html
+++ b/src/app/pages/profile-page/profile-page.component.html
@@ -123,15 +123,13 @@
-
+
История получения VIP
-
-
Табличка где каво когда
-
+
diff --git a/src/app/pages/statistic-page/statistic-page.component.html b/src/app/pages/statistic-page/statistic-page.component.html
index 0cb10de..f0c544a 100644
--- a/src/app/pages/statistic-page/statistic-page.component.html
+++ b/src/app/pages/statistic-page/statistic-page.component.html
@@ -51,10 +51,31 @@
Уникальные игроки
-
+
За "уникальность" берется игрок который зашел за данный период первый раз и поиграл более 5 минут
+
+
+ {{uniq.day}}
+ игроков за день
+
+
+ {{uniq.month}}
+ игроков за месяц
+
+
+ {{uniq.year}}
+ игроков за год
+
+
+ {{uniq.total}}
+ игроков за всё время
+
+
Последние выданые випки
-
+
diff --git a/src/app/pages/statistic-page/statistic-page.component.scss b/src/app/pages/statistic-page/statistic-page.component.scss
index 552e12c..5fdaa66 100644
--- a/src/app/pages/statistic-page/statistic-page.component.scss
+++ b/src/app/pages/statistic-page/statistic-page.component.scss
@@ -1,3 +1,3 @@
-h2 {
+h2,h5,h4 {
color: #000000;
}
diff --git a/src/app/pages/statistic-page/statistic-page.component.ts b/src/app/pages/statistic-page/statistic-page.component.ts
index 13e5361..c59c36a 100644
--- a/src/app/pages/statistic-page/statistic-page.component.ts
+++ b/src/app/pages/statistic-page/statistic-page.component.ts
@@ -3,6 +3,9 @@ import {GraphService} from "../../services/graph.service";
import {Chart} from "chart.js/auto";
import {GraphData} from "../../entities/graph/GraphData";
import {ActionService} from "../../services/action.service";
+import {Uniq} from "../../entities/servers/Uniq";
+import {ServerService} from "../../services/server.service";
+import {AuthService} from "../../services/auth.service";
export interface Period {
name: string
@@ -38,10 +41,33 @@ export class StatisticPageComponent implements OnInit {
chart!:Chart;
+ uniq!: Uniq;
+
constructor(private graphService: GraphService,
- private actionService: ActionService) { }
+ private actionService: ActionService,
+ private serverService: ServerService,
+ public authService: AuthService) { }
ngOnInit(): void {
+ this.getServers();
+ this.getUniq();
+ }
+
+ getUniq() {
+ this.serverService.getStats("uniq").subscribe(
+ (res) => this.uniq = res.export()
+ );
+ }
+
+ getServers() {
+ this.serverService.servers.subscribe(
+ (res) => {
+ const keys = Object.keys(res.data);
+ for (const key of keys) {
+ this.serverList.push({name: res.data[key].name, server_id: key});
+ }
+ }
+ )
}
getGraph() {
diff --git a/src/app/services/vip.service.ts b/src/app/services/vip.service.ts
index a102c29..13ae577 100644
--- a/src/app/services/vip.service.ts
+++ b/src/app/services/vip.service.ts
@@ -2,6 +2,11 @@ import { Injectable } from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {map, Observable} from "rxjs";
import {VipBuy} from "../entities/VipBuy";
+import {SearchFilter} from "../entities/search/SearchFilter";
+import {MatPaginator} from "@angular/material/paginator";
+import {PagingAndSortingPaginator} from "../entities/PagingAndSortingPaginator";
+import {Ban} from "../entities/ban/Ban";
+import {DonateStat} from "../entities/DonateStat";
@Injectable({
providedIn: 'root'
@@ -17,4 +22,11 @@ export class VipService {
getFreeVip(): Observable {
return this.http.post(`api/profile/current/freevip`, null);
}
+
+ getDonateStat(filters: SearchFilter, paginator: MatPaginator | undefined) {
+ return this.http.post(`api/profile/donate`, filters,
+ {params: {size: paginator?paginator.pageSize:20, page: paginator?paginator.pageIndex:0}}).pipe(
+ map((res) => PagingAndSortingPaginator.newObj().fromData(res).updatePaginator(paginator))
+ );
+ }
}