diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-19 23:42:06 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2020-05-01 16:41:02 +0200 |
commit | b8cf27c0f86d205a279d03b83e0e6728f46da67f (patch) | |
tree | 71222cc9dbd8b4c7fede48d3cfcfce9aa05a5ad3 /client/src/app/+admin/moderation | |
parent | 36004aa7b0de5cb69a452090770221b192a78eb8 (diff) | |
download | PeerTube-b8cf27c0f86d205a279d03b83e0e6728f46da67f.tar.gz PeerTube-b8cf27c0f86d205a279d03b83e0e6728f46da67f.tar.zst PeerTube-b8cf27c0f86d205a279d03b83e0e6728f46da67f.zip |
Unify paginator disabling when no result is displayable, fix batch domain add for non-https
Diffstat (limited to 'client/src/app/+admin/moderation')
5 files changed, 5 insertions, 15 deletions
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html index df0a8247e..ffc8a8e39 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html | |||
@@ -1,5 +1,5 @@ | |||
1 | <p-table | 1 | <p-table |
2 | [value]="blockedAccounts" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | 2 | [value]="blockedAccounts" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" |
4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | 4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted accounts" | 5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted accounts" |
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html index d4e6933af..d1098800b 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html | |||
@@ -1,5 +1,5 @@ | |||
1 | <p-table | 1 | <p-table |
2 | [value]="blockedServers" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | 2 | [value]="blockedServers" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" |
4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | 4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted instances" | 5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted instances" |
@@ -54,10 +54,4 @@ | |||
54 | </ng-template> | 54 | </ng-template> |
55 | </p-table> | 55 | </p-table> |
56 | 56 | ||
57 | <my-batch-domains-modal #batchDomainsModal i18n-action action="Mute domains" (domains)="onDomainsToBlock($event)"> | 57 | <my-batch-domains-modal #batchDomainsModal i18n-action action="Mute domains" (domains)="onDomainsToBlock($event)"></my-batch-domains-modal> |
58 | <ng-container ngProjectAs="warning"> | ||
59 | <div i18n *ngIf="httpEnabled() === false" class="alert alert-warning"> | ||
60 | It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers. | ||
61 | </div> | ||
62 | </ng-container> | ||
63 | </my-batch-domains-modal> | ||
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts index 4efadc386..344e2d135 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts | |||
@@ -51,10 +51,6 @@ export class InstanceServerBlocklistComponent extends RestTable implements OnIni | |||
51 | ) | 51 | ) |
52 | } | 52 | } |
53 | 53 | ||
54 | httpEnabled () { | ||
55 | return window.location.protocol === 'https:' | ||
56 | } | ||
57 | |||
58 | addServersToBlock () { | 54 | addServersToBlock () { |
59 | this.batchDomainsModal.openModal() | 55 | this.batchDomainsModal.openModal() |
60 | } | 56 | } |
diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html index 9e084cb73..6dacfe243 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html | |||
@@ -154,7 +154,7 @@ | |||
154 | 154 | ||
155 | <!-- report text --> | 155 | <!-- report text --> |
156 | <div class="mt-3 d-flex"> | 156 | <div class="mt-3 d-flex"> |
157 | <span class="col-3 moderation-expanded-label" i18n>Report</span> | 157 | <span class="col-3 moderation-expanded-label" i18n>Report #{{ videoAbuse.id }}</span> |
158 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span> | 158 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span> |
159 | </div> | 159 | </div> |
160 | <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment"> | 160 | <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment"> |
diff --git a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html index eade57b71..5eabcb37f 100644 --- a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html +++ b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html | |||
@@ -1,5 +1,5 @@ | |||
1 | <p-table | 1 | <p-table |
2 | [value]="blacklist" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | 2 | [value]="blacklist" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" |
4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | 4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} blacklisted videos" | 5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} blacklisted videos" |