diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation')
14 files changed, 24 insertions, 36 deletions
diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.html b/client/src/app/shared/shared-moderation/account-blocklist.component.html index 7eca6411e..3f2f55559 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.html | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | <ng-template pTemplate="header"> | 25 | <ng-template pTemplate="header"> |
26 | <tr> | 26 | <tr> |
27 | <th style="width: 150px;">Action</th> <!-- column for action buttons --> | 27 | <th style="width: 150px;" i18n>Action</th> <!-- column for action buttons --> |
28 | <th style="width: calc(100% - 300px);" i18n>Account</th> | 28 | <th style="width: calc(100% - 300px);" i18n>Account</th> |
29 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> | 29 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> |
30 | </tr> | 30 | </tr> |
@@ -38,12 +38,7 @@ | |||
38 | <td> | 38 | <td> |
39 | <a [href]="accountBlock.blockedAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | 39 | <a [href]="accountBlock.blockedAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> |
40 | <div class="chip two-lines"> | 40 | <div class="chip two-lines"> |
41 | <img | 41 | <my-account-avatar [account]="accountBlock.blockedAccount"></my-account-avatar> |
42 | class="avatar" | ||
43 | [src]="accountBlock.blockedAccount.avatar?.path" | ||
44 | (error)="switchToDefaultAvatar($event)" | ||
45 | alt="Avatar" | ||
46 | > | ||
47 | <div> | 42 | <div> |
48 | {{ accountBlock.blockedAccount.displayName }} | 43 | {{ accountBlock.blockedAccount.displayName }} |
49 | <span class="text-muted">{{ accountBlock.blockedAccount.nameWithHost }}</span> | 44 | <span class="text-muted">{{ accountBlock.blockedAccount.nameWithHost }}</span> |
diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.ts b/client/src/app/shared/shared-moderation/account-blocklist.component.ts index 3de9587b8..1bce65bf0 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.ts | |||
@@ -30,10 +30,6 @@ export class GenericAccountBlocklistComponent extends RestTable implements OnIni | |||
30 | this.initialize() | 30 | this.initialize() |
31 | } | 31 | } |
32 | 32 | ||
33 | switchToDefaultAvatar ($event: Event) { | ||
34 | ($event.target as HTMLImageElement).src = Account.GET_DEFAULT_AVATAR_URL() | ||
35 | } | ||
36 | |||
37 | unblockAccount (accountBlock: AccountBlock) { | 33 | unblockAccount (accountBlock: AccountBlock) { |
38 | const blockedAccount = accountBlock.blockedAccount | 34 | const blockedAccount = accountBlock.blockedAccount |
39 | const operation = this.mode === BlocklistComponentType.Account | 35 | const operation = this.mode === BlocklistComponentType.Account |
diff --git a/client/src/app/shared/shared-moderation/batch-domains-modal.component.html b/client/src/app/shared/shared-moderation/batch-domains-modal.component.html index 1b85c8f48..6a3c65721 100644 --- a/client/src/app/shared/shared-moderation/batch-domains-modal.component.html +++ b/client/src/app/shared/shared-moderation/batch-domains-modal.component.html | |||
@@ -28,14 +28,11 @@ | |||
28 | 28 | ||
29 | <div class="form-group inputs"> | 29 | <div class="form-group inputs"> |
30 | <input | 30 | <input |
31 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | 31 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
32 | (click)="hide()" (key.enter)="hide()" | 32 | (click)="hide()" (key.enter)="hide()" |
33 | > | 33 | > |
34 | 34 | ||
35 | <input | 35 | <input type="submit" [value]="action" class="peertube-button orange-button" [disabled]="!form.valid" /> |
36 | type="submit" [value]="action" class="action-button-submit" | ||
37 | [disabled]="!form.valid" | ||
38 | > | ||
39 | </div> | 36 | </div> |
40 | </form> | 37 | </form> |
41 | </div> | 38 | </div> |
diff --git a/client/src/app/shared/shared-moderation/moderation.scss b/client/src/app/shared/shared-moderation/moderation.scss index 4a4e05535..cdcc12fe0 100644 --- a/client/src/app/shared/shared-moderation/moderation.scss +++ b/client/src/app/shared/shared-moderation/moderation.scss | |||
@@ -32,7 +32,7 @@ | |||
32 | color: pvar(--inputPlaceholderColor); | 32 | color: pvar(--inputPlaceholderColor); |
33 | } | 33 | } |
34 | 34 | ||
35 | @include large-screen-ratio($selector: 'div, ::ng-deep iframe') { | 35 | @include block-ratio($selector: 'div, ::ng-deep iframe') { |
36 | width: 100% !important; | 36 | width: 100% !important; |
37 | height: 100% !important; | 37 | height: 100% !important; |
38 | left: 0; | 38 | left: 0; |
diff --git a/client/src/app/shared/shared-moderation/report-modals/report.component.html b/client/src/app/shared/shared-moderation/report-modals/report.component.html index bda62312f..6c99180ef 100644 --- a/client/src/app/shared/shared-moderation/report-modals/report.component.html +++ b/client/src/app/shared/shared-moderation/report-modals/report.component.html | |||
@@ -51,10 +51,11 @@ | |||
51 | 51 | ||
52 | <div class="form-group inputs"> | 52 | <div class="form-group inputs"> |
53 | <input | 53 | <input |
54 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | 54 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
55 | (click)="hide()" (key.enter)="hide()" | 55 | (click)="hide()" (key.enter)="hide()" |
56 | > | 56 | > |
57 | <input type="submit" i18n-value value="Submit" class="action-button-submit" [disabled]="!form.valid"> | 57 | |
58 | <input type="submit" i18n-value value="Submit" class="peertube-button orange-button" [disabled]="!form.valid"> | ||
58 | </div> | 59 | </div> |
59 | 60 | ||
60 | </form> | 61 | </form> |
diff --git a/client/src/app/shared/shared-moderation/report-modals/report.component.scss b/client/src/app/shared/shared-moderation/report-modals/report.component.scss index b2606cbd8..0567330f5 100644 --- a/client/src/app/shared/shared-moderation/report-modals/report.component.scss +++ b/client/src/app/shared/shared-moderation/report-modals/report.component.scss | |||
@@ -21,7 +21,7 @@ textarea { | |||
21 | } | 21 | } |
22 | 22 | ||
23 | .screenratio { | 23 | .screenratio { |
24 | @include large-screen-ratio($selector: 'div, ::ng-deep iframe') { | 24 | @include block-ratio($selector: 'div, ::ng-deep iframe') { |
25 | left: 0; | 25 | left: 0; |
26 | }; | 26 | }; |
27 | } | 27 | } |
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.html b/client/src/app/shared/shared-moderation/report-modals/video-report.component.html index 4947088d1..1aae64bff 100644 --- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.html +++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.html | |||
@@ -89,10 +89,11 @@ | |||
89 | 89 | ||
90 | <div class="form-group inputs"> | 90 | <div class="form-group inputs"> |
91 | <input | 91 | <input |
92 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | 92 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
93 | (click)="hide()" (key.enter)="hide()" | 93 | (click)="hide()" (key.enter)="hide()" |
94 | > | 94 | > |
95 | <input type="submit" i18n-value value="Submit" class="action-button-submit" [disabled]="!form.valid"> | 95 | |
96 | <input type="submit" i18n-value value="Submit" class="peertube-button orange-button" [disabled]="!form.valid"> | ||
96 | </div> | 97 | </div> |
97 | 98 | ||
98 | </form> | 99 | </form> |
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts index 5b06c0bc7..4ca6f52ad 100644 --- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts | |||
@@ -61,7 +61,8 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
61 | baseUrl: this.video.embedUrl, | 61 | baseUrl: this.video.embedUrl, |
62 | title: false, | 62 | title: false, |
63 | warningTitle: false | 63 | warningTitle: false |
64 | }) | 64 | }), |
65 | this.video.name | ||
65 | ) | 66 | ) |
66 | ) | 67 | ) |
67 | } | 68 | } |
diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.html b/client/src/app/shared/shared-moderation/server-blocklist.component.html index a6e974b36..537186f05 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.html | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | <ng-template pTemplate="header"> | 32 | <ng-template pTemplate="header"> |
33 | <tr> | 33 | <tr> |
34 | <th style="width: 150px;">Action</th> <!-- column for action buttons --> | 34 | <th style="width: 150px;" i18n>Action</th> <!-- column for action buttons --> |
35 | <th style="width: calc(100% - 300px);" i18n>Instance</th> | 35 | <th style="width: calc(100% - 300px);" i18n>Instance</th> |
36 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> | 36 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> |
37 | </tr> | 37 | </tr> |
diff --git a/client/src/app/shared/shared-moderation/shared-moderation.module.ts b/client/src/app/shared/shared-moderation/shared-moderation.module.ts index b1b98f8d0..c7e201792 100644 --- a/client/src/app/shared/shared-moderation/shared-moderation.module.ts +++ b/client/src/app/shared/shared-moderation/shared-moderation.module.ts | |||
@@ -13,13 +13,15 @@ import { UserBanModalComponent } from './user-ban-modal.component' | |||
13 | import { UserModerationDropdownComponent } from './user-moderation-dropdown.component' | 13 | import { UserModerationDropdownComponent } from './user-moderation-dropdown.component' |
14 | import { VideoBlockComponent } from './video-block.component' | 14 | import { VideoBlockComponent } from './video-block.component' |
15 | import { VideoBlockService } from './video-block.service' | 15 | import { VideoBlockService } from './video-block.service' |
16 | import { SharedAccountAvatarModule } from '../shared-account-avatar/shared-account-avatar.module' | ||
16 | 17 | ||
17 | @NgModule({ | 18 | @NgModule({ |
18 | imports: [ | 19 | imports: [ |
19 | SharedMainModule, | 20 | SharedMainModule, |
20 | SharedFormModule, | 21 | SharedFormModule, |
21 | SharedGlobalIconModule, | 22 | SharedGlobalIconModule, |
22 | SharedVideoCommentModule | 23 | SharedVideoCommentModule, |
24 | SharedAccountAvatarModule | ||
23 | ], | 25 | ], |
24 | 26 | ||
25 | declarations: [ | 27 | declarations: [ |
diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.html b/client/src/app/shared/shared-moderation/user-ban-modal.component.html index 365eb1938..7129b00ca 100644 --- a/client/src/app/shared/shared-moderation/user-ban-modal.component.html +++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.html | |||
@@ -23,14 +23,11 @@ | |||
23 | 23 | ||
24 | <div class="form-group inputs"> | 24 | <div class="form-group inputs"> |
25 | <input | 25 | <input |
26 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | 26 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
27 | (click)="hide()" (key.enter)="hide()" | 27 | (click)="hide()" (key.enter)="hide()" |
28 | > | 28 | > |
29 | 29 | ||
30 | <input | 30 | <input type="submit" i18n-value value="Ban this user" class="peertube-button orange-button" [disabled]="!form.valid" /> |
31 | type="submit" i18n-value value="Ban this user" class="action-button-submit" | ||
32 | [disabled]="!form.valid" | ||
33 | > | ||
34 | </div> | 31 | </div> |
35 | </form> | 32 | </form> |
36 | </div> | 33 | </div> |
diff --git a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.html b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.html index 4d562387a..f1680e385 100644 --- a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.html +++ b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.html | |||
@@ -4,6 +4,6 @@ | |||
4 | <my-action-dropdown | 4 | <my-action-dropdown |
5 | [actions]="userActions" [entry]="{ user: user, account: account }" | 5 | [actions]="userActions" [entry]="{ user: user, account: account }" |
6 | [buttonSize]="buttonSize" [placement]="placement" [label]="label" | 6 | [buttonSize]="buttonSize" [placement]="placement" [label]="label" |
7 | [container]="container" | 7 | [container]="container" [buttonStyled]="buttonStyled" |
8 | ></my-action-dropdown> | 8 | ></my-action-dropdown> |
9 | </ng-container> | 9 | </ng-container> |
diff --git a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts index f59910d1c..f510a82f9 100644 --- a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts +++ b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts | |||
@@ -18,6 +18,7 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges { | |||
18 | @Input() prependActions: DropdownAction<{ user: User, account: Account }>[] | 18 | @Input() prependActions: DropdownAction<{ user: User, account: Account }>[] |
19 | 19 | ||
20 | @Input() buttonSize: 'normal' | 'small' = 'normal' | 20 | @Input() buttonSize: 'normal' | 'small' = 'normal' |
21 | @Input() buttonStyled = true | ||
21 | @Input() placement = 'right-top right-bottom auto' | 22 | @Input() placement = 'right-top right-bottom auto' |
22 | @Input() label: string | 23 | @Input() label: string |
23 | @Input() container: 'body' | undefined = undefined | 24 | @Input() container: 'body' | undefined = undefined |
diff --git a/client/src/app/shared/shared-moderation/video-block.component.html b/client/src/app/shared/shared-moderation/video-block.component.html index e982c4d77..5e9e8493c 100644 --- a/client/src/app/shared/shared-moderation/video-block.component.html +++ b/client/src/app/shared/shared-moderation/video-block.component.html | |||
@@ -35,14 +35,11 @@ | |||
35 | 35 | ||
36 | <div class="form-group inputs"> | 36 | <div class="form-group inputs"> |
37 | <input | 37 | <input |
38 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | 38 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
39 | (click)="hide()" (key.enter)="hide()" | 39 | (click)="hide()" (key.enter)="hide()" |
40 | > | 40 | > |
41 | 41 | ||
42 | <input | 42 | <input type="submit" i18n-value value="Submit" class="peertube-button orange-button" [disabled]="!form.valid" /> |
43 | type="submit" i18n-value value="Submit" class="action-button-submit" | ||
44 | [disabled]="!form.valid" | ||
45 | > | ||
46 | </div> | 43 | </div> |
47 | </form> | 44 | </form> |
48 | 45 | ||