From e785bddf2ec4efc35cfd94f08c544a2f3b6175d0 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 6 Sep 2024 19:39:50 +0200 Subject: [PATCH] Guild & Level can be null --- bot/src/bot_data/model/auto_role_rule.py | 5 +- .../bot_data/model/auto_role_rule_history.py | 6 +- bot/src/bot_data/model/level.py | 4 +- bot/src/bot_data/model/server.py | 9 +- bot/src/bot_data/model/server_history.py | 10 +- bot/src/bot_data/model/short_role_name.py | 5 +- .../bot_data/model/short_role_name_history.py | 6 +- bot/src/bot_data/model/user.py | 14 +- .../filter/auto_role_rule_filter.py | 2 + .../filter/short_role_name_filter.py | 2 + bot/src/bot_graphql/filter/user_filter.py | 2 + bot/src/bot_graphql/queries/server_query.py | 4 +- .../modules/level/service/level_service.py | 26 +++- web/package.json | 110 +++++++-------- .../server/members/members.component.html | 96 ++++++------- .../server/profile/profile.component.html | 132 +++++++++--------- web/src/assets/version.json | 12 +- 17 files changed, 250 insertions(+), 195 deletions(-) diff --git a/bot/src/bot_data/model/auto_role_rule.py b/bot/src/bot_data/model/auto_role_rule.py index 8729b6ec..992fdfe0 100644 --- a/bot/src/bot_data/model/auto_role_rule.py +++ b/bot/src/bot_data/model/auto_role_rule.py @@ -1,4 +1,5 @@ from datetime import datetime +from typing import Optional from cpl_core.database import TableABC from cpl_core.dependency_injection import ServiceProviderABC @@ -48,8 +49,10 @@ class AutoRoleRule(TableABC): @property @ServiceProviderABC.inject - def role_name(self, bot: DiscordBotServiceABC) -> str: + def role_name(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.auto_role.server.discord_id) + if guild is None: + return None return guild.get_role(self.role_id).name @role_id.setter diff --git a/bot/src/bot_data/model/auto_role_rule_history.py b/bot/src/bot_data/model/auto_role_rule_history.py index c5a5ccd9..1acc86a2 100644 --- a/bot/src/bot_data/model/auto_role_rule_history.py +++ b/bot/src/bot_data/model/auto_role_rule_history.py @@ -1,3 +1,5 @@ +from typing import Optional + from cpl_core.dependency_injection import ServiceProviderABC from cpl_discord.service import DiscordBotServiceABC @@ -43,6 +45,8 @@ class AutoRoleRuleHistory(HistoryTableABC): @property @ServiceProviderABC.inject - def role_name(self, bot: DiscordBotServiceABC) -> str: + def role_name(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.auto_role.server.discord_id) + if guild is None: + return None return guild.get_role(self.role_id).name diff --git a/bot/src/bot_data/model/level.py b/bot/src/bot_data/model/level.py index 378d7fc6..6002e407 100644 --- a/bot/src/bot_data/model/level.py +++ b/bot/src/bot_data/model/level.py @@ -39,8 +39,10 @@ class Level(TableABC): @property @ServiceProviderABC.inject - def icon_url(self, bot: DiscordBotServiceABC) -> str: + def icon_url(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.server.discord_id) + if guild is None: + return None role = List(Role, guild.roles).where(lambda x: x.name == self._name).first_or_default() return None if role is None else role.icon diff --git a/bot/src/bot_data/model/server.py b/bot/src/bot_data/model/server.py index d86c6e97..de9d5b78 100644 --- a/bot/src/bot_data/model/server.py +++ b/bot/src/bot_data/model/server.py @@ -1,4 +1,5 @@ from datetime import datetime +from typing import Optional from cpl_core.database import TableABC from cpl_core.dependency_injection import ServiceProviderABC @@ -30,14 +31,18 @@ class Server(TableABC): @property @ServiceProviderABC.inject - def name(self, bot: DiscordBotServiceABC) -> str: + def name(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.discord_id) + if guild is None: + return None return None if guild is None else guild.name @property @ServiceProviderABC.inject - def icon_url(self, bot: DiscordBotServiceABC) -> str: + def icon_url(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.discord_id) + if guild is None: + return None return None if guild is None else guild.icon.url @staticmethod diff --git a/bot/src/bot_data/model/server_history.py b/bot/src/bot_data/model/server_history.py index e8c95934..f34ab64e 100644 --- a/bot/src/bot_data/model/server_history.py +++ b/bot/src/bot_data/model/server_history.py @@ -1,3 +1,5 @@ +from typing import Optional + from cpl_core.dependency_injection import ServiceProviderABC from cpl_discord.service import DiscordBotServiceABC @@ -32,12 +34,16 @@ class ServerHistory(HistoryTableABC): @property @ServiceProviderABC.inject - def name(self, bot: DiscordBotServiceABC) -> str: + def name(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.discord_id) + if guild is None: + return None return None if guild is None else guild.name @property @ServiceProviderABC.inject - def icon_url(self, bot: DiscordBotServiceABC) -> str: + def icon_url(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.discord_id) + if guild is None: + return None return None if guild is None else guild.icon.url diff --git a/bot/src/bot_data/model/short_role_name.py b/bot/src/bot_data/model/short_role_name.py index 4ddef4f1..d987f062 100644 --- a/bot/src/bot_data/model/short_role_name.py +++ b/bot/src/bot_data/model/short_role_name.py @@ -1,4 +1,5 @@ from datetime import datetime +from typing import Optional from cpl_core.database import TableABC from cpl_core.dependency_injection import ServiceProviderABC @@ -51,8 +52,10 @@ class ShortRoleName(TableABC): @property @ServiceProviderABC.inject - def role_name(self, bot: DiscordBotServiceABC) -> str: + def role_name(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self._server.discord_id) + if guild is None: + return None return guild.get_role(self.role_id).name @property diff --git a/bot/src/bot_data/model/short_role_name_history.py b/bot/src/bot_data/model/short_role_name_history.py index 90bbdc00..9c718af3 100644 --- a/bot/src/bot_data/model/short_role_name_history.py +++ b/bot/src/bot_data/model/short_role_name_history.py @@ -1,3 +1,5 @@ +from typing import Optional + from cpl_core.dependency_injection import ServiceProviderABC from cpl_discord.service import DiscordBotServiceABC @@ -47,8 +49,10 @@ class ShortRoleNameHistory(HistoryTableABC): @property @ServiceProviderABC.inject - def role_name(self, bot: DiscordBotServiceABC) -> str: + def role_name(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self._server.discord_id) + if guild is None: + return None return guild.get_role(self.role_id).name @property diff --git a/bot/src/bot_data/model/user.py b/bot/src/bot_data/model/user.py index e9c3b30b..1343df1b 100644 --- a/bot/src/bot_data/model/user.py +++ b/bot/src/bot_data/model/user.py @@ -53,15 +53,19 @@ class User(TableABC): @property @ServiceProviderABC.inject - def name(self, bot: DiscordBotServiceABC) -> str: + def name(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.server.discord_id) + if guild is None: + return None user = guild.get_member(self.discord_id) return None if user is None else user.name @property @ServiceProviderABC.inject - def icon_url(self, bot: DiscordBotServiceABC) -> str: + def icon_url(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.server.discord_id) + if guild is None: + return None user = guild.get_member(self.discord_id) return None if user is None else user.display_icon @@ -137,7 +141,7 @@ class User(TableABC): @property @ServiceProviderABC.inject - def level(self, services: ServiceProviderABC) -> Level: + def level(self, services: ServiceProviderABC) -> Optional[Level]: from modules.level.service.level_service import LevelService levels: LevelService = services.get_service(LevelService) @@ -175,8 +179,10 @@ class User(TableABC): @property @ServiceProviderABC.inject - def profile_picture_url(self, bot: DiscordBotServiceABC) -> str: + def profile_picture_url(self, bot: DiscordBotServiceABC) -> Optional[str]: guild = bot.get_guild(self.server.discord_id) + if guild is None: + return None user = guild.get_member(self._discord_id) return None if user is None or user.avatar is None else user.avatar.url diff --git a/bot/src/bot_graphql/filter/auto_role_rule_filter.py b/bot/src/bot_graphql/filter/auto_role_rule_filter.py index b9571d8f..f5360b5f 100644 --- a/bot/src/bot_graphql/filter/auto_role_rule_filter.py +++ b/bot/src/bot_graphql/filter/auto_role_rule_filter.py @@ -51,6 +51,8 @@ class AutoRoleRuleFilter(FilterABC): def get_role_name(x: AutoRoleRule): guild = self._bot.get_guild(x.auto_role.server.discord_id) + if guild is None: + return False name = guild.get_role(x.role_id).name return name == self._role_name or self._role_name in name diff --git a/bot/src/bot_graphql/filter/short_role_name_filter.py b/bot/src/bot_graphql/filter/short_role_name_filter.py index ea5a8bba..94b56153 100644 --- a/bot/src/bot_graphql/filter/short_role_name_filter.py +++ b/bot/src/bot_graphql/filter/short_role_name_filter.py @@ -57,6 +57,8 @@ class ShortRoleNameFilter(FilterABC): def get_role_name(x: ShortRoleName): guild = self._bot.get_guild(x.server.discord_id) + if guild is None: + return False name = guild.get_role(x.role_id).name return name == self._role_name or self._role_name in name diff --git a/bot/src/bot_graphql/filter/user_filter.py b/bot/src/bot_graphql/filter/user_filter.py index 53c130d5..90909de6 100644 --- a/bot/src/bot_graphql/filter/user_filter.py +++ b/bot/src/bot_graphql/filter/user_filter.py @@ -80,6 +80,8 @@ class UserFilter(FilterABC): def _get_member(user: User): guild = self._bot.get_guild(user.server.discord_id) + if guild is None: + return False member = guild.get_member(user.discord_id) return member is not None and (member.name == self._name or self._name in member.name) diff --git a/bot/src/bot_graphql/queries/server_query.py b/bot/src/bot_graphql/queries/server_query.py index 112a4555..355b6576 100644 --- a/bot/src/bot_graphql/queries/server_query.py +++ b/bot/src/bot_graphql/queries/server_query.py @@ -8,7 +8,6 @@ from bot_data.abc.achievement_repository_abc import AchievementRepositoryABC from bot_data.abc.auto_role_repository_abc import AutoRoleRepositoryABC from bot_data.abc.client_repository_abc import ClientRepositoryABC from bot_data.abc.game_server_repository_abc import GameServerRepositoryABC -from bot_data.abc.level_repository_abc import LevelRepositoryABC from bot_data.abc.scheduled_event_repository_abc import ScheduledEventRepositoryABC from bot_data.abc.server_config_repository_abc import ServerConfigRepositoryABC from bot_data.abc.short_role_name_repository_abc import ShortRoleNameRepositoryABC @@ -31,6 +30,7 @@ from bot_graphql.filter.short_role_name_filter import ShortRoleNameFilter from bot_graphql.filter.user_filter import UserFilter from bot_graphql.filter.user_warning_filter import UserWarningFilter from bot_graphql.model.server_statistics import ServerStatistics +from modules.level.service.level_service import LevelService class ServerQuery(DataQueryWithHistoryABC): @@ -41,7 +41,7 @@ class ServerQuery(DataQueryWithHistoryABC): db: DatabaseContextABC, auto_roles: AutoRoleRepositoryABC, clients: ClientRepositoryABC, - levels: LevelRepositoryABC, + levels: LevelService, game_servers: GameServerRepositoryABC, users: UserRepositoryABC, ujs: UserJoinedServerRepositoryABC, diff --git a/bot/src/modules/level/service/level_service.py b/bot/src/modules/level/service/level_service.py index 8f05d4d5..821d82ab 100644 --- a/bot/src/modules/level/service/level_service.py +++ b/bot/src/modules/level/service/level_service.py @@ -1,9 +1,12 @@ +from typing import Optional + import discord from cpl_core.configuration import ConfigurationABC from cpl_core.database.context import DatabaseContextABC from cpl_core.logging import LoggerABC from cpl_discord.container import Guild, Role, Member from cpl_discord.service import DiscordBotServiceABC +from cpl_query.extension import List from cpl_translation import TranslatePipe from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum @@ -40,13 +43,26 @@ class LevelService: self._message_service = message_service self._t = t - def _check_for_feature(self, user: User): - server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{user.server.discord_id}") + def _check_for_feature(self, discord_id: int): + server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{discord_id}") if not FeatureFlagsSettings.get_flag_from_dict(server_config.feature_flags, FeatureFlagsEnum.level_module): raise Exception(f"Feature {FeatureFlagsEnum.level_module.value} disabled") - def get_level(self, user: User) -> Level: - self._check_for_feature(user) + def get_levels_by_server_id(self, server_id: int) -> List[Level]: + try: + self._check_for_feature(self._servers.get_server_by_id(server_id).discord_id) + except Exception as e: + self._logger.warn(__name__, f"Feature {FeatureFlagsEnum.level_module.value} disabled\n{e}") + return List(Level) + + return self._levels.get_levels() + + def get_level(self, user: User) -> Optional[Level]: + try: + self._check_for_feature(user.server.discord_id) + except Exception as e: + self._logger.warn(__name__, f"Feature {FeatureFlagsEnum.level_module.value} disabled\n{e}") + return None levels_by_server = self._levels.get_levels_by_server_id(user.server.id) if user.xp < 0: @@ -60,7 +76,7 @@ class LevelService: return levels.last() async def set_level(self, user: User): - self._check_for_feature(user) + self._check_for_feature(user.server.discord_id) level_names = self._levels.get_levels_by_server_id(user.server.id).select(lambda l: l.name) guild: Guild = self._bot.guilds.where(lambda g: g.id == user.server.discord_id).single() member: Member = guild.members.where(lambda m: m.id == user.discord_id).single() diff --git a/web/package.json b/web/package.json index e9c46ef6..7e1d96e5 100644 --- a/web/package.json +++ b/web/package.json @@ -1,56 +1,56 @@ { - "name": "web", - "version": "1.2.7", - "scripts": { - "ng": "ng", - "update-version": "ts-node update-version.ts", - "prestart": "npm run update-version", - "start": "ng serve", - "prebuild": "npm run update-version", - "build": "ng build", - "watch": "ng build --watch --configuration development", - "test": "ng test", - "gv": "echo $npm_package_version", - "predocker-build": "npm run update-version", - "docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .", - "docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .", - "docker-build-stage": "export VERSION=$npm_package_version; ng build --configuration staging; docker build -t sh-edraft.de/sdb-web:$VERSION ." - }, - "private": true, - "dependencies": { - "@angular/animations": "^15.1.4", - "@angular/common": "^15.1.4", - "@angular/compiler": "^15.1.4", - "@angular/core": "^15.1.4", - "@angular/forms": "^15.1.4", - "@angular/platform-browser": "^15.1.4", - "@angular/platform-browser-dynamic": "^15.1.4", - "@angular/router": "^15.1.4", - "@auth0/angular-jwt": "^5.1.0", - "@microsoft/signalr": "^6.0.9", - "@ngx-translate/core": "^14.0.0", - "@ngx-translate/http-loader": "^7.0.0", - "@types/socket.io-client": "^3.0.0", - "moment": "^2.29.4", - "primeicons": "^6.0.1", - "primeng": "^15.2.0", - "rxjs": "~7.5.0", - "socket.io-client": "^4.5.3", - "zone.js": "~0.11.4" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^15.1.5", - "@angular/cli": "~15.1.5", - "@angular/compiler-cli": "^15.1.4", - "@types/jasmine": "~4.0.0", - "@types/node": "^18.11.9", - "jasmine-core": "~4.1.0", - "karma": "~6.3.0", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.0.0", - "karma-jasmine-html-reporter": "~1.7.0", - "tslib": "^2.4.1", - "typescript": "~4.9.5" - } -} + "name": "web", + "version": "1.2.7", + "scripts": { + "ng": "ng", + "update-version": "ts-node update-version.ts", + "prestart": "npm run update-version", + "start": "ng serve", + "prebuild": "npm run update-version", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test", + "gv": "echo $npm_package_version", + "predocker-build": "npm run update-version", + "docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .", + "docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .", + "docker-build-stage": "export VERSION=$npm_package_version; ng build --configuration staging; docker build -t sh-edraft.de/sdb-web:$VERSION ." + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.1.4", + "@angular/common": "^15.1.4", + "@angular/compiler": "^15.1.4", + "@angular/core": "^15.1.4", + "@angular/forms": "^15.1.4", + "@angular/platform-browser": "^15.1.4", + "@angular/platform-browser-dynamic": "^15.1.4", + "@angular/router": "^15.1.4", + "@auth0/angular-jwt": "^5.1.0", + "@microsoft/signalr": "^6.0.9", + "@ngx-translate/core": "^14.0.0", + "@ngx-translate/http-loader": "^7.0.0", + "@types/socket.io-client": "^3.0.0", + "moment": "^2.29.4", + "primeicons": "^6.0.1", + "primeng": "^15.2.0", + "rxjs": "~7.5.0", + "socket.io-client": "^4.5.3", + "zone.js": "~0.11.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.1.5", + "@angular/cli": "~15.1.5", + "@angular/compiler-cli": "^15.1.4", + "@types/jasmine": "~4.0.0", + "@types/node": "^18.11.9", + "jasmine-core": "~4.1.0", + "karma": "~6.3.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.0.0", + "karma-jasmine-html-reporter": "~1.7.0", + "tslib": "^2.4.1", + "typescript": "~4.9.5" + } +} \ No newline at end of file diff --git a/web/src/app/modules/view/server/members/members.component.html b/web/src/app/modules/view/server/members/members.component.html index da87353e..e060c58e 100644 --- a/web/src/app/modules/view/server/members/members.component.html +++ b/web/src/app/modules/view/server/members/members.component.html @@ -1,5 +1,5 @@

