diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation')
9 files changed, 30 insertions, 82 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 3f2f55559..a9fac0810 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.html | |||
@@ -11,13 +11,8 @@ | |||
11 | > | 11 | > |
12 | <ng-template pTemplate="caption"> | 12 | <ng-template pTemplate="caption"> |
13 | <div class="caption"> | 13 | <div class="caption"> |
14 | <div class="ml-auto has-feedback has-clear"> | 14 | <div class="ml-auto"> |
15 | <input | 15 | <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> |
16 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | ||
17 | (keyup)="onSearch($event)" | ||
18 | > | ||
19 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a> | ||
20 | <span class="sr-only" i18n>Clear filters</span> | ||
21 | </div> | 16 | </div> |
22 | </div> | 17 | </div> |
23 | </ng-template> | 18 | </ng-template> |
@@ -38,7 +33,7 @@ | |||
38 | <td> | 33 | <td> |
39 | <a [href]="accountBlock.blockedAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | 34 | <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"> | 35 | <div class="chip two-lines"> |
41 | <my-account-avatar [account]="accountBlock.blockedAccount"></my-account-avatar> | 36 | <my-actor-avatar [account]="accountBlock.blockedAccount"></my-actor-avatar> |
42 | <div> | 37 | <div> |
43 | {{ accountBlock.blockedAccount.displayName }} | 38 | {{ accountBlock.blockedAccount.displayName }} |
44 | <span class="text-muted">{{ accountBlock.blockedAccount.nameWithHost }}</span> | 39 | <span class="text-muted">{{ accountBlock.blockedAccount.nameWithHost }}</span> |
diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.scss b/client/src/app/shared/shared-moderation/account-blocklist.component.scss index 3eede44eb..bc441811e 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.scss +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.scss | |||
@@ -1,15 +1,6 @@ | |||
1 | @import '_variables'; | 1 | @import '_variables'; |
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | .caption { | ||
5 | justify-content: flex-end; | ||
6 | |||
7 | input { | ||
8 | @include peertube-input-text(250px); | ||
9 | flex-grow: 1; | ||
10 | } | ||
11 | } | ||
12 | |||
13 | .chip { | 4 | .chip { |
14 | @include chip; | 5 | @include chip; |
15 | } | 6 | } |
@@ -17,4 +8,4 @@ | |||
17 | .unblock-button { | 8 | .unblock-button { |
18 | @include peertube-button; | 9 | @include peertube-button; |
19 | @include grey-button; | 10 | @include grey-button; |
20 | } \ No newline at end of file | 11 | } |
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 1bce65bf0..1146aeec0 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.ts | |||
@@ -44,12 +44,12 @@ export class GenericAccountBlocklistComponent extends RestTable implements OnIni | |||
44 | : $localize`Account ${blockedAccount.nameWithHost} unmuted by your instance.` | 44 | : $localize`Account ${blockedAccount.nameWithHost} unmuted by your instance.` |
45 | ) | 45 | ) |
46 | 46 | ||
47 | this.loadData() | 47 | this.reloadData() |
48 | } | 48 | } |
49 | ) | 49 | ) |
50 | } | 50 | } |
51 | 51 | ||
52 | protected loadData () { | 52 | protected reloadData () { |
53 | const operation = this.mode === BlocklistComponentType.Account | 53 | const operation = this.mode === BlocklistComponentType.Account |
54 | ? this.blocklistService.getUserAccountBlocklist({ | 54 | ? this.blocklistService.getUserAccountBlocklist({ |
55 | pagination: this.pagination, | 55 | pagination: this.pagination, |
diff --git a/client/src/app/shared/shared-moderation/moderation.scss b/client/src/app/shared/shared-moderation/moderation.scss index cdcc12fe0..b13d06f03 100644 --- a/client/src/app/shared/shared-moderation/moderation.scss +++ b/client/src/app/shared/shared-moderation/moderation.scss | |||
@@ -17,33 +17,25 @@ | |||
17 | word-wrap: break-word; | 17 | word-wrap: break-word; |
18 | 18 | ||
19 | ::ng-deep p:last-child { | 19 | ::ng-deep p:last-child { |
20 | margin-bottom: 0px !important; | 20 | margin-bottom: 0 !important; |
21 | } | 21 | } |
22 | } | 22 | } |
23 | } | 23 | } |
24 | 24 | ||
25 | .screenratio { | 25 | .screenratio { |
26 | div { | ||
27 | @include miniature-thumbnail; | ||
28 | |||
29 | display: inline-flex; | ||
30 | justify-content: center; | ||
31 | align-items: center; | ||
32 | color: pvar(--inputPlaceholderColor); | ||
33 | } | ||
34 | |||
35 | @include block-ratio($selector: 'div, ::ng-deep iframe') { | 26 | @include block-ratio($selector: 'div, ::ng-deep iframe') { |
36 | width: 100% !important; | 27 | width: 100% !important; |
37 | height: 100% !important; | 28 | height: 100% !important; |
38 | left: 0; | 29 | left: 0; |
39 | }; | 30 | }; |
40 | } | ||
41 | 31 | ||
42 | .input-group { | 32 | div { |
43 | @include peertube-input-group(300px); | 33 | @include miniature-thumbnail; |
44 | 34 | ||
45 | .dropdown-toggle::after { | 35 | display: inline-flex; |
46 | margin-left: 0; | 36 | justify-content: center; |
37 | align-items: center; | ||
38 | color: pvar(--inputPlaceholderColor); | ||
47 | } | 39 | } |
48 | } | 40 | } |
49 | 41 | ||
@@ -51,15 +43,6 @@ | |||
51 | @include chip; | 43 | @include chip; |
52 | } | 44 | } |
53 | 45 | ||
54 | .caption { | ||
55 | justify-content: flex-end; | ||
56 | |||
57 | input { | ||
58 | @include peertube-input-text(250px); | ||
59 | flex-grow: 1; | ||
60 | } | ||
61 | } | ||
62 | |||
63 | my-action-dropdown.show { | 46 | my-action-dropdown.show { |
64 | ::ng-deep .dropdown-root { | 47 | ::ng-deep .dropdown-root { |
65 | display: block !important; | 48 | display: block !important; |
@@ -93,15 +76,15 @@ my-action-dropdown.show { | |||
93 | display: inline-flex; | 76 | display: inline-flex; |
94 | 77 | ||
95 | .table-video-image { | 78 | .table-video-image { |
96 | @include miniature-thumbnail; | ||
97 | |||
98 | $image-height: 45px; | 79 | $image-height: 45px; |
99 | 80 | ||
81 | @include miniature-thumbnail; | ||
82 | |||
100 | height: $image-height; | 83 | height: $image-height; |
101 | width: #{(16/9) * $image-height}; | 84 | width: #{(16/9) * $image-height}; |
102 | margin-right: 0.5rem; | 85 | margin-right: 0.5rem; |
103 | border-radius: 2px; | 86 | border-radius: 2px; |
104 | border: none; | 87 | border: 0; |
105 | background: transparent; | 88 | background: transparent; |
106 | display: inline-flex; | 89 | display: inline-flex; |
107 | justify-content: center; | 90 | justify-content: center; |
@@ -139,7 +122,7 @@ my-action-dropdown.show { | |||
139 | 122 | ||
140 | div .glyphicon { | 123 | div .glyphicon { |
141 | font-size: 80%; | 124 | font-size: 80%; |
142 | color: gray; | 125 | color: #808080; |
143 | margin-left: 0.1rem; | 126 | margin-left: 0.1rem; |
144 | } | 127 | } |
145 | 128 | ||
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 537186f05..c6d29bb21 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.html | |||
@@ -4,8 +4,9 @@ | |||
4 | </h1> | 4 | </h1> |
5 | 5 | ||
6 | <p-table | 6 | <p-table |
7 | [value]="blockedServers" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | 7 | [value]="blockedServers" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
8 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($event)" | 8 | [sortField]="sort.field" [sortOrder]="sort.order" (onPage)="onPage($event)" |
9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" | ||
9 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | 10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
10 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted instances" | 11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted instances" |
11 | > | 12 | > |
@@ -18,13 +19,8 @@ | |||
18 | </a> | 19 | </a> |
19 | </div> | 20 | </div> |
20 | 21 | ||
21 | <div class="ml-auto has-feedback has-clear"> | 22 | <div class="ml-auto"> |
22 | <input | 23 | <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> |
23 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | ||
24 | (keyup)="onSearch($event)" | ||
25 | > | ||
26 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a> | ||
27 | <span class="sr-only" i18n>Clear filters</span> | ||
28 | </div> | 24 | </div> |
29 | </div> | 25 | </div> |
30 | </ng-template> | 26 | </ng-template> |
diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.scss b/client/src/app/shared/shared-moderation/server-blocklist.component.scss index 31db4d92b..a22972c5f 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.scss +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.scss | |||
@@ -5,7 +5,8 @@ a { | |||
5 | @include disable-default-a-behaviour; | 5 | @include disable-default-a-behaviour; |
6 | display: inline-block; | 6 | display: inline-block; |
7 | 7 | ||
8 | &, &:hover { | 8 | &, |
9 | &:hover { | ||
9 | color: pvar(--mainForegroundColor); | 10 | color: pvar(--mainForegroundColor); |
10 | } | 11 | } |
11 | 12 | ||
@@ -15,15 +16,6 @@ a { | |||
15 | } | 16 | } |
16 | } | 17 | } |
17 | 18 | ||
18 | .caption { | ||
19 | justify-content: flex-end; | ||
20 | |||
21 | input { | ||
22 | @include peertube-input-text(250px); | ||
23 | flex-grow: 1; | ||
24 | } | ||
25 | } | ||
26 | |||
27 | .unblock-button { | 19 | .unblock-button { |
28 | @include peertube-button; | 20 | @include peertube-button; |
29 | @include grey-button; | 21 | @include grey-button; |
@@ -33,15 +25,6 @@ a { | |||
33 | @include create-button; | 25 | @include create-button; |
34 | } | 26 | } |
35 | 27 | ||
36 | .caption { | ||
37 | justify-content: flex-end; | ||
38 | |||
39 | input { | ||
40 | @include peertube-input-text(250px); | ||
41 | flex-grow: 1; | ||
42 | } | ||
43 | } | ||
44 | |||
45 | .chip { | 28 | .chip { |
46 | @include chip; | 29 | @include chip; |
47 | } | 30 | } |
diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.ts b/client/src/app/shared/shared-moderation/server-blocklist.component.ts index 546fd53c3..274d8f6e9 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.ts | |||
@@ -46,7 +46,7 @@ export class GenericServerBlocklistComponent extends RestTable implements OnInit | |||
46 | : $localize`Instance ${host} unmuted by your instance.` | 46 | : $localize`Instance ${host} unmuted by your instance.` |
47 | ) | 47 | ) |
48 | 48 | ||
49 | this.loadData() | 49 | this.reloadData() |
50 | } | 50 | } |
51 | ) | 51 | ) |
52 | } | 52 | } |
@@ -69,13 +69,13 @@ export class GenericServerBlocklistComponent extends RestTable implements OnInit | |||
69 | : $localize`Instance ${domain} muted by your instance.` | 69 | : $localize`Instance ${domain} muted by your instance.` |
70 | ) | 70 | ) |
71 | 71 | ||
72 | this.loadData() | 72 | this.reloadData() |
73 | } | 73 | } |
74 | ) | 74 | ) |
75 | }) | 75 | }) |
76 | } | 76 | } |
77 | 77 | ||
78 | protected loadData () { | 78 | protected reloadData () { |
79 | const operation = this.mode === BlocklistComponentType.Account | 79 | const operation = this.mode === BlocklistComponentType.Account |
80 | ? this.blocklistService.getUserServerBlocklist({ | 80 | ? this.blocklistService.getUserServerBlocklist({ |
81 | pagination: this.pagination, | 81 | pagination: this.pagination, |
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 c7e201792..95213e2bd 100644 --- a/client/src/app/shared/shared-moderation/shared-moderation.module.ts +++ b/client/src/app/shared/shared-moderation/shared-moderation.module.ts | |||
@@ -13,7 +13,7 @@ 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 | import { SharedActorImageModule } from '../shared-actor-image/shared-actor-image.module' |
17 | 17 | ||
18 | @NgModule({ | 18 | @NgModule({ |
19 | imports: [ | 19 | imports: [ |
@@ -21,7 +21,7 @@ import { SharedAccountAvatarModule } from '../shared-account-avatar/shared-accou | |||
21 | SharedFormModule, | 21 | SharedFormModule, |
22 | SharedGlobalIconModule, | 22 | SharedGlobalIconModule, |
23 | SharedVideoCommentModule, | 23 | SharedVideoCommentModule, |
24 | SharedAccountAvatarModule | 24 | SharedActorImageModule |
25 | ], | 25 | ], |
26 | 26 | ||
27 | declarations: [ | 27 | declarations: [ |
diff --git a/client/src/app/shared/shared-moderation/video-block.component.scss b/client/src/app/shared/shared-moderation/video-block.component.scss index afa0d96f7..a6e33070b 100644 --- a/client/src/app/shared/shared-moderation/video-block.component.scss +++ b/client/src/app/shared/shared-moderation/video-block.component.scss | |||
@@ -7,5 +7,5 @@ textarea { | |||
7 | 7 | ||
8 | .live-info { | 8 | .live-info { |
9 | font-size: 15px; | 9 | font-size: 15px; |
10 | margin: 40px 0 20px 0; | 10 | margin: 40px 0 20px; |
11 | } | 11 | } |