]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.html
Add ability to list imports of a channel sync
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-video-channel-syncs / my-video-channel-syncs.component.html
CommitLineData
2a491182
F
1<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
2
3<h1>
4 <my-global-icon iconName="refresh" aria-hidden="true"></my-global-icon>
5 <ng-container i18n>My synchronizations</ng-container>
6</h1>
7
8<div *ngIf="!syncEnabled()">
9 <p class="muted" i18n>⚠️ The instance doesn't allow channel synchronization</p>
10</div>
11
12<p-table
13 *ngIf="syncEnabled()" [value]="channelSyncs" [lazy]="true"
14 [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
15 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
16 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
17 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} synchronizations"
18 [expandedRowKeys]="expandedRows"
19>
20 <ng-template pTemplate="caption">
21 <div class="caption">
22 <div class="left-buttons">
23 <a class="add-sync" routerLink="{{ getSyncCreateLink() }}">
24 <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
25 <ng-container i18n>Add synchronization</ng-container>
26 </a>
27 </div>
28 </div>
29 </ng-template>
30
31 <ng-template pTemplate="header">
32 <tr>
a3b472a1 33 <th style="width: 10%"></th>
2a491182
F
34 <th style="width: 25%" i18n pSortableColumn="externalChannelUrl">External Channel <p-sortIcon field="externalChannelUrl"></p-sortIcon></th>
35 <th style="width: 25%" i18n pSortableColumn="videoChannel">Channel <p-sortIcon field="videoChannel"></p-sortIcon></th>
36 <th style="width: 10%" i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th>
37 <th style="width: 10%" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
38 <th style="width: 10%" i18n pSortableColumn="lastSyncAt">Last synchronization at <p-sortIcon field="lastSyncAt"></p-sortIcon></th>
a3b472a1 39 <th></th>
2a491182
F
40 </tr>
41 </ng-template>
42
43 <ng-template pTemplate="body" let-expanded="expanded" let-videoChannelSync>
44 <tr>
45 <td class="action-cell">
46 <my-action-dropdown
47 container="body"
48 [actions]="videoChannelSyncActions" [entry]="videoChannelSync"
49 ></my-action-dropdown>
50 </td>
51
52 <td>
53 <a [href]="videoChannelSync.externalChannelUrl" target="_blank" rel="noopener noreferrer">{{ videoChannelSync.externalChannelUrl }}</a>
54 </td>
55
56 <td>
57 <div class="actor">
58 <my-actor-avatar
59 class="channel"
60 [actor]="videoChannelSync.channel" actorType="channel"
61 [internalHref]="[ '/c', videoChannelSync.channel.name ]"
62 size="25"
63 ></my-actor-avatar>
64
65 <div class="actor-info">
66 <a [routerLink]="[ '/c', videoChannelSync.channel.name ]" class="actor-names" i18n-title title="Channel page">
67 <div class="actor-display-name">{{ videoChannelSync.channel.displayName }}</div>
68 <div class="actor-name">{{ videoChannelSync.channel.name }}</div>
69 </a>
70 </div>
71 </div>
72 </td>
73
74 <td>
75 <span [ngClass]="getSyncStateClass(videoChannelSync.state.id)">
76 {{ videoChannelSync.state.label }}
77 </span>
78 </td>
79
80 <td>{{ videoChannelSync.createdAt | date: 'short' }}</td>
81 <td>{{ videoChannelSync.lastSyncAt | date: 'short' }}</td>
a3b472a1
C
82
83 <td>
84 <a i18n routerLink="/my-library/video-imports" [queryParams]="{ search: 'videoChannelSyncId:' + videoChannelSync.id }" class="peertube-button-link grey-button">
85 List imports
86 </a>
87 </td>
2a491182
F
88 </tr>
89 </ng-template>
90</p-table>