- {{'view.server.members.header' | translate}} + {{ 'view.server.members.header' | translate }}

@@ -12,10 +12,10 @@
- {{members.length}} {{'common.of' | translate}} - {{dt.totalRecords}} + {{ members.length }} {{ 'common.of' | translate }} + {{ dt.totalRecords }} - {{'view.server.members.members' | translate}} + {{ 'view.server.members.members' | translate }}
-
{{'common.id' | translate}}
+
{{ 'common.id' | translate }}
-
{{'common.discord_id' | translate}}
+
{{ 'common.discord_id' | translate }}
-
{{'common.name' | translate}}
+
{{ 'common.name' | translate }}
-
{{'common.xp' | translate}}
+
{{ 'common.xp' | translate }}
-
{{'common.ontime' | translate}}
+
{{ 'common.ontime' | translate }}
-
{{'common.game_ontime' | translate}}
+
{{ 'common.game_ontime' | translate }}
-
{{'common.activity' | translate}}
+
{{ 'common.activity' | translate }}
-
{{'common.left_server' | translate}}
+
{{ 'common.left_server' | translate }}
-
{{'common.level' | translate}}
+
{{ 'common.level' | translate }}
-
{{'common.created_at' | translate}}
+
{{ 'common.created_at' | translate }}
-
{{'common.modified_at' | translate}}
+
{{ 'common.modified_at' | translate }}
-
{{'common.actions' | translate}}
+
{{ 'common.actions' | translate }}
@@ -156,124 +156,124 @@ - {{'common.id' | translate}}: + {{ 'common.id' | translate }}: - {{member.id}} + {{ member.id }} - {{member.id}} + {{ member.id }} - {{'common.discord_id' | translate}}: + {{ 'common.discord_id' | translate }}: - {{member.discordId}} + {{ member.discordId }} - {{member.discordId}} + {{ member.discordId }} - {{'common.name' | translate}}: + {{ 'common.name' | translate }}: - {{member.name}} + {{ member.name }} - {{member.name}} + {{ member.name }} - {{'common.xp' | translate}}: + {{ 'common.xp' | translate }}: - {{member.xp}} + {{ member.xp }} - {{'common.ontime' | translate}}: + {{ 'common.ontime' | translate }}: - {{member.ontime}} + {{ member.ontime }} - {{member.ontime}} + {{ member.ontime }} - {{'common.game_ontime' | translate}}: + {{ 'common.game_ontime' | translate }}: - {{member.gameOntime}} + {{ member.gameOntime }} - {{member.gameOntime}} + {{ member.gameOntime }} - {{'common.activity' | translate}}: + {{ 'common.activity' | translate }}: - {{member.activityScore}} + {{ member.activityScore }} - {{member.activityScore}} + {{ member.activityScore }} - {{'common.left_server' | translate}}: + {{ 'common.left_server' | translate }}: - {{!member.leftServer | bool}} + {{ !member.leftServer | bool }} - {{!member.leftServer | bool}} + {{ !member.leftServer | bool }} - {{'common.level' | translate}}: + {{ 'common.level' | translate }}: - {{member.level.name}} + {{ member.level?.name }} - {{'common.created_at' | translate}}: + {{ 'common.created_at' | translate }}: - {{member.createdAt | date:'dd.MM.yy HH:mm'}} + {{ member.createdAt | date:'dd.MM.yy HH:mm' }} - {{member.createdAt | date:'dd.MM.yy HH:mm'}} + {{ member.createdAt | date:'dd.MM.yy HH:mm' }} - {{'common.modified_at' | translate}}: + {{ 'common.modified_at' | translate }}: - {{member.modifiedAt | date:'dd.MM.yy HH:mm'}} + {{ member.modifiedAt | date:'dd.MM.yy HH:mm' }} - {{member.modifiedAt | date:'dd.MM.yy HH:mm'}} + {{ member.modifiedAt | date:'dd.MM.yy HH:mm' }} @@ -298,7 +298,7 @@ - {{'common.no_entries_found' | translate}} + {{ 'common.no_entries_found' | translate }} diff --git a/web/src/app/modules/view/server/profile/profile.component.html b/web/src/app/modules/view/server/profile/profile.component.html index c5c6fd3d..e2dbbe47 100644 --- a/web/src/app/modules/view/server/profile/profile.component.html +++ b/web/src/app/modules/view/server/profile/profile.component.html @@ -1,5 +1,5 @@

