78 lines
2.6 KiB
HTML
78 lines
2.6 KiB
HTML
<div *ngIf="!tokens" class="tw-items-center tw-justify-center tw-pt-64 tw-text-center">
|
|
<i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
|
|
</div>
|
|
|
|
<sm-no-items *ngIf="tokens?.length == 0">
|
|
<ng-container title>{{ "accessTokensNoItemsTitle" | i18n }}</ng-container>
|
|
<ng-container description>{{ "accessTokensNoItemsDesc" | i18n }}</ng-container>
|
|
<button bitButton buttonType="secondary" (click)="newAccessTokenEvent.emit()">
|
|
<i class="bwi bwi-plus" aria-hidden="true"></i>
|
|
{{ "createAccessToken" | i18n }}
|
|
</button>
|
|
</sm-no-items>
|
|
|
|
<bit-table *ngIf="tokens?.length >= 1">
|
|
<ng-container header>
|
|
<tr>
|
|
<th bitCell class="tw-w-0">
|
|
<label class="tw-m-0 tw-flex tw-w-fit tw-gap-2 !tw-font-bold !tw-text-muted">
|
|
<input
|
|
type="checkbox"
|
|
(change)="$event ? toggleAll() : null"
|
|
[checked]="selection.hasValue() && isAllSelected()"
|
|
[indeterminate]="selection.hasValue() && !isAllSelected()"
|
|
/>
|
|
{{ "all" | i18n }}
|
|
</label>
|
|
</th>
|
|
<th bitCell>{{ "name" | i18n }}</th>
|
|
<th bitCell>{{ "permissions" | i18n }}</th>
|
|
<th bitCell>{{ "expires" | i18n }}</th>
|
|
<th bitCell>{{ "lastEdited" | i18n }}</th>
|
|
<th bitCell class="tw-w-0">
|
|
<button
|
|
bitIconButton="bwi-ellipsis-v"
|
|
buttonType="main"
|
|
[title]="'options' | i18n"
|
|
[attr.aria-label]="'options' | i18n"
|
|
></button>
|
|
</th>
|
|
</tr>
|
|
</ng-container>
|
|
<ng-template body>
|
|
<tr bitRow *ngFor="let token of tokens">
|
|
<td bitCell>
|
|
<input
|
|
type="checkbox"
|
|
(change)="$event ? selection.toggle(token.id) : null"
|
|
[checked]="selection.isSelected(token.id)"
|
|
/>
|
|
</td>
|
|
<td bitCell>{{ token.name }}</td>
|
|
<td bitCell>{{ permission(token) | i18n }}</td>
|
|
<td bitCell>
|
|
{{ token.expireAt === null ? ("never" | i18n) : (token.expireAt | date: "medium") }}
|
|
</td>
|
|
<td bitCell>{{ token.revisionDate | date: "medium" }}</td>
|
|
<td bitCell>
|
|
<button
|
|
bitIconButton="bwi-ellipsis-v"
|
|
buttonType="main"
|
|
[title]="'options' | i18n"
|
|
[attr.aria-label]="'options' | i18n"
|
|
[bitMenuTriggerFor]="tokenMenu"
|
|
></button>
|
|
</td>
|
|
|
|
<bit-menu #tokenMenu>
|
|
<button type="button" bitMenuItem>
|
|
<span class="tw-text-danger">
|
|
<i class="bwi bwi-fw bwi-minus-circle" aria-hidden="true"></i>
|
|
{{ "revokeAccessToken" | i18n }}
|
|
</span>
|
|
</button>
|
|
</bit-menu>
|
|
</tr>
|
|
</ng-template>
|
|
</bit-table>
|