12 changed files with 291 additions and 10 deletions
@ -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; |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
<div class="content-in-center-header" style="flex-direction: column;"> |
||||
|
<h1>О нас</h1> |
||||
|
<h3>Ваши любимые "Факты 13". Существуем с 2018 по {{getYear()}}!</h3> |
||||
|
</div> |
||||
|
|
||||
|
<div class="content-in-center"> |
||||
|
<div class="content-in-border"> |
||||
|
<p>Факты 13 — это дружный сервачок русского народа, где вы можете хорошо отдохнуть со своими друзьями или тупыми рандомами после школы или завода.</p> |
||||
|
</div> |
||||
|
|
||||
|
<div class="content-in-border"> |
||||
|
<p>У нас обширный список серверов, на котором стоят уникальные карты, сделанные картоделом <a href="https://steamcommunity.com/id/pycckuu_nytuh/">Русский Путин</a></p> |
||||
|
</div> |
||||
|
|
||||
|
<div class="content-in-border"> |
||||
|
<p>Прекрасные плагины недающие заскучать и написанные таким же прекрасным кодером <a href="https://steamcommunity.com/id/catxakep/">ОТДЫХАЕМ</a></p> |
||||
|
</div> |
||||
|
|
||||
|
<div class="content-in-border"> |
||||
|
<p>Зачем ждать? Заходи сейчас! Если админ не разлил пиво на сервера</p> |
||||
|
</div> |
||||
|
|
||||
|
<div class="content-in-border"> |
||||
|
<p>Мы стараемся держаться открытости говнокода, чтоб у вас не было мысли что мы пытаемся вас наебать. Можешь проверить кпопки ниже.</p> |
||||
|
<div class="container responsive-grid-250"> |
||||
|
<mat-card (click)="actionService.goToUrlViaTab('https://git.pblr-nyk.pro/gsd/Facti13.Web.Backend.Java.V2')"> |
||||
|
<mat-card-title>Backend</mat-card-title> |
||||
|
<mat-card-subtitle>"стабильность"</mat-card-subtitle> |
||||
|
</mat-card> |
||||
|
<mat-card (click)="actionService.goToUrlViaTab('https://git.pblr-nyk.pro/gsd/Facti13.Frontend.Angular')"> |
||||
|
<mat-card-title>Frontend</mat-card-title> |
||||
|
<mat-card-subtitle>"дизайн"</mat-card-subtitle> |
||||
|
</mat-card> |
||||
|
<mat-card (click)="actionService.goToUrlViaTab('https://git.pblr-nyk.pro/gsd/Facti13.HundredPlayers.Plugins')"> |
||||
|
<mat-card-title>Плагины</mat-card-title> |
||||
|
<mat-card-subtitle>не все</mat-card-subtitle> |
||||
|
</mat-card> |
||||
|
<mat-card (click)="actionService.goToUrlViaTab('https://git.pblr-nyk.pro/gsd/Facti13.Bot.Discord.V2')"> |
||||
|
<mat-card-title>DiscordBot</mat-card-title> |
||||
|
<mat-card-subtitle>гебня бот</mat-card-subtitle> |
||||
|
</mat-card> |
||||
|
<mat-card (click)="actionService.goToUrlViaTab('https://git.pblr-nyk.pro/gsd/SourceManager')"> |
||||
|
<mat-card-title>SourceManager</mat-card-title> |
||||
|
<mat-card-subtitle>руль этой помойки</mat-card-subtitle> |
||||
|
</mat-card> |
||||
|
<mat-card (click)="actionService.goToUrlViaTab('https://git.pblr-nyk.pro/gsd/Facti13.SteamTradeBot.JS.v1')"> |
||||
|
<mat-card-title>TradeBot</mat-card-title> |
||||
|
<mat-card-subtitle>иногда работает</mat-card-subtitle> |
||||
|
</mat-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
@ -0,0 +1,3 @@ |
|||||
|
::ng-deep mat-card { |
||||
|
cursor: pointer; |
||||
|
} |
@ -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(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -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: ` |
||||
|
<div style="padding-bottom: 10px;"> |
||||
|
<mat-chip-list> |
||||
|
<mat-chip [matMenuTriggerFor]="addFilter">Искать по...</mat-chip> |
||||
|
<mat-menu #addFilter> |
||||
|
<button mat-menu-item (click)="filter.addAccountToSearch('')" [disabled]="account_id!=null">Профилю</button> |
||||
|
<button mat-menu-item [matMenuTriggerFor]="timeSelect">Времени</button> |
||||
|
</mat-menu> |
||||
|
<mat-menu #timeSelect> |
||||
|
<button mat-menu-item (click)="filter.addEndTimeToSearch()">До ...</button> |
||||
|
<button mat-menu-item (click)="filter.addBeginTimeToSearch()">После ...</button> |
||||
|
</mat-menu> |
||||
|
|
||||
|
<mat-chip *ngIf="filter.updated" (click)="updateData()">Обновить</mat-chip> |
||||
|
<app-filter-mat-chip-account |
||||
|
[filter]="filter" |
||||
|
[hidden]="account_id!=null" |
||||
|
></app-filter-mat-chip-account> |
||||
|
<app-filter-mat-chip-date-begin |
||||
|
[filter]="filter"> |
||||
|
</app-filter-mat-chip-date-begin> |
||||
|
<app-filter-mat-chip-date-end |
||||
|
[filter]="filter"> |
||||
|
</app-filter-mat-chip-date-end> |
||||
|
</mat-chip-list> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="loading-shade" |
||||
|
*ngIf="loading || err"> |
||||
|
<mat-spinner *ngIf="loading"></mat-spinner> |
||||
|
<div class="err" *ngIf="err"> |
||||
|
Слишком много запросов или сервер не отвечает, обнови страницу. |
||||
|
<br> |
||||
|
<button mat-button (click)="err=false; loading=false">Закрыть</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<table mat-table [dataSource]="dataSource" style="width: 100%"> |
||||
|
<ng-container matColumnDef="accountName"> |
||||
|
<th mat-header-cell *matHeaderCellDef> Имя игрока </th> |
||||
|
<td mat-cell *matCellDef="let row" [matMenuTriggerFor]="accountMenu"> {{row.accountName}} |
||||
|
<mat-menu #accountMenu> |
||||
|
<button mat-menu-item (click)="filter.addAccountToSearch(row.accountName)" [disabled]="!row.accountName">Добавить в поиск</button> |
||||
|
<button mat-menu-item (click)="filter.addAccountToSearch('[U:1:'+row.accountId+']')">Добавить в поиск используя ID</button> |
||||
|
<button mat-menu-item (click)="authService.searchPlayer(row.accountId)">Открыть профиль</button> |
||||
|
</mat-menu></td> |
||||
|
</ng-container> |
||||
|
<ng-container matColumnDef="timestamp"> |
||||
|
<th mat-header-cell *matHeaderCellDef> Время </th> |
||||
|
<td mat-cell *matCellDef="let row" [matMenuTriggerFor]="dateMenu"> {{row.timestamp | date:"HH:mm dd/MM/yyyy"}} |
||||
|
<mat-menu #dateMenu> |
||||
|
<button mat-menu-item (click)="filter.addEndTimeToSearch(row.timestamp)">Искать до {{row.timestamp | date:"HH:mm:ss dd/MM/yyyy"}}</button> |
||||
|
<button mat-menu-item (click)="filter.addBeginTimeToSearch(row.timestamp)">Искать после {{row.timestamp | date:"HH:mm:ss dd/MM/yyyy"}}</button> |
||||
|
</mat-menu></td> |
||||
|
</ng-container> |
||||
|
<ng-container matColumnDef="status"> |
||||
|
<th mat-header-cell *matHeaderCellDef>Статус</th> |
||||
|
<td mat-cell *matCellDef="let row"> {{row.status}}</td> |
||||
|
</ng-container> |
||||
|
<ng-container matColumnDef="amount"> |
||||
|
<th mat-header-cell *matHeaderCellDef>Выдано на</th> |
||||
|
<td mat-cell *matCellDef="let row"> {{getFancyAmount(row.amount)}}</td> |
||||
|
</ng-container> |
||||
|
|
||||
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||
|
|
||||
|
<!-- Row shown when there is no matching data. --> |
||||
|
<div *ngIf="!loading"> |
||||
|
<tr class="mat-row" *matNoDataRow> |
||||
|
<td class="mat-cell" colspan="4">Но никто не пришел...</td> |
||||
|
</tr> |
||||
|
</div> |
||||
|
</table> |
||||
|
|
||||
|
<mat-paginator |
||||
|
[pageSizeOptions]="[5, 10, 25, 100]" |
||||
|
[pageSize]="10" |
||||
|
(page)="updateData()" |
||||
|
></mat-paginator> |
||||
|
</div> |
||||
|
` |
||||
|
}) |
||||
|
export class DonateSearchTable extends AbstractSearchTable<DonateStat, SearchFilter> { |
||||
|
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<DonateStat>(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)} день`; |
||||
|
} |
||||
|
} |
@ -1,3 +1,3 @@ |
|||||
h2 { |
h2,h5,h4 { |
||||
color: #000000; |
color: #000000; |
||||
} |
} |
||||
|
Loading…
Reference in new issue