From: Joshua Rüsweg Date: Tue, 6 Jul 2021 11:58:09 +0000 (+0200) Subject: Fix codestyle issues X-Git-Tag: 5.5.0_Alpha_1~479^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ead3869eed8a57b609abab1d5753e9d0220f873;p=GitHub%2FWoltLab%2FWCF.git Fix codestyle issues Co-authored-by: Matthias Schmidt --- diff --git a/ts/WoltLabSuite/Core/Acp/Ui/User/Action/DisableAction.ts b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/DisableAction.ts index 8fddd1c0f3..fe842dd31d 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/User/Action/DisableAction.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/DisableAction.ts @@ -35,22 +35,24 @@ export class DisableAction extends AbstractUserAction implements AjaxCallbackObj } _ajaxSuccess(data: DatabaseObjectActionResponse): void { - if (data.objectIDs.includes(this.userId)) { - switch (data.actionName) { - case "enable": - this.userDataElement.dataset.enabled = "true"; - this.button.textContent = this.button.dataset.disableMessage!; - break; - - case "disable": - this.userDataElement.dataset.enabled = "false"; - this.button.textContent = this.button.dataset.enableMessage!; - break; - - default: - throw new Error("Unreachable"); + data.objectIDs.forEach((objectId) => { + if (~~objectId == this.userId) { + switch (data.actionName) { + case "enable": + this.userDataElement.dataset.enabled = "true"; + this.button.textContent = this.button.dataset.disableMessage!; + break; + + case "disable": + this.userDataElement.dataset.enabled = "false"; + this.button.textContent = this.button.dataset.enableMessage!; + break; + + default: + throw new Error("Unreachable"); + } } - } + }); UiNotification.show(); diff --git a/ts/WoltLabSuite/Core/Acp/Ui/User/Action/Handler/Dialog/Ban.ts b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/Handler/Dialog/Ban.ts index 4430eadee5..7db3a45cd9 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/User/Action/Handler/Dialog/Ban.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/Handler/Dialog/Ban.ts @@ -99,46 +99,47 @@ export class BanDialog { }, title: Language.get("wcf.acp.user.ban.sure"), }, - source: `
-
-
-
- - ${Language.get("wcf.acp.user.banReason.description")} -
-
-
-
-
- -
-
- -
-
- -
`, + source: ` +
+
+
+
+ + ${Language.get("wcf.acp.user.banReason.description")} +
+
+
+
+
+ +
+
+ +
+
+ +
`, }; } } diff --git a/ts/WoltLabSuite/Core/Acp/Ui/User/Action/ToggleConfirmEmailAction.ts b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/ToggleConfirmEmailAction.ts index ec24798587..584eb9a86f 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/User/Action/ToggleConfirmEmailAction.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/ToggleConfirmEmailAction.ts @@ -34,22 +34,24 @@ export class ToggleConfirmEmailAction extends AbstractUserAction { } _ajaxSuccess(data: DatabaseObjectActionResponse): void { - if (data.objectIDs.includes(this.userId)) { - switch (data.actionName) { - case "confirmEmail": - this.userDataElement.dataset.emailConfirmed = "true"; - this.button.textContent = this.button.dataset.unconfirmEmailMessage!; - break; - - case "unconfirmEmail": - this.userDataElement.dataset.emailConfirmed = "false"; - this.button.textContent = this.button.dataset.confirmEmailMessage!; - break; - - default: - throw new Error("Unreachable"); + data.objectIDs.forEach((objectId) => { + if (~~objectId == this.userId) { + switch (data.actionName) { + case "confirmEmail": + this.userDataElement.dataset.emailConfirmed = "true"; + this.button.textContent = this.button.dataset.unconfirmEmailMessage!; + break; + + case "unconfirmEmail": + this.userDataElement.dataset.emailConfirmed = "false"; + this.button.textContent = this.button.dataset.confirmEmailMessage!; + break; + + default: + throw new Error("Unreachable"); + } } - } + }); UiNotification.show(); } diff --git a/wcfsetup/install/files/acp/templates/userAdd.tpl b/wcfsetup/install/files/acp/templates/userAdd.tpl index 5b6e39c190..f42bebb01e 100644 --- a/wcfsetup/install/files/acp/templates/userAdd.tpl +++ b/wcfsetup/install/files/acp/templates/userAdd.tpl @@ -28,11 +28,10 @@ {if $user->userID !== $__wcf->user->userID} {if $__wcf->session->getPermission('admin.user.canEnableUser')}
  • - {lang}wcf.acp.user.{if !$user->activationCode}disable{else}enable{/if}{/lang} @@ -74,7 +73,7 @@ {/if} {if $__wcf->session->getPermission('admin.user.canExportGdprData')} -
  • @@ -92,23 +91,23 @@