- {{'view.server.profile.header' | translate}} + {{ 'view.server.profile.header' | translate }}

@@ -11,27 +11,27 @@
-

{{user.name}}

+

{{ user.name }}

-
{{'common.id' | translate}}:
-
{{user.id}}
+
{{ 'common.id' | translate }}:
+
{{ user.id }}
-
{{'common.discord_id' | translate}}:
-
{{user.discordId}}
+
{{ 'common.discord_id' | translate }}:
+
{{ user.discordId }}
-
{{'view.server.profile.message_count' | translate}}:
-
{{user.messageCount}}
+
{{ 'view.server.profile.message_count' | translate }}:
+
{{ user.messageCount }}
-
{{'view.server.profile.reaction_count' | translate}}:
-
{{user.reactionCount}}
+
{{ 'view.server.profile.reaction_count' | translate }}:
+
{{ user.reactionCount }}
-
{{'view.server.profile.birthday' | translate}}:
-
{{user.birthday}}
+
{{ 'view.server.profile.birthday' | translate }}:
+
{{ user.birthday }}
@@ -39,16 +39,16 @@
-
{{'view.server.profile.left_server' | translate}}:
-
{{user.leftServer | bool}}
+
{{ 'view.server.profile.left_server' | translate }}:
+
{{ user.leftServer | bool }}
-
{{'common.created_at' | translate}}:
-
{{user.createdAt | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.created_at' | translate }}:
+
{{ user.createdAt | date:'dd.MM.yyyy HH:mm:ss' }}
-
{{'common.modified_at' | translate}}:
-
{{user.modifiedAt | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.modified_at' | translate }}:
+
{{ user.modifiedAt | date:'dd.MM.yyyy HH:mm:ss' }}
@@ -68,22 +68,22 @@ [readonly]="isModerator && !isEditing">
- {{user.level.name}} + {{ user.level.name }}
-
{{'common.ontime' | translate}}:
-
{{user.ontime}}
+
{{ 'common.ontime' | translate }}:
+
{{ user.ontime }}
-
{{'common.game_ontime' | translate}}:
-
{{user.gameOntime}}
+
{{ 'common.game_ontime' | translate }}:
+
{{ user.gameOntime }}
-
{{'common.activity' | translate}}:
-
{{user.activityScore}}
+
{{ 'common.activity' | translate }}:
+
{{ user.activityScore }}
@@ -99,7 +99,7 @@
-

{{'common.user_warnings' | translate}}

+

{{ 'common.user_warnings' | translate }}

@@ -113,25 +113,25 @@
-
{{'common.description' | translate}}
+
{{ 'common.description' | translate }}
-
{{'common.author' | translate}}
+
{{ 'common.author' | translate }}
-
{{'common.created_at' | translate}}
+
{{ 'common.created_at' | translate }}
-
{{'common.actions' | translate}}
+
{{ 'common.actions' | translate }}
@@ -144,29 +144,29 @@ - {{value.description}} + {{ value.description }} - {{value.author?.name}} + {{ value.author?.name }} - {{value.author?.name}} + {{ value.author?.name }} - {{'common.created_at' | translate}}: + {{ 'common.created_at' | translate }}: - {{value.createdAt | date:'dd.MM.yy HH:mm'}} + {{ value.createdAt | date:'dd.MM.yy HH:mm' }} - {{value.createdAt | date:'dd.MM.yy HH:mm'}} + {{ value.createdAt | date:'dd.MM.yy HH:mm' }} @@ -196,18 +196,18 @@
-
{{'common.name' | translate}}:
-
{{achievement.name}}
+
{{ 'common.name' | translate }}:
+
{{ achievement.name }}
-
{{'common.description' | translate}}:
-
{{achievement.description}}
+
{{ 'common.description' | translate }}:
+
{{ achievement.description }}
-
{{'view.server.profile.achievements.time' | translate}}:
-
{{achievement.createdAt | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'view.server.profile.achievements.time' | translate }}:
+
{{ achievement.createdAt | date:'dd.MM.yyyy HH:mm:ss' }}
@@ -219,30 +219,30 @@
-
{{'common.id' | translate}}:
-
{{join.id}}
+
{{ 'common.id' | translate }}:
+
{{ join.id }}
{{'view.server.profile.joined_voice_channel.time' | translate}}: + style="flex: 0.35;">{{ 'view.server.profile.joined_voice_channel.time' | translate }}:
-
{{join.time}} {{'general.hours' | translate}}
+
{{ join.time }} {{ 'general.hours' | translate }}
-
{{'view.server.profile.joined_voice_channel.channel' | translate}}:
-
{{join.channelName}}
+
{{ 'view.server.profile.joined_voice_channel.channel' | translate }}:
+
{{ join.channelName }}
-
{{'common.joined_at' | translate}}:
-
{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.joined_at' | translate }}:
+
{{ join.joinedOn | date:'dd.MM.yyyy HH:mm:ss' }}
-
{{'common.leaved_at' | translate}}:
-
{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.leaved_at' | translate }}:
+
{{ join.leavedOn | date:'dd.MM.yyyy HH:mm:ss' }}
@@ -254,30 +254,30 @@
-
{{'common.id' | translate}}:
-
{{join.id}}
+
{{ 'common.id' | translate }}:
+
{{ join.id }}
{{'view.server.profile.joined_game_server.time' | translate}}: + style="flex: 0.35;">{{ 'view.server.profile.joined_game_server.time' | translate }}:
-
{{join.time}} {{'general.hours' | translate}}
+
{{ join.time }} {{ 'general.hours' | translate }}
-
{{'view.server.profile.joined_game_server.name' | translate}}:
-
{{join.gameServer}}
+
{{ 'view.server.profile.joined_game_server.name' | translate }}:
+
{{ join.gameServer }}
-
{{'common.joined_at' | translate}}:
-
{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.joined_at' | translate }}:
+
{{ join.joinedOn | date:'dd.MM.yyyy HH:mm:ss' }}
-
{{'common.leaved_at' | translate}}:
-
{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.leaved_at' | translate }}:
+
{{ join.leavedOn | date:'dd.MM.yyyy HH:mm:ss' }}
@@ -287,13 +287,13 @@
-
{{'common.joined_at' | translate}}:
-
{{join.joinedOn | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.joined_at' | translate }}:
+
{{ join.joinedOn | date:'dd.MM.yyyy HH:mm:ss' }}
-
{{'common.leaved_at' | translate}}:
-
{{join.leavedOn | date:'dd.MM.yyyy HH:mm:ss'}}
+
{{ 'common.leaved_at' | translate }}:
+
{{ join.leavedOn | date:'dd.MM.yyyy HH:mm:ss' }}
diff --git a/web/src/assets/version.json b/web/src/assets/version.json index 70496a22..0e91b5bb 100644 --- a/web/src/assets/version.json +++ b/web/src/assets/version.json @@ -1,7 +1,7 @@ { - "WebVersion": { - "Major": "1", - "Minor": "2", - "Micro": "7" - } -} + "WebVersion": { + "Major": "1", + "Minor": "2", + "Micro": "7" + } +} \ No newline at end of file