1.0.0 #253
@ -38,6 +38,10 @@ class UserJoinedGameServer(TableABC):
|
||||
def game_server(self) -> str:
|
||||
return self._game_server
|
||||
|
||||
@property
|
||||
def time(self) -> float:
|
||||
return round((self.leaved_on - self.joined_on).total_seconds() / 3600, 2)
|
||||
|
||||
@property
|
||||
def joined_on(self) -> datetime:
|
||||
return self._joined_on
|
||||
|
@ -2,6 +2,7 @@ type UserJoinedGameServer implements TableQuery {
|
||||
id: ID
|
||||
gameServer: String
|
||||
user: User
|
||||
time: Float
|
||||
joinedOn: String
|
||||
leavedOn: String
|
||||
|
||||
|
@ -28,6 +28,10 @@ class UserJoinedGameServerQuery(DataQueryABC):
|
||||
def resolve_user(x: UserJoinedGameServer, *_):
|
||||
return x.user
|
||||
|
||||
@staticmethod
|
||||
def resolve_time(x: UserJoinedGameServer, *_):
|
||||
return x.time
|
||||
|
||||
@staticmethod
|
||||
def resolve_joined_on(x: UserJoinedGameServer, *_):
|
||||
return x.joined_on
|
||||
|
@ -3,6 +3,7 @@ import { Level, LevelFilter } from "./level.model";
|
||||
import { Server, ServerFilter } from "./server.model";
|
||||
import { UserJoinedServer } from "./user_joined_server.model";
|
||||
import { UserJoinedVoiceChannel } from "./user_joined_voice_channel.model";
|
||||
import { UserJoinedGameServer } from "./user_joined_game_server.model";
|
||||
|
||||
export interface User extends Data {
|
||||
id?: number;
|
||||
@ -22,7 +23,7 @@ export interface User extends Data {
|
||||
joinedVoiceChannels?: UserJoinedVoiceChannel[];
|
||||
|
||||
userJoinedGameServerCount?: number;
|
||||
userJoinedGameServers?: [];
|
||||
userJoinedGameServers?: UserJoinedGameServer[];
|
||||
}
|
||||
|
||||
export interface UserFilter {
|
||||
|
11
kdb-web/src/app/models/data/user_joined_game_server.model.ts
Normal file
11
kdb-web/src/app/models/data/user_joined_game_server.model.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { Data } from "./data.model";
|
||||
import { User } from "./user.model";
|
||||
|
||||
export interface UserJoinedGameServer extends Data {
|
||||
id: number;
|
||||
gameServer: string;
|
||||
user: User;
|
||||
time: number;
|
||||
joinedOn: string;
|
||||
leavedOn: string;
|
||||
}
|
@ -122,6 +122,7 @@ export class Queries {
|
||||
userJoinedGameServers {
|
||||
id
|
||||
gameServer
|
||||
time
|
||||
joinedOn
|
||||
leavedOn
|
||||
}
|
||||
|
@ -224,7 +224,7 @@
|
||||
|
||||
<ng-template pTemplate="emptymessage">
|
||||
<tr>
|
||||
<td colspan="7">{{'admin.auth_users.no_entries_found' | translate}}</td>
|
||||
<td colspan="9">{{'admin.auth_users.no_entries_found' | translate}}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
|
@ -19,6 +19,7 @@ import { AuthRolePipe } from './pipes/auth-role.pipe';
|
||||
import { IpAddressPipe } from './pipes/ip-address.pipe';
|
||||
import { BoolPipe } from './pipes/bool.pipe';
|
||||
import { PanelMenuModule } from 'primeng/panelmenu';
|
||||
import { PanelModule } from "primeng/panel";
|
||||
|
||||
|
||||
|
||||
@ -47,6 +48,7 @@ import { PanelMenuModule } from 'primeng/panelmenu';
|
||||
TranslateModule,
|
||||
DynamicDialogModule,
|
||||
PanelMenuModule,
|
||||
PanelModule,
|
||||
],
|
||||
exports: [
|
||||
ButtonModule,
|
||||
@ -66,6 +68,7 @@ import { PanelMenuModule } from 'primeng/panelmenu';
|
||||
TranslateModule,
|
||||
DynamicDialogModule,
|
||||
PanelMenuModule,
|
||||
PanelModule,
|
||||
AuthRolePipe,
|
||||
IpAddressPipe,
|
||||
BoolPipe,
|
||||
|
@ -238,7 +238,7 @@
|
||||
<ng-template pTemplate="emptymessage">
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td colspan="7">{{'view.server.members.no_entries_found' | translate}}</td>
|
||||
<td colspan="10">{{'view.server.members.no_entries_found' | translate}}</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</ng-template>
|
||||
|
@ -77,51 +77,73 @@
|
||||
</div>
|
||||
|
||||
<div class="content-divider"></div>
|
||||
<div class="content-row">
|
||||
<h3>{{'view.server.profile.joined_voice_channel.header' | translate}}</h3>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let join of user.joinedVoiceChannels;">
|
||||
<div class="content-row">
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_voice_channel.time' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.time}} {{'general.hours' | translate}}</div>
|
||||
</div>
|
||||
<p-panel header="{{'view.server.profile.joined_voice_channel.header' | translate}}" [toggleable]="true">
|
||||
<div *ngFor="let join of user.joinedVoiceChannels;">
|
||||
<div class="content-row">
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_voice_channel.time' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.time}} {{'general.hours' | translate}}</div>
|
||||
</div>
|
||||
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_voice_channel.channel' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.channelName}}</div>
|
||||
</div>
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_voice_channel.channel' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.channelName}}</div>
|
||||
</div>
|
||||
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_voice_channel.joined_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'common.joined_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_voice_channel.leaved_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'common.leaved_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-divider"></div>
|
||||
<div class="content-row">
|
||||
<h3>{{'view.server.profile.joined_server.header' | translate}}</h3>
|
||||
</div>
|
||||
</p-panel>
|
||||
<p-panel header="{{'view.server.profile.joined_game_server.header' | translate}}" [toggleable]="true">
|
||||
<div *ngFor="let join of user.userJoinedGameServers;">
|
||||
<div class="content-row">
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_game_server.time' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.time}} {{'general.hours' | translate}}</div>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let join of user.joinedServers;">
|
||||
<div class="content-row">
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_server.joined_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_game_server.name' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.gameServer}}</div>
|
||||
</div>
|
||||
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'view.server.profile.joined_server.leaved_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'common.joined_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'common.leaved_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p-panel>
|
||||
|
||||
<p-panel header="{{'view.server.profile.joined_server.header' | translate}}" [toggleable]="true">
|
||||
<div *ngFor="let join of user.joinedServers;">
|
||||
<div class="content-row">
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'common.joined_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
|
||||
<div class="content-column">
|
||||
<div class="content-data-name">{{'common.leaved_at' | translate}}:</div>
|
||||
<div class="content-data-value">{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p-panel>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -173,15 +173,16 @@
|
||||
"joined_voice_channel": {
|
||||
"header": "Sprachkanal-beitritte",
|
||||
"time": "Zeit",
|
||||
"channel": "Sprachkanal",
|
||||
"joined_at": "Beigetreten am",
|
||||
"leaved_at": "Verlassen am"
|
||||
"channel": "Sprachkanal"
|
||||
},
|
||||
"joined_game_server": {
|
||||
"header": "Gameserver-beitritte",
|
||||
"time": "Spielzeit",
|
||||
"name": "Gameserver"
|
||||
},
|
||||
"joined_server": {
|
||||
"header": "Server-beitritte",
|
||||
"time": "Zeit",
|
||||
"joined_at": "Beigetreten am",
|
||||
"leaved_at": "Verlassen am"
|
||||
"time": "Zeit"
|
||||
},
|
||||
"permission_denied": "Zugriff Verweigert!",
|
||||
"permission_denied_d": "Du musst Moderator sein, um andere Profile sehen zu können!"
|
||||
@ -264,6 +265,8 @@
|
||||
"common": {
|
||||
"created_at": "Erstellt am",
|
||||
"modified_at": "Bearbeitet am",
|
||||
"joined_at": "Beigetreten am",
|
||||
"leaved_at": "Verlassen am",
|
||||
"bool_as_string": {
|
||||
"true": "Ja",
|
||||
"false": "Nein"
|
||||
|
@ -152,6 +152,10 @@ header {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
p-panel {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.content-input-field {
|
||||
width: 50% !important;
|
||||
margin: 0 !important;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user