From dda2e2f5f6ecefa63ec463540ec6977594810056 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 12 Jul 2023 22:33:43 +0200 Subject: [PATCH] Improved achievement component #268_achievements --- kdb-web/package.json | 2 +- kdb-web/src/app/models/data/user.model.ts | 2 ++ .../components/achievement/achievement.component.html | 4 ++-- .../components/achievement/achievement.component.ts | 3 +++ kdb-web/src/assets/config.json | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kdb-web/package.json b/kdb-web/package.json index e77d9ec0..70c9306f 100644 --- a/kdb-web/package.json +++ b/kdb-web/package.json @@ -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", diff --git a/kdb-web/src/app/models/data/user.model.ts b/kdb-web/src/app/models/data/user.model.ts index fb36964e..0b054cc6 100644 --- a/kdb-web/src/app/models/data/user.model.ts +++ b/kdb-web/src/app/models/data/user.model.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; diff --git a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html index 7bdfc233..2c080fd2 100644 --- a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html +++ b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html @@ -132,7 +132,7 @@ - + {{achievement.attribute}} @@ -143,7 +143,7 @@ - + {{achievement.operator}} diff --git a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts index 5eb90432..2836c8b7 100644 --- a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts +++ b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts @@ -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( diff --git a/kdb-web/src/assets/config.json b/kdb-web/src/assets/config.json index 57eaafa7..a2d9a6c2 100644 --- a/kdb-web/src/assets/config.json +++ b/kdb-web/src/assets/config.json @@ -5,7 +5,7 @@ "WebVersion": { "Major": "1", "Minor": "0", - "Micro": "7" + "Micro": "dev268_achievements" }, "Themes": [ {