1
0
Fork 0

Align follower handle display on instance display in tables

This commit is contained in:
Rigel Kent 2020-05-07 23:12:54 +02:00 committed by Rigel Kent
parent df4c603dea
commit 1d26d05fd9
6 changed files with 27 additions and 8 deletions

View file

@ -1,6 +1,6 @@
<p-table <p-table
[value]="followers" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" [value]="followers" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($event)"
[showCurrentPageReport]="true" i18n-currentPageReportTemplate [showCurrentPageReport]="true" i18n-currentPageReportTemplate
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} followers" currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} followers"
> >
@ -29,7 +29,12 @@
<ng-template pTemplate="body" let-follow> <ng-template pTemplate="body" let-follow>
<tr> <tr>
<td><a [href]="follow.follower.url" target="_blank" rel="noopener noreferrer">{{ follow.follower.name + '@' + follow.follower.host }}</a></td> <td>
<a [href]="follow.follower.url" i18n-title title="Open actor page in a new tab" target="_blank" rel="noopener noreferrer">
{{ follow.follower.name + '@' + follow.follower.host }}
<span class="glyphicon glyphicon-new-window"></span>
</a>
</td>
<td *ngIf="follow.state === 'accepted'" i18n>Accepted</td> <td *ngIf="follow.state === 'accepted'" i18n>Accepted</td>
<td *ngIf="follow.state === 'pending'" i18n>Pending</td> <td *ngIf="follow.state === 'pending'" i18n>Pending</td>

View file

@ -9,6 +9,20 @@
} }
} }
a {
@include disable-default-a-behaviour;
display: inline-block;
&, &:hover {
color: var(--mainForegroundColor);
}
span {
font-size: 80%;
color: var(--inputPlaceholderColor);
}
}
.action-cell { .action-cell {
my-button:first-child { my-button:first-child {
margin-right: 10px; margin-right: 10px;

View file

@ -1,6 +1,6 @@
<p-table <p-table
[value]="following" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" [value]="following" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($event)"
[showCurrentPageReport]="true" i18n-currentPageReportTemplate [showCurrentPageReport]="true" i18n-currentPageReportTemplate
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} hosts" currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} hosts"
> >

View file

@ -12,8 +12,8 @@
</div> </div>
<p-table <p-table
[value]="videoRedundancies" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [value]="videoRedundancies" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" (onPage)="onPage($event)"
(onPage)="onPage($event)" [expandedRowKeys]="expandedRows" (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
> >
<ng-template pTemplate="header"> <ng-template pTemplate="header">

View file

@ -37,13 +37,13 @@
</a> </a>
</div> </div>
<div> <div>
<a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': user?.account.displayName }"> <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:' + user?.account.displayName }">
<div class="dashboard-num">{{ user.videoAbusesCount }}</div> <div class="dashboard-num">{{ user.videoAbusesCount }}</div>
<div class="dashboard-label" i18n>Incriminated in reports</div> <div class="dashboard-label" i18n>Incriminated in reports</div>
</a> </a>
</div> </div>
<div> <div>
<a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': user?.account.displayName }"> <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reporter:' + user?.account.displayName + ' state:accepted' }">
<div class="dashboard-num">{{ user.videoAbusesAcceptedCount }} / {{ user.videoAbusesCreatedCount }}</div> <div class="dashboard-num">{{ user.videoAbusesAcceptedCount }} / {{ user.videoAbusesCreatedCount }}</div>
<div class="dashboard-label" i18n>Authored reports accepted</div> <div class="dashboard-label" i18n>Authored reports accepted</div>
</a> </a>

View file

@ -154,5 +154,5 @@ async function reportVideoAbuse (req: express.Request, res: express.Response) {
logger.info('Abuse report for video %s created.', videoInstance.name) logger.info('Abuse report for video %s created.', videoInstance.name)
return res.json({ videoAbuseJSON }).end() return res.json({ videoAbuse: videoAbuseJSON }).end()
} }