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