2023-08-15 02:02:54 +08:00
|
|
|
<DModal
|
|
|
|
class="{{@model.penaltyType}}-user-modal"
|
|
|
|
@title={{i18n this.modalTitle}}
|
|
|
|
@closeModal={{this.warnBeforeClosing}}
|
|
|
|
@flash={{this.flash}}
|
|
|
|
>
|
|
|
|
<:body>
|
2022-12-20 01:36:03 +08:00
|
|
|
{{#if this.canPenalize}}
|
|
|
|
<div class="penalty-duration-controls">
|
2023-08-15 02:02:54 +08:00
|
|
|
{{#if (eq @model.penaltyType "suspend")}}
|
2022-12-20 01:36:03 +08:00
|
|
|
<FutureDateInput
|
|
|
|
@class="suspend-until"
|
|
|
|
@label="admin.user.suspend_duration"
|
|
|
|
@clearable={{false}}
|
|
|
|
@input={{this.penalizeUntil}}
|
|
|
|
@onChangeInput={{action (mut this.penalizeUntil)}}
|
|
|
|
/>
|
2023-08-15 02:02:54 +08:00
|
|
|
{{else if (eq @model.penaltyType "silence")}}
|
2022-12-20 01:36:03 +08:00
|
|
|
<FutureDateInput
|
|
|
|
@class="silence-until"
|
|
|
|
@label="admin.user.silence_duration"
|
|
|
|
@clearable={{false}}
|
|
|
|
@input={{this.penalizeUntil}}
|
|
|
|
@onChangeInput={{action (mut this.penalizeUntil)}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2023-08-15 02:02:54 +08:00
|
|
|
{{#if (eq @model.penaltyType "suspend")}}
|
2022-12-20 01:36:03 +08:00
|
|
|
<div class="penalty-reason-visibility">
|
|
|
|
{{#if this.siteSettings.hide_suspension_reasons}}
|
|
|
|
{{html-safe (i18n "admin.user.suspend_reason_hidden_label")}}
|
|
|
|
{{else}}
|
|
|
|
{{html-safe (i18n "admin.user.suspend_reason_label")}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
<AdminPenaltyReason
|
2023-08-15 02:02:54 +08:00
|
|
|
@penaltyType={{@model.penaltyType}}
|
2022-12-20 01:36:03 +08:00
|
|
|
@reason={{this.reason}}
|
|
|
|
@message={{this.message}}
|
|
|
|
/>
|
2023-08-15 02:02:54 +08:00
|
|
|
{{#if @model.postId}}
|
2022-12-20 01:36:03 +08:00
|
|
|
<AdminPenaltyPostAction
|
2023-08-15 02:02:54 +08:00
|
|
|
@postId={{@model.postId}}
|
2022-12-20 01:36:03 +08:00
|
|
|
@postAction={{this.postAction}}
|
|
|
|
@postEdit={{this.postEdit}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
{{#if this.user.similar_users}}
|
|
|
|
<AdminPenaltySimilarUsers
|
2023-08-15 02:02:54 +08:00
|
|
|
@penaltyType={{@model.penaltyType}}
|
2022-12-20 01:36:03 +08:00
|
|
|
@user={{this.user}}
|
|
|
|
@selectedUserIds={{this.otherUserIds}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2023-08-15 02:02:54 +08:00
|
|
|
{{#if (eq @model.penaltyType "suspend")}}
|
2022-12-20 01:36:03 +08:00
|
|
|
<div class="cant-suspend">{{i18n "admin.user.cant_suspend"}}</div>
|
2023-08-15 02:02:54 +08:00
|
|
|
{{else if (eq @model.penaltyType "silence")}}
|
2022-12-20 01:36:03 +08:00
|
|
|
<div class="cant-silence">{{i18n "admin.user.cant_silence"}}</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2023-01-23 21:14:23 +08:00
|
|
|
<div class="penalty-history">{{html-safe this.penaltyHistory}}</div>
|
2023-08-15 02:02:54 +08:00
|
|
|
</:body>
|
|
|
|
<:footer>
|
|
|
|
<DButton
|
|
|
|
class="btn-danger perform-penalize"
|
|
|
|
@action={{this.penalizeUser}}
|
|
|
|
@disabled={{this.submitDisabled}}
|
|
|
|
@icon="ban"
|
|
|
|
@label={{this.buttonLabel}}
|
|
|
|
/>
|
|
|
|
<DButton
|
|
|
|
class="btn-flat d-modal-cancel"
|
|
|
|
@action={{this.warnBeforeClosing}}
|
|
|
|
@label="cancel"
|
|
|
|
/>
|
|
|
|
</:footer>
|
|
|
|
</DModal>
|