From acfa359eebb7c0e2088bb1ec18cc19bfcb7b9668 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 25 Jan 2024 16:44:41 +0100 Subject: [PATCH 01/18] Fixed loading scheduled events --- .../components/scheduled-events/scheduled-events.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts b/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts index e37e66d6..a41c585c 100644 --- a/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts +++ b/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts @@ -93,11 +93,11 @@ export class ScheduledEventsComponent extends ComponentWithTable implements OnIn public ngOnInit(): void { this.loading = true; - this.setFilterForm(); this.data.getServerFromRoute(this.route).then(async server => { this.server = server; let authUser = await this.authService.getLoggedInUser(); this.user = authUser?.users?.find(u => u.server == this.server.id) ?? null; + this.setFilterForm(); }); } From a917803eff42a3c8d352dff758272391ae453791 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 25 Jan 2024 16:46:03 +0100 Subject: [PATCH 02/18] Updated config --- bot/src/bot/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/bot/config b/bot/src/bot/config index eeebd13f..be5b15f2 160000 --- a/bot/src/bot/config +++ b/bot/src/bot/config @@ -1 +1 @@ -Subproject commit eeebd13f80c6ceecc922ede5771e55212a884019 +Subproject commit be5b15f227e7b2b12cc73c0edd7f6fa95dbdd52f From f209e45905501e1426ee5e439bcccfde089e0f02 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 25 Jan 2024 17:11:48 +0100 Subject: [PATCH 03/18] Added level icons --- bot/src/bot_data/model/level.py | 11 + bot/src/bot_graphql/graphql/level.gql | 1 + bot/src/bot_graphql/queries/level_query.py | 41 +- web/src/app/models/graphql/queries.model.ts | 1 + .../components/levels/levels.component.html | 437 +++++++++--------- .../components/levels/levels.component.ts | 4 +- web/src/assets/i18n/de.json | 1 + web/src/assets/i18n/en.json | 1 + 8 files changed, 252 insertions(+), 245 deletions(-) diff --git a/bot/src/bot_data/model/level.py b/bot/src/bot_data/model/level.py index a20d268b..378d7fc6 100644 --- a/bot/src/bot_data/model/level.py +++ b/bot/src/bot_data/model/level.py @@ -2,6 +2,10 @@ from datetime import datetime from typing import Optional from cpl_core.database import TableABC +from cpl_core.dependency_injection import ServiceProviderABC +from cpl_discord.service import DiscordBotServiceABC +from cpl_query.extension import List +from discord import Role from bot_data.model.server import Server @@ -33,6 +37,13 @@ class Level(TableABC): def id(self) -> int: return self._id + @property + @ServiceProviderABC.inject + def icon_url(self, bot: DiscordBotServiceABC) -> str: + guild = bot.get_guild(self.server.discord_id) + role = List(Role, guild.roles).where(lambda x: x.name == self._name).first_or_default() + return None if role is None else role.icon + @property def name(self) -> str: return self._name diff --git a/bot/src/bot_graphql/graphql/level.gql b/bot/src/bot_graphql/graphql/level.gql index cc937291..15be156a 100644 --- a/bot/src/bot_graphql/graphql/level.gql +++ b/bot/src/bot_graphql/graphql/level.gql @@ -1,5 +1,6 @@ type Level implements TableWithHistoryQuery { id: ID + iconURL: String name: String color: String minXp: Int diff --git a/bot/src/bot_graphql/queries/level_query.py b/bot/src/bot_graphql/queries/level_query.py index 5f726c5b..d0762f95 100644 --- a/bot/src/bot_graphql/queries/level_query.py +++ b/bot/src/bot_graphql/queries/level_query.py @@ -1,6 +1,5 @@ from cpl_core.database.context import DatabaseContextABC -from bot_data.model.level import Level from bot_data.model.level_history import LevelHistory from bot_graphql.abc.data_query_with_history_abc import DataQueryWithHistoryABC @@ -9,33 +8,13 @@ class LevelQuery(DataQueryWithHistoryABC): def __init__(self, db: DatabaseContextABC): DataQueryWithHistoryABC.__init__(self, "Level", "LevelsHistory", LevelHistory, db) - self.set_field("id", self.resolve_id) - self.set_field("name", self.resolve_name) - self.set_field("color", self.resolve_color) - self.set_field("minXp", self.resolve_min_xp) - self.set_field("permissions", self.resolve_permissions) - self.set_field("server", self.resolve_server) - - @staticmethod - def resolve_id(level: Level, *_): - return level.id - - @staticmethod - def resolve_name(level: Level, *_): - return level.name - - @staticmethod - def resolve_color(level: Level, *_): - return level.color - - @staticmethod - def resolve_min_xp(level: Level, *_): - return level.min_xp - - @staticmethod - def resolve_permissions(level: Level, *_): - return level.permissions - - @staticmethod - def resolve_server(level: Level, *_): - return level.server + self.set_field("id", lambda x, *_: x.id) + self.set_field( + "iconURL", + lambda x, *_: "https://cdn.discordapp.com/emojis/1170348708894875659.webp?size=32&quality=lossless", + ) + self.set_field("name", lambda x, *_: x.name) + self.set_field("color", lambda x, *_: x.color) + self.set_field("minXp", lambda x, *_: x.min_xp) + self.set_field("permissions", lambda x, *_: x.permissions) + self.set_field("server", lambda x, *_: x.server) diff --git a/web/src/app/models/graphql/queries.model.ts b/web/src/app/models/graphql/queries.model.ts index a387b22e..afa3ab68 100644 --- a/web/src/app/models/graphql/queries.model.ts +++ b/web/src/app/models/graphql/queries.model.ts @@ -155,6 +155,7 @@ export class Queries { levelCount levels(filter: $filter, page: $page, sort: $sort) { id + iconURL name color minXp diff --git a/web/src/app/modules/view/server/levels/components/levels/levels.component.html b/web/src/app/modules/view/server/levels/components/levels/levels.component.html index 0af4809d..1668d850 100644 --- a/web/src/app/modules/view/server/levels/components/levels/levels.component.html +++ b/web/src/app/modules/view/server/levels/components/levels/levels.component.html @@ -1,238 +1,251 @@

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

-
- +
+ - -
-
-
- {{levels.length}} {{'common.of' | translate}} - {{dt.totalRecords}} - - {{'view.server.levels.levels' | translate}} -
+ +
+
+
+ {{levels.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'view.server.levels.levels' | translate}} +
- -
+ +
-
- - - -
-
- +
+ + + +
+
+
- - - -
-
{{'common.id' | translate}}
- -
- + + + +
+
{{'common.id' | translate}}
+ +
+ - -
-
{{'common.name' | translate}}
- -
- + +
+
{{'common.icon' | translate}}
+ +
+ - -
-
{{'common.color' | translate}}
- -
- + +
+
{{'common.name' | translate}}
+ +
+ - -
-
{{'common.min_xp' | translate}}
- -
- + +
+
{{'common.color' | translate}}
+ +
+ - -
-
{{'common.permissions' | translate}}
- -
- + +
+
{{'common.min_xp' | translate}}
+ +
+ - -
-
{{'common.created_at' | translate}}
-
- + +
+
{{'common.permissions' | translate}}
+ +
+ - -
-
{{'common.modified_at' | translate}}
-
- + +
+
{{'common.created_at' | translate}}
+
+ - -
-
{{'common.actions' | translate}}
-
- - + +
+
{{'common.modified_at' | translate}}
+
+ - - -
- -
- - -
- -
- - - - - - - - -
+ +
+
{{'common.actions' | translate}}
+
+ + - - - - {{'common.id' | translate}}: - - - {{level.id}} - - - {{level.id}} - - - + + +
+ +
+ + + + +
+ +
+ + + + + + + + +
- - {{'common.name' | translate}}: - - - - - - {{level.name}} - - - + + + + {{'common.id' | translate}}: + + + {{level.id}} + + + {{level.id}} + + + - - {{'common.color' | translate}}: - - - - - - {{level.color}} - - - + + + - - {{'common.min_xp' | translate}}: - - - - - - {{level.minXp}} - - - + + {{'common.name' | translate}}: + + + + + + {{level.name}} + + + - - {{'common.permissions' | translate}}: - - - - - - {{level.permissions}} - - - + + {{'common.color' | translate}}: + + + + + + {{level.color}} + + + - - {{'common.created_at' | translate}}: - - - {{level.createdAt | date:'dd.MM.yy HH:mm'}} - - - {{level.createdAt | date:'dd.MM.yy HH:mm'}} - - - - - {{'common.modified_at' | translate}}: - - - {{level.modifiedAt | date:'dd.MM.yy HH:mm'}} - - - {{level.modifiedAt | date:'dd.MM.yy HH:mm'}} - - - - -
- - - + + {{'common.min_xp' | translate}}: + + + + + + {{level.minXp}} + + + - - -
- - -
+ + {{'common.permissions' | translate}}: + + + + + + {{level.permissions}} + + + - - - - {{'common.no_entries_found' | translate}} - - - + + {{'common.created_at' | translate}}: + + + {{level.createdAt | date:'dd.MM.yy HH:mm'}} + + + {{level.createdAt | date:'dd.MM.yy HH:mm'}} + + + + + {{'common.modified_at' | translate}}: + + + {{level.modifiedAt | date:'dd.MM.yy HH:mm'}} + + + {{level.modifiedAt | date:'dd.MM.yy HH:mm'}} + + + + +
+ + + - - - -
+ + +
+ + + + + + + + {{'common.no_entries_found' | translate}} + + + + + + +
+
diff --git a/web/src/app/modules/view/server/levels/components/levels/levels.component.ts b/web/src/app/modules/view/server/levels/components/levels/levels.component.ts index 85558bc0..19cb3469 100644 --- a/web/src/app/modules/view/server/levels/components/levels/levels.component.ts +++ b/web/src/app/modules/view/server/levels/components/levels/levels.component.ts @@ -19,7 +19,7 @@ import { Table } from "primeng/table"; import { User } from "../../../../../../models/data/user.model"; import { LevelMutationResult, UpdateUserMutationResult } from "../../../../../../models/graphql/result.model"; import { Mutations } from "../../../../../../models/graphql/mutations.model"; -import { forkJoin, Subject, throwError } from "rxjs"; +import { Subject, throwError } from "rxjs"; import { Server } from "../../../../../../models/data/server.model"; import { UserDTO } from "../../../../../../models/auth/auth-user.dto"; import { ComponentWithTable } from "../../../../../../base/component-with-table"; @@ -72,7 +72,7 @@ export class LevelsComponent extends ComponentWithTable implements OnInit, OnDes private sidebar: SidebarService, private route: ActivatedRoute ) { - super("level", ["id", "name", "color", "min_xp", "permissions"], (oldElement: Level, newElement: Level) => { + super("level", ["id", "icon", "name", "color", "min_xp", "permissions"], (oldElement: Level, newElement: Level) => { return oldElement.name === newElement.name; }); } diff --git a/web/src/assets/i18n/de.json b/web/src/assets/i18n/de.json index 8c8e20e2..008d1ab5 100644 --- a/web/src/assets/i18n/de.json +++ b/web/src/assets/i18n/de.json @@ -180,6 +180,7 @@ "value": "Wert", "xp": "XP" }, + "icon": "Icon", "id": "Id", "import": "Importieren", "interval": "Interval", diff --git a/web/src/assets/i18n/en.json b/web/src/assets/i18n/en.json index ec26f08d..2a5b0632 100644 --- a/web/src/assets/i18n/en.json +++ b/web/src/assets/i18n/en.json @@ -180,6 +180,7 @@ "value": "Value", "xp": "XP" }, + "icon": "Icon", "id": "Id", "import": "Import", "interval": "interval", From 77f759a9ca995622f4b493c78507f02b5a455c5d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 25 Jan 2024 19:27:45 +0100 Subject: [PATCH 04/18] Added user warnings to WI --- .../abc/user_warnings_repository_abc.py | 4 + bot/src/bot_data/model/user_warnings.py | 11 + .../user_warnings_repository_service.py | 14 + bot/src/bot_graphql/graphql/server.gql | 3 + .../bot_graphql/mutations/user_mutation.py | 6 +- bot/src/bot_graphql/queries/server_query.py | 8 + web/src/app/models/graphql/queries.model.ts | 39 +++ .../view/server/members/members.component.ts | 6 +- .../view/server/server-routing.module.ts | 48 +++- .../user-warning/user-warning.component.html | 213 ++++++++++++++++ .../user-warning/user-warning.component.scss | 0 .../user-warning.component.spec.ts | 23 ++ .../user-warning/user-warning.component.ts | 240 ++++++++++++++++++ .../user-warning-routing.module.ts | 16 ++ .../user-warning/user-warning.module.ts | 19 ++ .../app/services/sidebar/sidebar.service.ts | 10 +- web/src/assets/i18n/de.json | 12 +- web/src/assets/i18n/en.json | 12 +- 18 files changed, 670 insertions(+), 14 deletions(-) create mode 100644 web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html create mode 100644 web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.scss create mode 100644 web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.spec.ts create mode 100644 web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts create mode 100644 web/src/app/modules/view/server/user-warning/user-warning-routing.module.ts create mode 100644 web/src/app/modules/view/server/user-warning/user-warning.module.ts diff --git a/bot/src/bot_data/abc/user_warnings_repository_abc.py b/bot/src/bot_data/abc/user_warnings_repository_abc.py index bb5d9e9b..0fb36df5 100644 --- a/bot/src/bot_data/abc/user_warnings_repository_abc.py +++ b/bot/src/bot_data/abc/user_warnings_repository_abc.py @@ -18,6 +18,10 @@ class UserWarningsRepositoryABC(ABC): def get_user_warnings_by_id(self, id: int) -> UserWarnings: pass + @abstractmethod + def get_user_warnings_by_server_id(self, server_id: int) -> List[UserWarnings]: + pass + @abstractmethod def get_user_warnings_by_user_id(self, user_id: int) -> List[UserWarnings]: pass diff --git a/bot/src/bot_data/model/user_warnings.py b/bot/src/bot_data/model/user_warnings.py index 99610a5f..40aeb064 100644 --- a/bot/src/bot_data/model/user_warnings.py +++ b/bot/src/bot_data/model/user_warnings.py @@ -59,6 +59,17 @@ class UserWarnings(TableABC): """ ) + @staticmethod + def get_select_by_server_id_string(id: int) -> str: + return str( + f""" + SELECT `UserWarnings`.* FROM `UserWarnings` + INNER JOIN `Users` + ON `Users`.`UserId` = `UserWarnings`.`UserId` + WHERE `Users`.`ServerId` = {id}; + """ + ) + @staticmethod def get_select_by_user_id_string(id: int) -> str: return str( diff --git a/bot/src/bot_data/service/user_warnings_repository_service.py b/bot/src/bot_data/service/user_warnings_repository_service.py index bae46987..e9e5b5d5 100644 --- a/bot/src/bot_data/service/user_warnings_repository_service.py +++ b/bot/src/bot_data/service/user_warnings_repository_service.py @@ -56,6 +56,20 @@ class UserWarningsRepositoryService(UserWarningsRepositoryABC): self._logger.trace(__name__, f"Send SQL command: {UserWarnings.get_select_by_id_string(id)}") return self._from_result(self._context.select(UserWarnings.get_select_by_id_string(id))[0]) + def get_user_warnings_by_server_id(self, server_id: int) -> List[UserWarnings]: + self._logger.trace( + __name__, + f"Send SQL command: {UserWarnings.get_select_by_server_id_string(server_id)}", + ) + + return List( + UserWarnings, + [ + self._from_result(warning) + for warning in self._context.select(UserWarnings.get_select_by_server_id_string(server_id)) + ], + ) + def get_user_warnings_by_user_id(self, user_id: int) -> List[UserWarnings]: self._logger.trace( __name__, diff --git a/bot/src/bot_graphql/graphql/server.gql b/bot/src/bot_graphql/graphql/server.gql index 63d07b3f..80beb832 100644 --- a/bot/src/bot_graphql/graphql/server.gql +++ b/bot/src/bot_graphql/graphql/server.gql @@ -29,6 +29,9 @@ type Server implements TableWithHistoryQuery { activeUserCount: Int users(filter: UserFilter, page: Page, sort: Sort): [User] + userWarningCount: Int + userWarnings(filter: UserWarningFilter, page: Page, sort: Sort): [UserWarning] + achievementCount: Int achievements(filter: AchievementFilter, page: Page, sort: Sort): [Achievement] diff --git a/bot/src/bot_graphql/mutations/user_mutation.py b/bot/src/bot_graphql/mutations/user_mutation.py index 8d5fb779..e2494c52 100644 --- a/bot/src/bot_graphql/mutations/user_mutation.py +++ b/bot/src/bot_graphql/mutations/user_mutation.py @@ -86,5 +86,9 @@ class UserMutation(QueryABC): continue member = self._bot.get_guild(user.server.discord_id).get_member(user.discord_id) - author = self._users.get_user_by_id(int(warning["author"])) + if "author" not in warning: + author = Route.get_user().users.where(lambda u: u.server.id == user.server.id).single() + else: + author = self._users.get_user_by_id(int(warning["author"])) + self._user_warning_service.add_warnings(member, warning["description"], author.discord_id) diff --git a/bot/src/bot_graphql/queries/server_query.py b/bot/src/bot_graphql/queries/server_query.py index 33ccf9dc..112a4555 100644 --- a/bot/src/bot_graphql/queries/server_query.py +++ b/bot/src/bot_graphql/queries/server_query.py @@ -17,6 +17,7 @@ from bot_data.abc.user_joined_voice_channel_repository_abc import ( UserJoinedVoiceChannelRepositoryABC, ) from bot_data.abc.user_repository_abc import UserRepositoryABC +from bot_data.abc.user_warnings_repository_abc import UserWarningsRepositoryABC from bot_data.model.server import Server from bot_data.model.server_config import ServerConfig from bot_data.model.server_history import ServerHistory @@ -28,6 +29,7 @@ from bot_graphql.filter.level_filter import LevelFilter from bot_graphql.filter.scheduled_event_filter import ScheduledEventFilter 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 @@ -48,6 +50,7 @@ class ServerQuery(DataQueryWithHistoryABC): short_role_names: ShortRoleNameRepositoryABC, scheduled_events: ScheduledEventRepositoryABC, server_configs: ServerConfigRepositoryABC, + user_warnings: UserWarningsRepositoryABC, ): DataQueryWithHistoryABC.__init__(self, "Server", "ServersHistory", ServerHistory, db) @@ -89,6 +92,11 @@ class ServerQuery(DataQueryWithHistoryABC): lambda server, *_: self._users.get_users_with_activity_by_server_id(server.id), UserFilter, ) + self.add_collection( + "userWarning", + lambda server, *_: user_warnings.get_user_warnings_by_server_id(server.id), + UserWarningFilter, + ) self.add_collection( "gameServer", lambda server, *_: game_servers.get_game_servers_by_server_id(server.id), diff --git a/web/src/app/models/graphql/queries.model.ts b/web/src/app/models/graphql/queries.model.ts index afa3ab68..e5448075 100644 --- a/web/src/app/models/graphql/queries.model.ts +++ b/web/src/app/models/graphql/queries.model.ts @@ -377,6 +377,22 @@ export class Queries { } `; + static liteUsersQuery = ` + query UsersList($serverId: ID, $filter: UserFilter, $page: Page, $sort: Sort) { + servers(filter: {id: $serverId}) { + userCount + users(filter: $filter, page: $page, sort: $sort) { + id + discordId + name + + createdAt + modifiedAt + } + } + } + `; + static userProfile = ` query UserProfile($serverId: ID, $userId: ID, $page: Page, $sort: Sort) { userCount @@ -503,6 +519,29 @@ export class Queries { } `; + static userWarningsQuery = ` + query userWarnings($serverId: ID, $page: Page, $sort: Sort) { + servers(filter: {id: $serverId}) { + userWarningCount + userWarnings(page: $page, sort: $sort) { + id + user { + id + name + } + description + author { + id + name + } + + createdAt + modifiedAt + } + } + } + `; + static autoRolesQuery = ` query AutoRoleQuery($serverId: ID, $filter: AutoRoleFilter, $page: Page, $sort: Sort) { servers(filter: {id: $serverId}) { diff --git a/web/src/app/modules/view/server/members/members.component.ts b/web/src/app/modules/view/server/members/members.component.ts index ded4f2a4..d691311d 100644 --- a/web/src/app/modules/view/server/members/members.component.ts +++ b/web/src/app/modules/view/server/members/members.component.ts @@ -64,7 +64,9 @@ export class MembersComponent extends ComponentWithTable implements OnInit, OnDe level: FormControl }>; - filter: UserFilter = {}; + filter: UserFilter = { + leftServer: false + }; page: Page = { pageSize: undefined, pageIndex: undefined @@ -145,7 +147,7 @@ export class MembersComponent extends ComponentWithTable implements OnInit, OnDe id: new FormControl(null), discordId: new FormControl(null), name: [""], - leftServer: new FormControl(null), + leftServer: new FormControl(false), level: new FormControl(null) }); diff --git a/web/src/app/modules/view/server/server-routing.module.ts b/web/src/app/modules/view/server/server-routing.module.ts index 310e44a5..732c1af8 100644 --- a/web/src/app/modules/view/server/server-routing.module.ts +++ b/web/src/app/modules/view/server/server-routing.module.ts @@ -8,19 +8,55 @@ import { MemberRoles } from "../../../models/auth/auth-user.dto"; const routes: Routes = [ { path: "", component: ServerDashboardComponent }, - { path: "members", component: MembersComponent, canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, + { + path: "members", + component: MembersComponent, + canActivate: [AuthGuard], + data: { memberRole: MemberRoles.Moderator } + }, { path: "members/:memberId", component: ProfileComponent }, + { + path: "user-warnings", + loadChildren: () => import("./user-warning/user-warning.module").then(m => m.UserWarningModule), + canActivate: [AuthGuard], + data: { memberRole: MemberRoles.Moderator } + }, { path: "auto-roles", loadChildren: () => import("./auto-role/auto-role.module").then(m => m.AutoRoleModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, - { path: "levels", loadChildren: () => import("./levels/levels.module").then(m => m.LevelsModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, - { path: "achievements", loadChildren: () => import("./achievements/achievements.module").then(m => m.AchievementsModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, - { path: "short-role-names", loadChildren: () => import("./short-role-name/short-role-name.module").then(m => m.ShortRoleNameModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, - { path: "scheduled-events", loadChildren: () => import("./scheduled-events/scheduled-events.module").then(m => m.ScheduledEventsModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, - { path: "config", loadChildren: () => import("./config/config.module").then(m => m.ConfigModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Admin } } + { + path: "levels", + loadChildren: () => import("./levels/levels.module").then(m => m.LevelsModule), + canActivate: [AuthGuard], + data: { memberRole: MemberRoles.Moderator } + }, + { + path: "achievements", + loadChildren: () => import("./achievements/achievements.module").then(m => m.AchievementsModule), + canActivate: [AuthGuard], + data: { memberRole: MemberRoles.Moderator } + }, + { + path: "short-role-names", + loadChildren: () => import("./short-role-name/short-role-name.module").then(m => m.ShortRoleNameModule), + canActivate: [AuthGuard], + data: { memberRole: MemberRoles.Moderator } + }, + { + path: "scheduled-events", + loadChildren: () => import("./scheduled-events/scheduled-events.module").then(m => m.ScheduledEventsModule), + canActivate: [AuthGuard], + data: { memberRole: MemberRoles.Moderator } + }, + { + path: "config", + loadChildren: () => import("./config/config.module").then(m => m.ConfigModule), + canActivate: [AuthGuard], + data: { memberRole: MemberRoles.Admin } + } ]; @NgModule({ diff --git a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html new file mode 100644 index 00000000..2cdc08c9 --- /dev/null +++ b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html @@ -0,0 +1,213 @@ +

+ {{'common.user_warnings' | translate}} +

+
+
+ + + +
+
+
+ {{userWarnings.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'common.user_warnings' | translate}} +
+ + +
+ +
+ + + +
+
+
+ + + + +
+
{{'common.id' | translate}}
+ +
+ + + +
+
{{'common.description' | translate}}
+ +
+ + + +
+
{{'common.member' | translate}}
+ +
+ + + +
+
{{'common.author' | translate}}
+ +
+ + + +
+
{{'common.created_at' | translate}}
+
+ + + +
+
{{'common.modified_at' | translate}}
+
+ + + +
+
{{'common.actions' | translate}}
+
+ + + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + + + + +
+ + + + + {{'common.id' | translate}}: + + + {{userWarning.id}} + + + {{userWarning.id}} + + + + + + {{'common.description' | translate}}: + + + + {{userWarning.description}} + + + {{userWarning.description}} + + + + + + {{'common.user' | translate}}: + + + + {{userWarning.user.name}} + + + {{userWarning.user.name}} + + + + + + {{'common.author' | translate}}: + + + {{'common.you' | translate}} + + + {{userWarning.author.name}} + + + + + + {{'common.created_at' | translate}}: + {{userWarning.createdAt | date:'dd.MM.yy HH:mm'}} + + + + {{'common.modified_at' | translate}}: + {{userWarning.modifiedAt | date:'dd.MM.yy HH:mm'}} + + +
+ + + + +
+ + +
+ + + + + {{'common.no_entries_found' | translate}} + + + + + + +
+
+
+ diff --git a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.scss b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.spec.ts b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.spec.ts new file mode 100644 index 00000000..f9f5fbee --- /dev/null +++ b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from "@angular/core/testing"; + +import { UserWarningComponent } from "./user-warning.component"; + +describe("AchievementComponent", () => { + let component: UserWarningComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [UserWarningComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(UserWarningComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it("should create", () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts new file mode 100644 index 00000000..d797cceb --- /dev/null +++ b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts @@ -0,0 +1,240 @@ +import { Component, OnDestroy, OnInit } from "@angular/core"; +import { FormBuilder, FormControl, FormGroup } from "@angular/forms"; +import { Page } from "../../../../../../models/graphql/filter/page.model"; +import { Sort, SortDirection } from "../../../../../../models/graphql/filter/sort.model"; +import { Subject, throwError } from "rxjs"; +import { Server } from "../../../../../../models/data/server.model"; +import { UserDTO } from "../../../../../../models/auth/auth-user.dto"; +import { Queries } from "../../../../../../models/graphql/queries.model"; +import { AuthService } from "../../../../../../services/auth/auth.service"; +import { SpinnerService } from "../../../../../../services/spinner/spinner.service"; +import { ToastService } from "../../../../../../services/toast/toast.service"; +import { ConfirmationDialogService } from "../../../../../../services/confirmation-dialog/confirmation-dialog.service"; +import { TranslateService } from "@ngx-translate/core"; +import { DataService } from "../../../../../../services/data/data.service"; +import { SidebarService } from "../../../../../../services/sidebar/sidebar.service"; +import { ActivatedRoute } from "@angular/router"; +import { Query, UserListQuery, UserWarningQuery } from "../../../../../../models/graphql/query.model"; +import { catchError, debounceTime, takeUntil } from "rxjs/operators"; +import { LazyLoadEvent } from "primeng/api"; +import { Table } from "primeng/table"; +import { User } from "../../../../../../models/data/user.model"; +import { UpdateUserMutationResult } from "../../../../../../models/graphql/result.model"; +import { Mutations } from "../../../../../../models/graphql/mutations.model"; +import { ComponentWithTable } from "../../../../../../base/component-with-table"; +import { UserWarning, UserWarningFilter } from "../../../../../../models/data/user_warning.model"; + +@Component({ + selector: "app-user-warning", + templateUrl: "./user-warning.component.html", + styleUrls: ["./user-warning.component.scss"] +}) +export class UserWarningComponent extends ComponentWithTable implements OnInit, OnDestroy { + public userWarnings: UserWarning[] = []; + public users: User[] = []; + public loading = true; + + public filterForm!: FormGroup<{ + id: FormControl, + description: FormControl, + user: FormControl, + author: FormControl, + }>; + + public filter: UserWarningFilter = {}; + public page: Page = { + pageSize: undefined, + pageIndex: undefined + }; + public sort: Sort = { + sortColumn: undefined, + sortDirection: undefined + }; + + public totalRecords: number = 0; + + public clonedUserWarning: { [s: string]: UserWarning; } = {}; + + private unsubscriber = new Subject(); + private server: Server = {}; + public user: UserDTO | null = null; + + query: string = Queries.userWarningsQuery; + + public constructor( + private authService: AuthService, + private spinner: SpinnerService, + private toastService: ToastService, + private confirmDialog: ConfirmationDialogService, + private fb: FormBuilder, + private translate: TranslateService, + private data: DataService, + private sidebar: SidebarService, + private route: ActivatedRoute) { + super("UserWarning", ["id", "name"], + (oldElement: UserWarning, newElement: UserWarning) => { + return oldElement.id === newElement.id; + }); + } + + public ngOnInit(): void { + this.loading = true; + this.setFilterForm(); + this.data.getServerFromRoute(this.route).then(async server => { + this.server = server; + let authUser = await this.authService.getLoggedInUser(); + this.user = authUser?.users?.find(u => u.server == this.server.id) ?? null; + }); + } + + public ngOnDestroy(): void { + this.unsubscriber.next(); + this.unsubscriber.complete(); + } + + public loadNextPage(): void { + this.data.query(Queries.userWarningsQuery, { + serverId: this.server.id, filter: this.filter, page: this.page, sort: this.sort + }, + (data: Query) => { + return data.servers[0]; + } + ).subscribe(data => { + this.totalRecords = data.userWarningCount; + this.userWarnings = data.userWarnings; + + this.data.query(Queries.liteUsersQuery, { + serverId: this.server.id, filter: { + leftServer: false + } + }, + (x: { servers: Server[] }) => { + return x.servers[0]; + } + ).subscribe(data => { + this.users = data.users; + + this.spinner.hideSpinner(); + this.loading = false; + }); + }); + } + + public setFilterForm(): void { + this.filterForm = this.fb.group({ + id: new FormControl(null), + description: new FormControl(null), + user: new FormControl(null), + author: new FormControl(null) + }); + + this.filterForm.valueChanges.pipe( + takeUntil(this.unsubscriber), + debounceTime(600) + ).subscribe(changes => { + if (changes.id) { + this.filter.id = changes.id; + } else { + this.filter.id = undefined; + } + + if (this.page.pageSize) + this.page.pageSize = 10; + + if (this.page.pageIndex) + this.page.pageIndex = 0; + + this.loadNextPage(); + }); + } + + public newUserWarningTemplate: UserWarning = { + createdAt: "", + modifiedAt: "" + }; + + public nextPage(event: LazyLoadEvent): void { + this.page.pageSize = event.rows ?? 0; + if (event.first != null && event.rows != null) + this.page.pageIndex = event.first / event.rows; + this.sort.sortColumn = event.sortField ?? undefined; + this.sort.sortDirection = event.sortOrder === 1 ? SortDirection.ASC : event.sortOrder === -1 ? SortDirection.DESC : SortDirection.ASC; + + this.loadNextPage(); + } + + public resetFilters(): void { + this.filterForm.reset(); + } + + public onRowEditInit(table: Table, user: User, index: number): void { + this.clonedUserWarning[index] = { ...user }; + } + + public override onRowEditSave(newUserWarning: UserWarning, index: number): void { + if (this.isEditingNew && JSON.stringify(newUserWarning) === JSON.stringify(this.newUserWarningTemplate)) { + this.isEditingNew = false; + this.userWarnings.splice(index, 1); + return; + } + + if (!newUserWarning.id && !this.isEditingNew) { + return; + } + + this.updateUserByWarning(newUserWarning.user?.id ?? 0, this.userWarnings.filter(uw => uw.user?.id == newUserWarning.user?.id)); + } + + public onRowEditCancel(index: number): void { + if (this.isEditingNew) { + this.userWarnings.splice(index, 1); + delete this.clonedUserWarning[index]; + this.isEditingNew = false; + return; + } + + this.userWarnings[index] = this.clonedUserWarning[index]; + delete this.clonedUserWarning[index]; + } + + public addUserWarning(table: Table): void { + const newUserWarning = JSON.parse(JSON.stringify(this.newUserWarningTemplate)); + + this.userWarnings = [newUserWarning, ...this.userWarnings]; + + table.initRowEdit(newUserWarning); + + const index = this.userWarnings.findIndex(l => l.id == newUserWarning.id); + this.onRowEditInit(table, newUserWarning, index); + + this.isEditingNew = true; + } + + public deleteUserWarning(userWarning: UserWarning): void { + this.userWarnings.splice(this.userWarnings.findIndex(uw => uw.id == userWarning.id), 1); + this.updateUserByWarning(userWarning.user?.id ?? 0, this.userWarnings.filter(uw => uw.user?.id == userWarning.user?.id)); + } + + public updateUserByWarning(userId: number, userWarnings: UserWarning[]) { + this.spinner.showSpinner(); + this.data.mutation(Mutations.updateUser, { + id: userId, + userWarnings: userWarnings?.map(userWarning => { + return { + id: userWarning.id, + user: userWarning.user?.id ?? undefined, + description: userWarning.description, + author: userWarning.author?.id ?? undefined + }; + }) + } + ).pipe(catchError(err => { + this.spinner.hideSpinner(); + return throwError(err); + })).subscribe(_ => { + this.spinner.hideSpinner(); + this.toastService.success(this.translate.instant("view.server.user_warning.message.user_warning_updated"), this.translate.instant("view.server.user_warning.message.user_warning_updated")); + this.loadNextPage(); + }); + } +} diff --git a/web/src/app/modules/view/server/user-warning/user-warning-routing.module.ts b/web/src/app/modules/view/server/user-warning/user-warning-routing.module.ts new file mode 100644 index 00000000..827021d6 --- /dev/null +++ b/web/src/app/modules/view/server/user-warning/user-warning-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from "@angular/core"; +import { RouterModule, Routes } from "@angular/router"; +import { UserWarningComponent } from "./components/user-warning/user-warning.component"; + +const routes: Routes = [ + + { path: "", component: UserWarningComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class UserWarningRoutingModule { + +} diff --git a/web/src/app/modules/view/server/user-warning/user-warning.module.ts b/web/src/app/modules/view/server/user-warning/user-warning.module.ts new file mode 100644 index 00000000..df78033a --- /dev/null +++ b/web/src/app/modules/view/server/user-warning/user-warning.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from "@angular/core"; +import { CommonModule } from "@angular/common"; +import { UserWarningRoutingModule } from "./user-warning-routing.module"; +import { SharedModule } from "../../../shared/shared.module"; +import { UserWarningComponent } from "./components/user-warning/user-warning.component"; + + +@NgModule({ + declarations: [ + UserWarningComponent + ], + imports: [ + CommonModule, + UserWarningRoutingModule, + SharedModule + ] +}) +export class UserWarningModule { +} diff --git a/web/src/app/services/sidebar/sidebar.service.ts b/web/src/app/services/sidebar/sidebar.service.ts index b5c887f6..623a9118 100644 --- a/web/src/app/services/sidebar/sidebar.service.ts +++ b/web/src/app/services/sidebar/sidebar.service.ts @@ -27,6 +27,7 @@ export class SidebarService { serverDashboard: MenuItem = {}; serverProfile: MenuItem = {}; serverMembers: MenuItem = {}; + serverUserWarnings: MenuItem = {}; serverAutoRoles: MenuItem = {}; serverLevels: MenuItem = {}; serverAchievements: MenuItem = {}; @@ -89,6 +90,12 @@ export class SidebarService { visible: true, routerLink: `server/${this.server?.id}/members` }; + this.serverUserWarnings = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.user_warnings") : "", + icon: "pi pi-exclamation-triangle", + visible: true, + routerLink: `server/${this.server?.id}/user-warnings` + }; this.serverAutoRoles = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.auto_roles") : "", @@ -137,7 +144,7 @@ export class SidebarService { icon: "pi pi-server", visible: false, expanded: true, - items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverScheduledEvents, this.serverShortRoleNames, this.serverConfig] + items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverUserWarnings, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverScheduledEvents, this.serverShortRoleNames, this.serverConfig] }; this.adminConfig = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.config") : "", @@ -194,6 +201,7 @@ export class SidebarService { if (this.server) { this.serverMenu.visible = true; this.serverMembers.visible = isTechnicianAndFullAccessActive || user?.isModerator; + this.serverUserWarnings.visible = isTechnicianAndFullAccessActive || user?.isModerator; this.serverAutoRoles.visible = isTechnicianAndFullAccessActive || this.hasFeature("AutoRoleModule") && user?.isModerator; this.serverLevels.visible = isTechnicianAndFullAccessActive || this.hasFeature("LevelModule") && user?.isModerator; this.serverAchievements.visible = isTechnicianAndFullAccessActive || this.hasFeature("AchievementsModule") && user?.isModerator; diff --git a/web/src/assets/i18n/de.json b/web/src/assets/i18n/de.json index 008d1ab5..6461cd4c 100644 --- a/web/src/assets/i18n/de.json +++ b/web/src/assets/i18n/de.json @@ -190,6 +190,7 @@ "left_server": "Aktiv", "level": "Level", "location": "Ort", + "member": "Mitglied", "message_id": "Nachricht Id", "min_xp": "Min. XP", "modified_at": "Bearbeitet am", @@ -218,7 +219,8 @@ "user_warnings": "Verwarnungen", "users": "Benutzer", "value": "Wert", - "xp": "XP" + "xp": "XP", + "you": "Du" }, "dialog": { "abort": "Abbrechen", @@ -348,7 +350,8 @@ "members": "Mitglieder", "profile": "Dein Profil", "scheduled_events": "Geplante Events", - "short_role_names": "Rollen Kürzel" + "short_role_names": "Rollen Kürzel", + "user_warnings": "Verwarnungen" }, "server_empty": "Kein Server ausgewählt", "settings": "Einstellungen", @@ -622,6 +625,11 @@ "short_role_names_update_failed_d": "Die Bearbeitung des Levels ist fehlgeschlagen!" }, "short_role_names": "Rollen Kürzel" + }, + "user_warning": { + "message": { + "user_warning_updated": "Verwarnungen wurde bearbeitet" + } } }, "user_settings": { diff --git a/web/src/assets/i18n/en.json b/web/src/assets/i18n/en.json index 2a5b0632..18cd2b0e 100644 --- a/web/src/assets/i18n/en.json +++ b/web/src/assets/i18n/en.json @@ -190,6 +190,7 @@ "left_server": "Active", "level": "Level", "location": "Location", + "member": "Member", "message_id": "Message Id", "min_xp": "Min. XP", "modified_at": "Modified at", @@ -218,7 +219,8 @@ "user_warnings": "User warnings", "users": "User", "value": "Value", - "xp": "XP" + "xp": "XP", + "you": "You" }, "dialog": { "abort": "Abort", @@ -348,7 +350,8 @@ "members": "Members", "profile": "Your profile", "scheduled_events": "Scheduled events", - "short_role_names": "Short role names" + "short_role_names": "Short role names", + "user_warnings": "User warnings" }, "server_empty": "No server selected", "settings": "Settings", @@ -622,6 +625,11 @@ "short_role_names_update_failed_d": "Short role name editing failed!" }, "short_role_names": "Level" + }, + "user_warning": { + "message": { + "user_warning_updated": "Updated user warnings" + } } }, "user_settings": { From 3683f5f3d14046c4406d88a671361ef0f89575ab Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 25 Jan 2024 19:28:56 +0100 Subject: [PATCH 05/18] Set correct version --- bot/src/bot/__init__.py | 4 +- bot/src/bot/bot.json | 2 +- bot/src/bot/extension/__init__.py | 4 +- bot/src/bot_api/__init__.py | 4 +- bot/src/bot_api/abc/__init__.py | 4 +- bot/src/bot_api/bot-api.json | 2 +- bot/src/bot_api/configuration/__init__.py | 4 +- bot/src/bot_api/controller/__init__.py | 4 +- bot/src/bot_api/event/__init__.py | 4 +- bot/src/bot_api/exception/__init__.py | 4 +- bot/src/bot_api/filter/__init__.py | 4 +- bot/src/bot_api/filter/discord/__init__.py | 4 +- bot/src/bot_api/logging/__init__.py | 4 +- bot/src/bot_api/model/__init__.py | 4 +- bot/src/bot_api/model/discord/__init__.py | 4 +- bot/src/bot_api/route/__init__.py | 4 +- bot/src/bot_api/service/__init__.py | 4 +- bot/src/bot_api/transformer/__init__.py | 4 +- bot/src/bot_core/__init__.py | 4 +- bot/src/bot_core/abc/__init__.py | 4 +- bot/src/bot_core/bot-core.json | 2 +- bot/src/bot_core/configuration/__init__.py | 4 +- bot/src/bot_core/core_extension/__init__.py | 4 +- bot/src/bot_core/events/__init__.py | 4 +- bot/src/bot_core/exception/__init__.py | 4 +- bot/src/bot_core/helper/__init__.py | 4 +- bot/src/bot_core/logging/__init__.py | 4 +- bot/src/bot_core/pipes/__init__.py | 4 +- bot/src/bot_core/service/__init__.py | 4 +- bot/src/bot_data/__init__.py | 4 +- bot/src/bot_data/abc/__init__.py | 4 +- bot/src/bot_data/bot-data.json | 2 +- bot/src/bot_data/model/__init__.py | 4 +- bot/src/bot_data/service/__init__.py | 4 +- bot/src/bot_graphql/__init__.py | 4 +- bot/src/bot_graphql/abc/__init__.py | 4 +- bot/src/bot_graphql/bot-graphql.json | 2 +- bot/src/bot_graphql/filter/__init__.py | 4 +- bot/src/bot_graphql/model/__init__.py | 4 +- bot/src/bot_graphql/mutations/__init__.py | 4 +- bot/src/bot_graphql/queries/__init__.py | 4 +- .../bot_graphql/queries/discord/__init__.py | 4 +- bot/src/modules/achievements/__init__.py | 4 +- .../modules/achievements/achievements.json | 2 +- .../modules/achievements/commands/__init__.py | 4 +- .../modules/achievements/events/__init__.py | 4 +- .../modules/achievements/model/__init__.py | 4 +- bot/src/modules/auto_role/__init__.py | 4 +- bot/src/modules/auto_role/auto-role.json | 2 +- bot/src/modules/auto_role/command/__init__.py | 4 +- bot/src/modules/auto_role/events/__init__.py | 4 +- bot/src/modules/auto_role/helper/__init__.py | 4 +- bot/src/modules/base/__init__.py | 4 +- bot/src/modules/base/base.json | 2 +- bot/src/modules/base/command/__init__.py | 4 +- bot/src/modules/base/events/__init__.py | 4 +- bot/src/modules/base/forms/__init__.py | 4 +- bot/src/modules/base/helper/__init__.py | 4 +- bot/src/modules/base/model/__init__.py | 4 +- bot/src/modules/base/service/__init__.py | 4 +- bot/src/modules/base/tasks/__init__.py | 4 +- bot/src/modules/boot_log/__init__.py | 4 +- bot/src/modules/boot_log/boot-log.json | 2 +- bot/src/modules/config/__init__.py | 4 +- bot/src/modules/config/config.json | 2 +- bot/src/modules/config/events/__init__.py | 4 +- bot/src/modules/config/service/__init__.py | 4 +- bot/src/modules/database/__init__.py | 4 +- bot/src/modules/database/database.json | 2 +- bot/src/modules/level/__init__.py | 4 +- bot/src/modules/level/command/__init__.py | 4 +- .../modules/level/configuration/__init__.py | 4 +- bot/src/modules/level/events/__init__.py | 4 +- bot/src/modules/level/level.json | 2 +- bot/src/modules/level/service/__init__.py | 4 +- bot/src/modules/short_role_name/__init__.py | 4 +- .../short_role_name/events/__init__.py | 4 +- .../short_role_name/service/__init__.py | 4 +- .../short_role_name/short-role-name.json | 2 +- bot/src/modules/special_offers/__init__.py | 4 +- .../special_offers/special-offers.json | 2 +- bot/src/modules/technician/__init__.py | 4 +- .../modules/technician/command/__init__.py | 4 +- bot/src/modules/technician/technician.json | 2 +- bot/tools/checks/checks.json | 2 +- bot/tools/get_version/get-version.json | 2 +- .../migration_to_sql/migration-to-sql.json | 2 +- bot/tools/post_build/post-build.json | 2 +- bot/tools/set_version/set-version.json | 2 +- web/package.json | 110 +++++++++--------- web/src/assets/version.json | 12 +- 91 files changed, 219 insertions(+), 219 deletions(-) diff --git a/bot/src/bot/__init__.py b/bot/src/bot/__init__.py index 5b677dd7..7302d180 100644 --- a/bot/src/bot/__init__.py +++ b/bot/src/bot/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot/bot.json b/bot/src/bot/bot.json index 291107a8..67b878a1 100644 --- a/bot/src/bot/bot.json +++ b/bot/src/bot/bot.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot/extension/__init__.py b/bot/src/bot/extension/__init__.py index 13e1e382..3c9defe0 100644 --- a/bot/src/bot/extension/__init__.py +++ b/bot/src/bot/extension/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot.extension" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/__init__.py b/bot/src/bot_api/__init__.py index ad722631..20a2e48e 100644 --- a/bot/src/bot_api/__init__.py +++ b/bot/src/bot_api/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/abc/__init__.py b/bot/src/bot_api/abc/__init__.py index 5e155fc4..50ff5a2c 100644 --- a/bot/src/bot_api/abc/__init__.py +++ b/bot/src/bot_api/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/bot-api.json b/bot/src/bot_api/bot-api.json index f939e165..6991012d 100644 --- a/bot/src/bot_api/bot-api.json +++ b/bot/src/bot_api/bot-api.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/bot_api/configuration/__init__.py b/bot/src/bot_api/configuration/__init__.py index 0655beca..efcd2d98 100644 --- a/bot/src/bot_api/configuration/__init__.py +++ b/bot/src/bot_api/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/controller/__init__.py b/bot/src/bot_api/controller/__init__.py index 091e85d2..aff8043a 100644 --- a/bot/src/bot_api/controller/__init__.py +++ b/bot/src/bot_api/controller/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.controller" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/event/__init__.py b/bot/src/bot_api/event/__init__.py index 9ba4dcf5..8b545c6f 100644 --- a/bot/src/bot_api/event/__init__.py +++ b/bot/src/bot_api/event/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.event" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/exception/__init__.py b/bot/src/bot_api/exception/__init__.py index 70ed89de..a528b24c 100644 --- a/bot/src/bot_api/exception/__init__.py +++ b/bot/src/bot_api/exception/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.exception" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/filter/__init__.py b/bot/src/bot_api/filter/__init__.py index 7b0111af..b3b08422 100644 --- a/bot/src/bot_api/filter/__init__.py +++ b/bot/src/bot_api/filter/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.filter" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/filter/discord/__init__.py b/bot/src/bot_api/filter/discord/__init__.py index ed9ec87d..4b158916 100644 --- a/bot/src/bot_api/filter/discord/__init__.py +++ b/bot/src/bot_api/filter/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.filter.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/logging/__init__.py b/bot/src/bot_api/logging/__init__.py index e3d592c1..4f4b5914 100644 --- a/bot/src/bot_api/logging/__init__.py +++ b/bot/src/bot_api/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.logging" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/model/__init__.py b/bot/src/bot_api/model/__init__.py index 6b642c0a..7d13fa0a 100644 --- a/bot/src/bot_api/model/__init__.py +++ b/bot/src/bot_api/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/model/discord/__init__.py b/bot/src/bot_api/model/discord/__init__.py index c694f8f4..2e4242f3 100644 --- a/bot/src/bot_api/model/discord/__init__.py +++ b/bot/src/bot_api/model/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.model.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/route/__init__.py b/bot/src/bot_api/route/__init__.py index a8634642..4fd08fc7 100644 --- a/bot/src/bot_api/route/__init__.py +++ b/bot/src/bot_api/route/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.route" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/service/__init__.py b/bot/src/bot_api/service/__init__.py index 1fe7bb2d..38b39ada 100644 --- a/bot/src/bot_api/service/__init__.py +++ b/bot/src/bot_api/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_api/transformer/__init__.py b/bot/src/bot_api/transformer/__init__.py index 97cc8eae..e7e0178f 100644 --- a/bot/src/bot_api/transformer/__init__.py +++ b/bot/src/bot_api/transformer/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.transformer" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/__init__.py b/bot/src/bot_core/__init__.py index 1cc3166b..7a7b54a5 100644 --- a/bot/src/bot_core/__init__.py +++ b/bot/src/bot_core/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/abc/__init__.py b/bot/src/bot_core/abc/__init__.py index ca11fb06..59d75485 100644 --- a/bot/src/bot_core/abc/__init__.py +++ b/bot/src/bot_core/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/bot-core.json b/bot/src/bot_core/bot-core.json index 1ec06ab6..7a710162 100644 --- a/bot/src/bot_core/bot-core.json +++ b/bot/src/bot_core/bot-core.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot_core/configuration/__init__.py b/bot/src/bot_core/configuration/__init__.py index 9aa40e47..711117bc 100644 --- a/bot/src/bot_core/configuration/__init__.py +++ b/bot/src/bot_core/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/core_extension/__init__.py b/bot/src/bot_core/core_extension/__init__.py index fe0e9aa7..efd1e238 100644 --- a/bot/src/bot_core/core_extension/__init__.py +++ b/bot/src/bot_core/core_extension/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.core_extension" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/events/__init__.py b/bot/src/bot_core/events/__init__.py index e49b4937..e909c3d1 100644 --- a/bot/src/bot_core/events/__init__.py +++ b/bot/src/bot_core/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/exception/__init__.py b/bot/src/bot_core/exception/__init__.py index d0468165..409e96cd 100644 --- a/bot/src/bot_core/exception/__init__.py +++ b/bot/src/bot_core/exception/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.exception" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/helper/__init__.py b/bot/src/bot_core/helper/__init__.py index 6d6503d7..24b34d18 100644 --- a/bot/src/bot_core/helper/__init__.py +++ b/bot/src/bot_core/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/logging/__init__.py b/bot/src/bot_core/logging/__init__.py index f8232b2b..a83d01e3 100644 --- a/bot/src/bot_core/logging/__init__.py +++ b/bot/src/bot_core/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.logging" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/pipes/__init__.py b/bot/src/bot_core/pipes/__init__.py index 0bc72fac..b588e1c4 100644 --- a/bot/src/bot_core/pipes/__init__.py +++ b/bot/src/bot_core/pipes/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.pipes" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_core/service/__init__.py b/bot/src/bot_core/service/__init__.py index 948c9aae..31f89299 100644 --- a/bot/src/bot_core/service/__init__.py +++ b/bot/src/bot_core/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_data/__init__.py b/bot/src/bot_data/__init__.py index 04fbaf54..6795beb8 100644 --- a/bot/src/bot_data/__init__.py +++ b/bot/src/bot_data/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_data/abc/__init__.py b/bot/src/bot_data/abc/__init__.py index 9a8d748a..f1bd3d38 100644 --- a/bot/src/bot_data/abc/__init__.py +++ b/bot/src/bot_data/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_data/bot-data.json b/bot/src/bot_data/bot-data.json index 12a91cd3..2b3b6819 100644 --- a/bot/src/bot_data/bot-data.json +++ b/bot/src/bot_data/bot-data.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot_data/model/__init__.py b/bot/src/bot_data/model/__init__.py index 19d9e316..4c2859d0 100644 --- a/bot/src/bot_data/model/__init__.py +++ b/bot/src/bot_data/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_data/service/__init__.py b/bot/src/bot_data/service/__init__.py index adfaf3f9..ac5db77f 100644 --- a/bot/src/bot_data/service/__init__.py +++ b/bot/src/bot_data/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_graphql/__init__.py b/bot/src/bot_graphql/__init__.py index 3e171b0a..b7e4c4db 100644 --- a/bot/src/bot_graphql/__init__.py +++ b/bot/src/bot_graphql/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_graphql/abc/__init__.py b/bot/src/bot_graphql/abc/__init__.py index 28296e5e..b0e80f39 100644 --- a/bot/src/bot_graphql/abc/__init__.py +++ b/bot/src/bot_graphql/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_graphql/bot-graphql.json b/bot/src/bot_graphql/bot-graphql.json index a18053a8..e4588059 100644 --- a/bot/src/bot_graphql/bot-graphql.json +++ b/bot/src/bot_graphql/bot-graphql.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot_graphql/filter/__init__.py b/bot/src/bot_graphql/filter/__init__.py index f3f75274..a37a17b7 100644 --- a/bot/src/bot_graphql/filter/__init__.py +++ b/bot/src/bot_graphql/filter/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.filter" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_graphql/model/__init__.py b/bot/src/bot_graphql/model/__init__.py index e6e71cae..e2b0deed 100644 --- a/bot/src/bot_graphql/model/__init__.py +++ b/bot/src/bot_graphql/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_graphql/mutations/__init__.py b/bot/src/bot_graphql/mutations/__init__.py index 95d16a20..5cb3fac6 100644 --- a/bot/src/bot_graphql/mutations/__init__.py +++ b/bot/src/bot_graphql/mutations/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.mutations" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_graphql/queries/__init__.py b/bot/src/bot_graphql/queries/__init__.py index c81a7059..c16ae708 100644 --- a/bot/src/bot_graphql/queries/__init__.py +++ b/bot/src/bot_graphql/queries/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/bot_graphql/queries/discord/__init__.py b/bot/src/bot_graphql/queries/discord/__init__.py index 0795ef3f..78a6e70e 100644 --- a/bot/src/bot_graphql/queries/discord/__init__.py +++ b/bot/src/bot_graphql/queries/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/achievements/__init__.py b/bot/src/modules/achievements/__init__.py index 48dd9477..ec38adb7 100644 --- a/bot/src/modules/achievements/__init__.py +++ b/bot/src/modules/achievements/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/achievements/achievements.json b/bot/src/modules/achievements/achievements.json index b0cd672f..df011046 100644 --- a/bot/src/modules/achievements/achievements.json +++ b/bot/src/modules/achievements/achievements.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/modules/achievements/commands/__init__.py b/bot/src/modules/achievements/commands/__init__.py index 67fae23a..c33ef771 100644 --- a/bot/src/modules/achievements/commands/__init__.py +++ b/bot/src/modules/achievements/commands/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.commands" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/achievements/events/__init__.py b/bot/src/modules/achievements/events/__init__.py index 699cc3ba..306968cb 100644 --- a/bot/src/modules/achievements/events/__init__.py +++ b/bot/src/modules/achievements/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/achievements/model/__init__.py b/bot/src/modules/achievements/model/__init__.py index 13fa902d..4d2ca107 100644 --- a/bot/src/modules/achievements/model/__init__.py +++ b/bot/src/modules/achievements/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/auto_role/__init__.py b/bot/src/modules/auto_role/__init__.py index 46418507..e8cb6436 100644 --- a/bot/src/modules/auto_role/__init__.py +++ b/bot/src/modules/auto_role/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/auto_role/auto-role.json b/bot/src/modules/auto_role/auto-role.json index 6c319a77..c8df36df 100644 --- a/bot/src/modules/auto_role/auto-role.json +++ b/bot/src/modules/auto_role/auto-role.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/auto_role/command/__init__.py b/bot/src/modules/auto_role/command/__init__.py index 533d8478..5bfd5cd6 100644 --- a/bot/src/modules/auto_role/command/__init__.py +++ b/bot/src/modules/auto_role/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/auto_role/events/__init__.py b/bot/src/modules/auto_role/events/__init__.py index 517d47cb..f8e9a04d 100644 --- a/bot/src/modules/auto_role/events/__init__.py +++ b/bot/src/modules/auto_role/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/auto_role/helper/__init__.py b/bot/src/modules/auto_role/helper/__init__.py index 6d61ad2b..24b1492d 100644 --- a/bot/src/modules/auto_role/helper/__init__.py +++ b/bot/src/modules/auto_role/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/__init__.py b/bot/src/modules/base/__init__.py index 1d8b7b4f..1933ed85 100644 --- a/bot/src/modules/base/__init__.py +++ b/bot/src/modules/base/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/base.json b/bot/src/modules/base/base.json index bcbdc270..432a0ef5 100644 --- a/bot/src/modules/base/base.json +++ b/bot/src/modules/base/base.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/base/command/__init__.py b/bot/src/modules/base/command/__init__.py index 9afba00c..424be890 100644 --- a/bot/src/modules/base/command/__init__.py +++ b/bot/src/modules/base/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/events/__init__.py b/bot/src/modules/base/events/__init__.py index 26253749..12968248 100644 --- a/bot/src/modules/base/events/__init__.py +++ b/bot/src/modules/base/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/forms/__init__.py b/bot/src/modules/base/forms/__init__.py index 787cea44..86dcea7a 100644 --- a/bot/src/modules/base/forms/__init__.py +++ b/bot/src/modules/base/forms/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.forms" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/helper/__init__.py b/bot/src/modules/base/helper/__init__.py index 60ff3b74..9e318071 100644 --- a/bot/src/modules/base/helper/__init__.py +++ b/bot/src/modules/base/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/model/__init__.py b/bot/src/modules/base/model/__init__.py index f5193957..9fa8c84f 100644 --- a/bot/src/modules/base/model/__init__.py +++ b/bot/src/modules/base/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/service/__init__.py b/bot/src/modules/base/service/__init__.py index 412c3181..f6e06ce9 100644 --- a/bot/src/modules/base/service/__init__.py +++ b/bot/src/modules/base/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/base/tasks/__init__.py b/bot/src/modules/base/tasks/__init__.py index 7305b8e8..eb45bf62 100644 --- a/bot/src/modules/base/tasks/__init__.py +++ b/bot/src/modules/base/tasks/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.tasks" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/boot_log/__init__.py b/bot/src/modules/boot_log/__init__.py index 3a6b4189..2f19bc51 100644 --- a/bot/src/modules/boot_log/__init__.py +++ b/bot/src/modules/boot_log/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.boot_log" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/boot_log/boot-log.json b/bot/src/modules/boot_log/boot-log.json index 844e3451..e0369c49 100644 --- a/bot/src/modules/boot_log/boot-log.json +++ b/bot/src/modules/boot_log/boot-log.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/config/__init__.py b/bot/src/modules/config/__init__.py index cff5939e..67a874b0 100644 --- a/bot/src/modules/config/__init__.py +++ b/bot/src/modules/config/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/config/config.json b/bot/src/modules/config/config.json index 7607c426..93c9db60 100644 --- a/bot/src/modules/config/config.json +++ b/bot/src/modules/config/config.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/config/events/__init__.py b/bot/src/modules/config/events/__init__.py index bb3c96fa..0c838c32 100644 --- a/bot/src/modules/config/events/__init__.py +++ b/bot/src/modules/config/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/config/service/__init__.py b/bot/src/modules/config/service/__init__.py index bddcbca9..8650179b 100644 --- a/bot/src/modules/config/service/__init__.py +++ b/bot/src/modules/config/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/database/__init__.py b/bot/src/modules/database/__init__.py index bfc22236..946b26a9 100644 --- a/bot/src/modules/database/__init__.py +++ b/bot/src/modules/database/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.database" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/database/database.json b/bot/src/modules/database/database.json index d0aa7b77..0bfe7adc 100644 --- a/bot/src/modules/database/database.json +++ b/bot/src/modules/database/database.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/modules/level/__init__.py b/bot/src/modules/level/__init__.py index 97c1e810..6a32644b 100644 --- a/bot/src/modules/level/__init__.py +++ b/bot/src/modules/level/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/level/command/__init__.py b/bot/src/modules/level/command/__init__.py index 2c7572f1..0c75bc16 100644 --- a/bot/src/modules/level/command/__init__.py +++ b/bot/src/modules/level/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/level/configuration/__init__.py b/bot/src/modules/level/configuration/__init__.py index 1b9d6243..d337a25b 100644 --- a/bot/src/modules/level/configuration/__init__.py +++ b/bot/src/modules/level/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/level/events/__init__.py b/bot/src/modules/level/events/__init__.py index 15333406..8fae2e51 100644 --- a/bot/src/modules/level/events/__init__.py +++ b/bot/src/modules/level/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/level/level.json b/bot/src/modules/level/level.json index 99489f98..deaceba8 100644 --- a/bot/src/modules/level/level.json +++ b/bot/src/modules/level/level.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/level/service/__init__.py b/bot/src/modules/level/service/__init__.py index 061e1b64..76999ade 100644 --- a/bot/src/modules/level/service/__init__.py +++ b/bot/src/modules/level/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/short_role_name/__init__.py b/bot/src/modules/short_role_name/__init__.py index 5b37fe25..8ffefb7f 100644 --- a/bot/src/modules/short_role_name/__init__.py +++ b/bot/src/modules/short_role_name/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.short_role_name" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/short_role_name/events/__init__.py b/bot/src/modules/short_role_name/events/__init__.py index 2f465d90..77c24ed9 100644 --- a/bot/src/modules/short_role_name/events/__init__.py +++ b/bot/src/modules/short_role_name/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.short_role_name.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/short_role_name/service/__init__.py b/bot/src/modules/short_role_name/service/__init__.py index 7e20ef2b..e9bb6b77 100644 --- a/bot/src/modules/short_role_name/service/__init__.py +++ b/bot/src/modules/short_role_name/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.short_role_name.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/short_role_name/short-role-name.json b/bot/src/modules/short_role_name/short-role-name.json index b9d06c11..5d385328 100644 --- a/bot/src/modules/short_role_name/short-role-name.json +++ b/bot/src/modules/short_role_name/short-role-name.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/special_offers/__init__.py b/bot/src/modules/special_offers/__init__.py index d428c157..da09a624 100644 --- a/bot/src/modules/special_offers/__init__.py +++ b/bot/src/modules/special_offers/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.special_offers" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/special_offers/special-offers.json b/bot/src/modules/special_offers/special-offers.json index 0461867d..44c973ba 100644 --- a/bot/src/modules/special_offers/special-offers.json +++ b/bot/src/modules/special_offers/special-offers.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/technician/__init__.py b/bot/src/modules/technician/__init__.py index 02c838b9..b84b488e 100644 --- a/bot/src/modules/technician/__init__.py +++ b/bot/src/modules/technician/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.technician" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/technician/command/__init__.py b/bot/src/modules/technician/command/__init__.py index 221b0525..fd17e180 100644 --- a/bot/src/modules/technician/command/__init__.py +++ b/bot/src/modules/technician/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.technician.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.5" +__version__ = "1.2.6" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="5") +version_info = VersionInfo(major="1", minor="2", micro="6") diff --git a/bot/src/modules/technician/technician.json b/bot/src/modules/technician/technician.json index c1133497..4e0989d1 100644 --- a/bot/src/modules/technician/technician.json +++ b/bot/src/modules/technician/technician.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/tools/checks/checks.json b/bot/tools/checks/checks.json index 4427a4b8..ab11908e 100644 --- a/bot/tools/checks/checks.json +++ b/bot/tools/checks/checks.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/tools/get_version/get-version.json b/bot/tools/get_version/get-version.json index c8032b8d..401b058b 100644 --- a/bot/tools/get_version/get-version.json +++ b/bot/tools/get_version/get-version.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/tools/migration_to_sql/migration-to-sql.json b/bot/tools/migration_to_sql/migration-to-sql.json index ef429593..21d60072 100644 --- a/bot/tools/migration_to_sql/migration-to-sql.json +++ b/bot/tools/migration_to_sql/migration-to-sql.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "", "AuthorEmail": "", diff --git a/bot/tools/post_build/post-build.json b/bot/tools/post_build/post-build.json index 14d378b8..c34445fa 100644 --- a/bot/tools/post_build/post-build.json +++ b/bot/tools/post_build/post-build.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/tools/set_version/set-version.json b/bot/tools/set_version/set-version.json index 0074bab6..2c7eec69 100644 --- a/bot/tools/set_version/set-version.json +++ b/bot/tools/set_version/set-version.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "5" + "Micro": "6" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/web/package.json b/web/package.json index 870526c1..6ee75850 100644 --- a/web/package.json +++ b/web/package.json @@ -1,56 +1,56 @@ { - "name": "web", - "version": "1.2.5", - "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 + "name": "web", + "version": "1.2.6", + "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" + } +} diff --git a/web/src/assets/version.json b/web/src/assets/version.json index e246eee3..79012f30 100644 --- a/web/src/assets/version.json +++ b/web/src/assets/version.json @@ -1,7 +1,7 @@ { - "WebVersion": { - "Major": "1", - "Minor": "2", - "Micro": "5" - } -} \ No newline at end of file + "WebVersion": { + "Major": "1", + "Minor": "2", + "Micro": "6" + } +} From 4d386759c051efdfa2a2445509574d86a0100ab2 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 11:06:01 +0100 Subject: [PATCH 06/18] Improved data import --- .../data-import-and-export.component.ts | 24 +++++++++---------- .../achievement/achievement.component.ts | 2 +- .../components/levels/levels.component.ts | 2 +- .../scheduled-events.component.ts | 2 +- .../short-role-names.component.ts | 9 +++++-- .../user-warning/user-warning.component.html | 8 +++---- .../user-warning/user-warning.component.ts | 2 +- 7 files changed, 26 insertions(+), 23 deletions(-) diff --git a/web/src/app/modules/shared/components/data-import-and-export/data-import-and-export.component.ts b/web/src/app/modules/shared/components/data-import-and-export/data-import-and-export.component.ts index 8bab8927..2d49e508 100644 --- a/web/src/app/modules/shared/components/data-import-and-export/data-import-and-export.component.ts +++ b/web/src/app/modules/shared/components/data-import-and-export/data-import-and-export.component.ts @@ -1,7 +1,6 @@ import { Component, EventEmitter, Input, Output, ViewChild } from "@angular/core"; import { ToastService } from "../../../../services/toast/toast.service"; import { TranslateService } from "@ngx-translate/core"; -import { elementAt } from "rxjs"; interface UploadEvent { originalEvent: Event; @@ -60,22 +59,21 @@ export class DataImportAndExportComponent { const fileReader = new FileReader(); fileReader.onload = () => { if (!fileReader.result) return; - const newData: any[] = JSON.parse(fileReader.result.toString()); + let incomingData: any[] = JSON.parse(fileReader.result.toString()); this.upload.clear(); - newData.forEach(element => { - element.id = 0; - }); - this.data.forEach(element => { - const existingElement = newData.find(x => this.validator(x, element)); + + let newData: any[]; + newData = []; + + incomingData.forEach(element => { + const existingElement = this.data.find(x => this.validator(x, element)); if (existingElement) { - const index = this.data.indexOf(element); - const oldId = element.id; - element = existingElement; - element.id = oldId; - this.data[index] = element; - newData.splice(newData.indexOf(existingElement), 1); + this.data[this.data.indexOf(existingElement)] = element; + } else { + newData.push(element); } }); + this.callback(this.data, false); this.callback(newData, true); this.data.push(...newData); diff --git a/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts b/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts index e2b6e508..547e42f7 100644 --- a/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts +++ b/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts @@ -87,7 +87,7 @@ export class AchievementComponent extends ComponentWithTable implements OnInit, private route: ActivatedRoute) { super("achievement", ["id", "name", "description", "attribute", "operator", "value"], (oldElement: Achievement, newElement: Achievement) => { - return oldElement.name === newElement.name; + return oldElement.id === newElement.id; }); } diff --git a/web/src/app/modules/view/server/levels/components/levels/levels.component.ts b/web/src/app/modules/view/server/levels/components/levels/levels.component.ts index 19cb3469..32e713cd 100644 --- a/web/src/app/modules/view/server/levels/components/levels/levels.component.ts +++ b/web/src/app/modules/view/server/levels/components/levels/levels.component.ts @@ -73,7 +73,7 @@ export class LevelsComponent extends ComponentWithTable implements OnInit, OnDes private route: ActivatedRoute ) { super("level", ["id", "icon", "name", "color", "min_xp", "permissions"], (oldElement: Level, newElement: Level) => { - return oldElement.name === newElement.name; + return oldElement.id === newElement.id; }); } diff --git a/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts b/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts index a41c585c..ff31e343 100644 --- a/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts +++ b/web/src/app/modules/view/server/scheduled-events/components/scheduled-events/scheduled-events.component.ts @@ -87,7 +87,7 @@ export class ScheduledEventsComponent extends ComponentWithTable implements OnIn private route: ActivatedRoute) { super("ScheduledEvent", ["id", "interval", "name", "description", "channel_id", "start_time", "end_time", "type", "location"], (oldElement: ScheduledEvent, newElement: ScheduledEvent) => { - return oldElement.name === newElement.name; + return oldElement.id === newElement.id; }); } diff --git a/web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts b/web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts index f20fe69e..f74130e4 100644 --- a/web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts +++ b/web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts @@ -16,7 +16,12 @@ import { Sort, SortDirection } from "../../../../../../models/graphql/filter/sor import { Subject, throwError } from "rxjs"; import { UserDTO } from "../../../../../../models/auth/auth-user.dto"; import { Queries } from "../../../../../../models/graphql/queries.model"; -import { ShortRoleNameListQuery, Query, SingleDiscordQuery, ShortRoleNamePositionsQuery } from "../../../../../../models/graphql/query.model"; +import { + Query, + ShortRoleNameListQuery, + ShortRoleNamePositionsQuery, + SingleDiscordQuery +} from "../../../../../../models/graphql/query.model"; import { catchError, debounceTime, takeUntil } from "rxjs/operators"; import { LazyLoadEvent, MenuItem } from "primeng/api"; import { Table } from "primeng/table"; @@ -74,7 +79,7 @@ export class ShortRoleNamesComponent extends ComponentWithTable implements OnIni private route: ActivatedRoute ) { super("short-role-names", ["id", "name", "role", "position"], (oldElement: ShortRoleName, newElement: ShortRoleName) => { - return oldElement.shortName === newElement.shortName && + return oldElement.id === newElement.id && oldElement.roleId === newElement.roleId; }); } diff --git a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html index 2cdc08c9..22393b64 100644 --- a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html +++ b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.html @@ -52,7 +52,7 @@ - +
{{'common.member' | translate}}
@@ -98,7 +98,7 @@ placeholder="{{'common.description' | translate}}"> - +
@@ -144,8 +144,8 @@ - - {{'common.user' | translate}}: + + {{'common.member' | translate}}: { return oldElement.id === newElement.id; }); From df9c889c7ee2871fded42dbfe7c94a90c3128c8d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 11:32:42 +0100 Subject: [PATCH 07/18] Fixed add new user warning --- .../components/user-warning/user-warning.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts index 1c6a620c..749b0323 100644 --- a/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts +++ b/web/src/app/modules/view/server/user-warning/components/user-warning/user-warning.component.ts @@ -183,6 +183,7 @@ export class UserWarningComponent extends ComponentWithTable implements OnInit, } this.updateUserByWarning(newUserWarning.user?.id ?? 0, this.userWarnings.filter(uw => uw.user?.id == newUserWarning.user?.id)); + this.isEditingNew = false; } public onRowEditCancel(index: number): void { From b0990b626c215ec664b97ec94988a2867cb2b22e Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 11:36:42 +0100 Subject: [PATCH 08/18] Fixed third user warning --- bot/src/modules/base/service/user_warnings_service.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bot/src/modules/base/service/user_warnings_service.py b/bot/src/modules/base/service/user_warnings_service.py index 125b82a2..7eaa8141 100644 --- a/bot/src/modules/base/service/user_warnings_service.py +++ b/bot/src/modules/base/service/user_warnings_service.py @@ -92,13 +92,10 @@ class UserWarningsService: elif existing_warnings.count() == 3: server = self._servers.get_server_by_discord_id(member.guild.id) user = self._users.get_user_by_discord_id_and_server_id(member.id, server.id) - levels = self._levels.get_levels_by_server_id(server.id) - new_level = levels.where(lambda l: l.min_xp > 0).order_by(lambda l: l.min_xp).last_or_default() - if new_level is not None: - user.xp = new_level.min_xp - self._users.update_user(user) - self._db.save_changes() + user.xp = 0 + self._users.update_user(user) + self._db.save_changes() await self.notify_user(member, self._t.transform("modules.base.warnings.third")) elif existing_warnings.count() >= 4: From 31c62b4108551e91cf571bd1537de390659bddb3 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 11:37:36 +0100 Subject: [PATCH 09/18] Added missing translations --- web/src/assets/i18n/de.json | 6 ++++++ web/src/assets/i18n/en.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/web/src/assets/i18n/de.json b/web/src/assets/i18n/de.json index 6461cd4c..7dcfcf2c 100644 --- a/web/src/assets/i18n/de.json +++ b/web/src/assets/i18n/de.json @@ -374,6 +374,12 @@ "save": "Speichern", "wrong_password": "Falsches Passwort" }, + "change_password": { + "message": { + "error": "Fehler", + "password_cannot_be_changed": "Passwort konnte nicht geändert werden" + } + }, "dashboard": { "filter": { "name": "Name" diff --git a/web/src/assets/i18n/en.json b/web/src/assets/i18n/en.json index 18cd2b0e..4ded8551 100644 --- a/web/src/assets/i18n/en.json +++ b/web/src/assets/i18n/en.json @@ -374,6 +374,12 @@ "save": "Save", "wrong_password": "Wrong password" }, + "change_password": { + "message": { + "error": "Error", + "password_cannot_be_changed": "Password change failed" + } + }, "dashboard": { "filter": { "name": "Name" From 7888783b6a3136135598c1ec745158c5bdd7bebf Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 11:46:48 +0100 Subject: [PATCH 10/18] Fixed registration by discord --- bot/src/bot_api/controller/auth_controller.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bot/src/bot_api/controller/auth_controller.py b/bot/src/bot_api/controller/auth_controller.py index 12ec2b9b..085f03a6 100644 --- a/bot/src/bot_api/controller/auth_controller.py +++ b/bot/src/bot_api/controller/auth_controller.py @@ -86,11 +86,6 @@ class AuthController: @Route.post(f"{BasePath}/register-by-id/") async def register_id(self, id: str): - if not FeatureFlagsSettings.get_flag_from_dict( - self._technician_config.feature_flags, FeatureFlagsEnum.basic_registration - ): - return - result = await self._auth_service.confirm_email_async(id) return jsonify(result) From ca5db6d3972b7168e087daa32ee00147c75e3a20 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 11:53:51 +0100 Subject: [PATCH 11/18] Fixed achievement can see element --- bot/src/bot_graphql/abc/query_abc.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bot/src/bot_graphql/abc/query_abc.py b/bot/src/bot_graphql/abc/query_abc.py index cfd18ac6..10b9b8f3 100644 --- a/bot/src/bot_graphql/abc/query_abc.py +++ b/bot/src/bot_graphql/abc/query_abc.py @@ -101,9 +101,7 @@ class QueryABC(ObjectType): element: Achievement = element for u in user.users: u: User = u - guild = bot.get_guild(u.server.discord_id) - member = guild.get_member(u.discord_id) - if permissions.is_member_moderator(member) and u.server.id == element.server.id: + if u.server.id == element.server.id: access = True break From 07fc5126338ee0665fcafd3366912c0cf94ecadc Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 12:11:20 +0100 Subject: [PATCH 12/18] Made levels & Achievements public --- .../achievement/achievement.component.html | 36 ++++++++++++------- .../components/levels/levels.component.html | 12 +++---- .../view/server/server-routing.module.ts | 9 ++--- .../app/services/sidebar/sidebar.service.ts | 4 +-- 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html b/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html index 45e43f36..bed61c7d 100644 --- a/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html +++ b/web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html @@ -3,7 +3,8 @@
- @@ -17,17 +18,20 @@ {{'view.server.achievements.achievements' | translate}}
- +
-
@@ -179,7 +183,8 @@ {{'common.operator' | translate}}: - + {{achievement.operator}} @@ -200,7 +205,8 @@ - + {{achievement.value}} @@ -209,7 +215,8 @@ - + {{achievement.value}} @@ -241,16 +248,21 @@
- + + (click)="onRowEditInit(dt, achievement, ri)" + [disabled]="!user || !user.isModerator && !user.isAdmin"> + (click)="deleteAchievement(achievement)" + [disabled]="!user || !user.isModerator && !user.isAdmin"> + icon="pi pi-check-circle" (click)="onRowEditSave(achievement, ri)" + [disabled]="!user || !user.isModerator && !user.isAdmin"> + icon="pi pi-times-circle" (click)="onRowEditCancel(ri)" + [disabled]="!user || !user.isModerator && !user.isAdmin">
diff --git a/web/src/app/modules/view/server/levels/components/levels/levels.component.html b/web/src/app/modules/view/server/levels/components/levels/levels.component.html index 1668d850..3b9168cb 100644 --- a/web/src/app/modules/view/server/levels/components/levels/levels.component.html +++ b/web/src/app/modules/view/server/levels/components/levels/levels.component.html @@ -25,12 +25,12 @@
-
@@ -219,17 +219,17 @@ translationKey="view.server.levels.header"> + [disabled]="!user || !user.isModerator && !user.isAdmin"> + [disabled]="!user || !user.isModerator && !user.isAdmin"> + [disabled]="!user || !user.isModerator && !user.isAdmin"> + [disabled]="!user || !user.isModerator && !user.isAdmin"> diff --git a/web/src/app/modules/view/server/server-routing.module.ts b/web/src/app/modules/view/server/server-routing.module.ts index 732c1af8..512ea409 100644 --- a/web/src/app/modules/view/server/server-routing.module.ts +++ b/web/src/app/modules/view/server/server-routing.module.ts @@ -28,16 +28,11 @@ const routes: Routes = [ data: { memberRole: MemberRoles.Moderator } }, { - path: "levels", - loadChildren: () => import("./levels/levels.module").then(m => m.LevelsModule), - canActivate: [AuthGuard], - data: { memberRole: MemberRoles.Moderator } + path: "levels", loadChildren: () => import("./levels/levels.module").then(m => m.LevelsModule) }, { path: "achievements", - loadChildren: () => import("./achievements/achievements.module").then(m => m.AchievementsModule), - canActivate: [AuthGuard], - data: { memberRole: MemberRoles.Moderator } + loadChildren: () => import("./achievements/achievements.module").then(m => m.AchievementsModule) }, { path: "short-role-names", diff --git a/web/src/app/services/sidebar/sidebar.service.ts b/web/src/app/services/sidebar/sidebar.service.ts index 623a9118..4aa35ef5 100644 --- a/web/src/app/services/sidebar/sidebar.service.ts +++ b/web/src/app/services/sidebar/sidebar.service.ts @@ -203,8 +203,8 @@ export class SidebarService { this.serverMembers.visible = isTechnicianAndFullAccessActive || user?.isModerator; this.serverUserWarnings.visible = isTechnicianAndFullAccessActive || user?.isModerator; this.serverAutoRoles.visible = isTechnicianAndFullAccessActive || this.hasFeature("AutoRoleModule") && user?.isModerator; - this.serverLevels.visible = isTechnicianAndFullAccessActive || this.hasFeature("LevelModule") && user?.isModerator; - this.serverAchievements.visible = isTechnicianAndFullAccessActive || this.hasFeature("AchievementsModule") && user?.isModerator; + this.serverLevels.visible = true; + this.serverAchievements.visible = true; this.serverScheduledEvents.visible = isTechnicianAndFullAccessActive || this.hasFeature("ScheduledEvents") && user?.isModerator; this.serverShortRoleNames.visible = isTechnicianAndFullAccessActive || this.hasFeature("ShortRoleName") && user?.isAdmin; From 7185b087c98dad302616b269533b6286371fcdf5 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 12:13:53 +0100 Subject: [PATCH 13/18] Fixed level page --- bot/src/bot_graphql/queries/level_query.py | 5 +---- .../server/levels/components/levels/levels.component.html | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bot/src/bot_graphql/queries/level_query.py b/bot/src/bot_graphql/queries/level_query.py index d0762f95..d4a539b7 100644 --- a/bot/src/bot_graphql/queries/level_query.py +++ b/bot/src/bot_graphql/queries/level_query.py @@ -9,10 +9,7 @@ class LevelQuery(DataQueryWithHistoryABC): DataQueryWithHistoryABC.__init__(self, "Level", "LevelsHistory", LevelHistory, db) self.set_field("id", lambda x, *_: x.id) - self.set_field( - "iconURL", - lambda x, *_: "https://cdn.discordapp.com/emojis/1170348708894875659.webp?size=32&quality=lossless", - ) + self.set_field("iconURL", lambda x, *_: x.icon_url) self.set_field("name", lambda x, *_: x.name) self.set_field("color", lambda x, *_: x.color) self.set_field("minXp", lambda x, *_: x.min_xp) diff --git a/web/src/app/modules/view/server/levels/components/levels/levels.component.html b/web/src/app/modules/view/server/levels/components/levels/levels.component.html index 3b9168cb..2263c5f1 100644 --- a/web/src/app/modules/view/server/levels/components/levels/levels.component.html +++ b/web/src/app/modules/view/server/levels/components/levels/levels.component.html @@ -45,10 +45,9 @@ - +
{{'common.icon' | translate}}
-
From 8318dfe9886b1ff8c584beadd23cb757aab58155 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 12:16:13 +0100 Subject: [PATCH 14/18] Fixed user avatar url --- bot/src/bot_data/model/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/bot_data/model/user.py b/bot/src/bot_data/model/user.py index 697511a2..e9c3b30b 100644 --- a/bot/src/bot_data/model/user.py +++ b/bot/src/bot_data/model/user.py @@ -178,7 +178,7 @@ class User(TableABC): def profile_picture_url(self, bot: DiscordBotServiceABC) -> str: guild = bot.get_guild(self.server.discord_id) user = guild.get_member(self._discord_id) - return None if user is None else user.avatar.url + return None if user is None or user.avatar is None else user.avatar.url @staticmethod def get_select_all_string() -> str: From 8cd5a0d0402b4bdef3aa72ca28012d9341526db9 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 12:41:26 +0100 Subject: [PATCH 15/18] Fixed mail --- bot/src/bot_api/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/bot_api/config b/bot/src/bot_api/config index 521951b8..688e99ae 160000 --- a/bot/src/bot_api/config +++ b/bot/src/bot_api/config @@ -1 +1 @@ -Subproject commit 521951b8abb0f784b59b6d3e0210606fa193e60a +Subproject commit 688e99ae2a075f2db47d05050856661462cf0f09 From a24fefd3e22352195ecb18aa2119680c2f02c4ea Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 14:03:47 +0100 Subject: [PATCH 16/18] Fixed test mail & delete auth user --- bot/src/bot/translation/de.json | 2 +- bot/src/bot_data/model/auth_user.py | 9 +++++++++ bot/src/bot_data/service/auth_user_repository_service.py | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bot/src/bot/translation/de.json b/bot/src/bot/translation/de.json index 45f64e14..60b069a8 100644 --- a/bot/src/bot/translation/de.json +++ b/bot/src/bot/translation/de.json @@ -2,7 +2,7 @@ "api": { "api": { "test_mail": { - "message": "Dies ist eine Test-Mail vom Krümelmonster Web Interface\nGesendet von {}-{}", + "message": "Dies ist eine Test-Mail vom Kruemelmonster Web Interface\r\nGesendet von {}-{}", "subject": "Krümelmonster Web Interface Test-Mail" } }, diff --git a/bot/src/bot_data/model/auth_user.py b/bot/src/bot_data/model/auth_user.py index 47bdf41a..13c77bd6 100644 --- a/bot/src/bot_data/model/auth_user.py +++ b/bot/src/bot_data/model/auth_user.py @@ -258,6 +258,15 @@ class AuthUser(TableABC): """ ) + @property + def delete_relations_string(self) -> str: + return str( + f""" + DELETE FROM `AuthUserUsersRelations` + WHERE `AuthUserId` = {self._auth_user_id}; + """ + ) + @property def delete_string(self) -> str: return str( diff --git a/bot/src/bot_data/service/auth_user_repository_service.py b/bot/src/bot_data/service/auth_user_repository_service.py index 70ebb786..1f657d3a 100644 --- a/bot/src/bot_data/service/auth_user_repository_service.py +++ b/bot/src/bot_data/service/auth_user_repository_service.py @@ -164,6 +164,7 @@ class AuthUserRepositoryService(AuthUserRepositoryABC): def delete_auth_user(self, user: AuthUser): self._logger.trace(__name__, f"Send SQL command: {user.delete_string}") + self._context.cursor.execute(user.delete_relations_string) self._context.cursor.execute(user.delete_string) def add_auth_user_user_rel(self, rel: AuthUserUsersRelation): From 60d81ce18b5f6663709be59dc4d1e301adf5fb63 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 15:32:01 +0100 Subject: [PATCH 17/18] Resend confirmation mail --- bot/src/bot/translation/de.json | 8 ++-- bot/src/bot_api/abc/auth_service_abc.py | 4 ++ bot/src/bot_api/controller/auth_controller.py | 5 +++ .../controller/auth_discord_controller.py | 10 ++++- bot/src/bot_api/service/auth_service.py | 16 ++++--- .../auth/components/login/login.component.ts | 43 ++++++++++++++----- web/src/app/services/auth/auth.service.ts | 28 ++++-------- web/src/assets/i18n/de.json | 3 +- web/src/assets/i18n/en.json | 3 +- 9 files changed, 77 insertions(+), 43 deletions(-) diff --git a/bot/src/bot/translation/de.json b/bot/src/bot/translation/de.json index 60b069a8..d6631bd1 100644 --- a/bot/src/bot/translation/de.json +++ b/bot/src/bot/translation/de.json @@ -2,22 +2,22 @@ "api": { "api": { "test_mail": { - "message": "Dies ist eine Test-Mail vom Kruemelmonster Web Interface\r\nGesendet von {}-{}", + "message": "Dies ist eine Test-Mail vom Krümelmonster Web Interface\r\nGesendet von {}-{}", "subject": "Krümelmonster Web Interface Test-Mail" } }, "auth": { "confirmation": { - "message": "Öffne den Link, um die E-Mail zu bestätigen:\n{}auth/register/{}", + "message": "Öffne den Link, um die E-Mail zu bestätigen:\r\n{}auth/register/{}", "subject": "E-Mail für {} {} bestätigen" }, "forgot_password": { - "message": "Öffne den Link, um das Passwort zu ändern:\n{}auth/forgot-password/{}", + "message": "Öffne den Link, um das Passwort zu ändern:\r\n{}auth/forgot-password/{}", "subject": "Passwort für {} {} zurücksetzen" } }, "mail": { - "automatic_mail": "\n\nDies ist eine automatische E-Mail.\nGesendet von {}-{}@{}" + "automatic_mail": "\r\n\r\nDies ist eine automatische E-Mail.\r\nGesendet von {}-{}@{}" } }, "common": { diff --git a/bot/src/bot_api/abc/auth_service_abc.py b/bot/src/bot_api/abc/auth_service_abc.py index 1ba5fbbb..c72d0d14 100644 --- a/bot/src/bot_api/abc/auth_service_abc.py +++ b/bot/src/bot_api/abc/auth_service_abc.py @@ -114,3 +114,7 @@ class AuthServiceABC(ABC): @abstractmethod async def reset_password_async(self, rp_dto: ResetPasswordDTO): pass + + @abstractmethod + async def resend_confirmation_email_by_mail(self, mail: str): + pass diff --git a/bot/src/bot_api/controller/auth_controller.py b/bot/src/bot_api/controller/auth_controller.py index 085f03a6..6f13abdc 100644 --- a/bot/src/bot_api/controller/auth_controller.py +++ b/bot/src/bot_api/controller/auth_controller.py @@ -84,6 +84,11 @@ class AuthController: self._auth_service.add_auth_user(dto) return "", 200 + @Route.post(f"{BasePath}/resend-confirmation-email-by-mail/") + async def resend_confirmation_email_by_user_id(self, mail: str): + await self._auth_service.resend_confirmation_email_by_mail(mail) + return "", 200 + @Route.post(f"{BasePath}/register-by-id/") async def register_id(self, id: str): result = await self._auth_service.confirm_email_async(id) diff --git a/bot/src/bot_api/controller/auth_discord_controller.py b/bot/src/bot_api/controller/auth_discord_controller.py index 8ad193cc..6c3b1d0f 100644 --- a/bot/src/bot_api/controller/auth_discord_controller.py +++ b/bot/src/bot_api/controller/auth_discord_controller.py @@ -16,6 +16,7 @@ from bot_api.api import Api from bot_api.configuration.discord_authentication_settings import ( DiscordAuthenticationSettings, ) +from bot_api.exception.service_exception import ServiceException from bot_api.logging.api_logger import ApiLogger from bot_api.model.auth_user_dto import AuthUserDTO from bot_api.route.route import Route @@ -90,5 +91,10 @@ class AuthDiscordController: AuthRoleEnum.normal, ) - result = await self._auth_service.login_discord_async(dto, response["id"]) - return jsonify(result.to_dict()) + try: + result = await self._auth_service.login_discord_async(dto, response["id"]) + return jsonify(result.to_dict()) + except ServiceException as e: + r = jsonify({"email": dto.email}) + r.status_code = 403 + return r diff --git a/bot/src/bot_api/service/auth_service.py b/bot/src/bot_api/service/auth_service.py index 94410b52..a38fb903 100644 --- a/bot/src/bot_api/service/auth_service.py +++ b/bot/src/bot_api/service/auth_service.py @@ -1,6 +1,5 @@ import hashlib import re -import textwrap import uuid from datetime import datetime, timedelta, timezone from threading import Thread @@ -172,11 +171,7 @@ class AuthService(AuthServiceABC): mail.add_header("Content-Transfer-Encoding: quoted-printable") mail.add_receiver(str(email)) mail.subject = subject - mail.body = textwrap.dedent( - f"""{message} - {self._t.transform('api.mail.automatic_mail').format(self._environment.application_name, self._environment.environment_name, self._environment.host_name)} - """ - ) + mail.body = f"{message}\r\n{self._t.transform('api.mail.automatic_mail').format(self._environment.application_name, self._environment.environment_name, self._environment.host_name)}" thr = Thread(target=self._mailer.send_mail, args=[mail]) thr.start() @@ -599,3 +594,12 @@ class AuthService(AuthServiceABC): user.forgot_password_id = None self._auth_users.update_auth_user(user) self._db.save_changes() + + async def resend_confirmation_email_by_mail(self, mail: str): + user = self._auth_users.find_auth_user_by_email(mail) + if user is None: + raise ServiceException(ServiceErrorCode.InvalidUser, f"User not found") + if user.confirmation_id is None: + raise ServiceException(ServiceErrorCode.DataAlreadyExists, f"User already confirmed") + + self._send_confirmation_id_to_user(user) diff --git a/web/src/app/modules/auth/components/login/login.component.ts b/web/src/app/modules/auth/components/login/login.component.ts index 6244a373..be1c51ba 100644 --- a/web/src/app/modules/auth/components/login/login.component.ts +++ b/web/src/app/modules/auth/components/login/login.component.ts @@ -69,6 +69,17 @@ export class LoginComponent implements OnInit { this.spinnerService.hideSpinner(); } + openConfirmationMailInfo(email: string) { + this.confirmDialog.confirmDialog( + this.translate.instant( + "auth.login.message.confirm_email"), + this.translate.instant( + "auth.login.message.confirm_email_d", + { email: email } + ) + ); + } + checkDiscordLogin() { this.route.queryParams.pipe(catchError(err => { this.spinnerService.hideSpinner(); @@ -87,19 +98,31 @@ export class LoginComponent implements OnInit { this.spinnerService.hideSpinner(); this.router.navigate(["auth", "login"]).then(() => { }); - this.state = ""; - this.code = ""; + this.confirmDialog.confirmDialog( + this.translate.instant( + "auth.login.message.confirm_email"), + this.translate.instant( + "auth.login.message.confirm_email_resend" + ), + () => { + this.authService.resendConfirmationMailByMail(err.error.email).subscribe(mail => { + this.openConfirmationMailInfo(err.error.email); + } + ); + + this.state = ""; + this.code = ""; + }, + () => { + this.state = ""; + this.code = ""; + } + ); + return throwError(() => err); })).subscribe(token => { if (token.firstLogin) { - this.confirmDialog.confirmDialog( - this.translate.instant( - "auth.login.message.confirm_email"), - this.translate.instant( - "auth.login.message.confirm_email_d", - { email: this.authService.getEMailFromDecodedToken(this.authService.getDecodedToken(token)) } - ) - ); + this.openConfirmationMailInfo(this.authService.getEMailFromDecodedToken(this.authService.getDecodedToken(token)) ?? ""); } this.authService.saveToken(token); diff --git a/web/src/app/services/auth/auth.service.ts b/web/src/app/services/auth/auth.service.ts index f51db323..58db32e7 100644 --- a/web/src/app/services/auth/auth.service.ts +++ b/web/src/app/services/auth/auth.service.ts @@ -2,7 +2,7 @@ import { HttpClient, HttpHeaders } from "@angular/common/http"; import { Injectable } from "@angular/core"; import { Router } from "@angular/router"; import { JwtHelperService } from "@auth0/angular-jwt"; -import { BehaviorSubject, firstValueFrom, Observable, Subject, Subscription, throwError } from "rxjs"; +import { BehaviorSubject, firstValueFrom, Observable, Subscription, throwError } from "rxjs"; import { catchError } from "rxjs/operators"; import { AdminUpdateUserDTO } from "src/app/models/auth/admin-update-user.dto"; import { AuthRoles } from "src/app/models/auth/auth-roles.enum"; @@ -16,7 +16,6 @@ import { GetFilteredAuthUsersResultDTO } from "src/app/models/selection/auth-use import { SettingsService } from "../settings/settings.service"; import { SpinnerService } from "../spinner/spinner.service"; import { DiscordAuthURL } from "../../models/auth/discord-auth-url.dto"; -import { OAuthDTO } from "../../models/auth/oauth.dto"; @Injectable({ providedIn: "root" @@ -108,6 +107,14 @@ export class AuthService { }); } + resendConfirmationMailByMail(email: string): Observable { + return this.http.post(`${this.appsettings.getApiURL()}/api/auth/resend-confirmation-email-by-mail/${email}`, { + headers: new HttpHeaders({ + "Content-Type": "application/json" + }) + }); + } + getEMailFromforgotPasswordId(id: string): Observable { return this.http.post(`${this.appsettings.getApiURL()}/api/auth/confirm-forgot-password/${id}`, { headers: new HttpHeaders({ @@ -173,23 +180,6 @@ export class AuthService { }); } - // /api/auth/discord/register?code= - discordRegister(oAuthDTO: OAuthDTO) { - return this.http.post(`${this.appsettings.getApiURL()}/api/auth/discord/register`, oAuthDTO, { - headers: new HttpHeaders({ - "Content-Type": "application/json" - }) - }); - } - - // discordGetUser(code: string, state: string) { - // return this.http.get(`${this.appsettings.getApiURL()}/api/auth/discord/get-user?code=${code}&state=${state}`, { - // headers: new HttpHeaders({ - // 'Content-Type': 'application/json' - // }) - // }); - // } - /* utils */ saveToken(token: TokenDTO): void { localStorage.setItem("jwt", token.token); diff --git a/web/src/assets/i18n/de.json b/web/src/assets/i18n/de.json index 7dcfcf2c..fd0be6ab 100644 --- a/web/src/assets/i18n/de.json +++ b/web/src/assets/i18n/de.json @@ -93,7 +93,8 @@ "login_with_discord": "Mit Discord einloggen", "message": { "confirm_email": "E-Mail Bestätigen", - "confirm_email_d": "Sie müssen die E-Mail {{email}} Bestätigen, in dem Sie den Link öffnen, welchen wir Ihnen zugesendet haben." + "confirm_email_d": "Sie müssen die E-Mail {{email}} Bestätigen, in dem Sie den Link öffnen, welchen wir Ihnen zugesendet haben.", + "confirm_email_resend": "Sollen wir die Bestätigungsmail neu verschicken?" }, "password": "Passwort", "password_required": "Passwort benötigt", diff --git a/web/src/assets/i18n/en.json b/web/src/assets/i18n/en.json index 4ded8551..d8523901 100644 --- a/web/src/assets/i18n/en.json +++ b/web/src/assets/i18n/en.json @@ -93,7 +93,8 @@ "login_with_discord": "Login with discord", "message": { "confirm_email": "Confirm E-Mail", - "confirm_email_d": "You have to confirm your email {{email}} Please confirm your account through the link in the email." + "confirm_email_d": "You have to confirm your email {{email}} Please confirm your account through the link in the email.", + "confirm_email_resend": "Should we resend the confirmation email?" }, "password": "Password", "password_required": "Passwort required", From 9eb09fa3b23a75b9f0b7e4516fec04f84eb1d293 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 15:55:46 +0100 Subject: [PATCH 18/18] Fixed configs --- bot/src/bot/config | 2 +- bot/src/bot_api/config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/src/bot/config b/bot/src/bot/config index be5b15f2..eeebd13f 160000 --- a/bot/src/bot/config +++ b/bot/src/bot/config @@ -1 +1 @@ -Subproject commit be5b15f227e7b2b12cc73c0edd7f6fa95dbdd52f +Subproject commit eeebd13f80c6ceecc922ede5771e55212a884019 diff --git a/bot/src/bot_api/config b/bot/src/bot_api/config index 688e99ae..12ffcbcd 160000 --- a/bot/src/bot_api/config +++ b/bot/src/bot_api/config @@ -1 +1 @@ -Subproject commit 688e99ae2a075f2db47d05050856661462cf0f09 +Subproject commit 12ffcbcd9b88612251a1e23cb6724e21562f74b8