Improved achievement component #268_achievements
This commit is contained in:
parent
b99dd1bded
commit
3507623c92
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kdb-web",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.dev268_achievements",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"update-version": "ts-node-esm update-version.ts",
|
||||
|
@ -10,6 +10,8 @@ export interface User extends DataWithHistory {
|
||||
discordId?: number;
|
||||
name?: string;
|
||||
xp?: number;
|
||||
message_count?: number;
|
||||
reaction_count?: number;
|
||||
ontime?: number;
|
||||
level?: Level;
|
||||
server?: Server;
|
||||
|
@ -132,7 +132,7 @@
|
||||
<td>
|
||||
<p-cellEditor>
|
||||
<ng-template pTemplate="input">
|
||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="achievement.attribute">
|
||||
<p-dropdown [options]="attributes" [(ngModel)]="achievement.attribute" placeholder="{{'view.server.achievements.headers.attribute' | translate}}"></p-dropdown>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="output">
|
||||
{{achievement.attribute}}
|
||||
@ -143,7 +143,7 @@
|
||||
<td>
|
||||
<p-cellEditor>
|
||||
<ng-template pTemplate="input">
|
||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="achievement.operator">
|
||||
<p-dropdown [options]="operators" [(ngModel)]="achievement.operator" placeholder="{{'view.server.achievements.headers.operator' | translate}}"></p-dropdown>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="output">
|
||||
{{achievement.operator}}
|
||||
|
@ -60,6 +60,9 @@ export class AchievementComponent implements OnInit, OnDestroy {
|
||||
private server: Server = {};
|
||||
public user: UserDTO | null = null;
|
||||
|
||||
public operators = ["==", "!=", "<=", ">=", "<", ">"];
|
||||
public attributes = ["xp", "message_count", "reaction_count", "ontime", "level"]
|
||||
|
||||
query: string = Queries.achievementWithHistoryQuery;
|
||||
|
||||
public constructor(
|
||||
|
@ -5,7 +5,7 @@
|
||||
"WebVersion": {
|
||||
"Major": "1",
|
||||
"Minor": "0",
|
||||
"Micro": "7"
|
||||
"Micro": "dev268_achievements"
|
||||
},
|
||||
"Themes": [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user