mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-27 04:03:00 +02:00
116 lines
4.2 KiB
HTML
116 lines
4.2 KiB
HTML
|
<div *ngIf="!secrets" 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="secrets?.length == 0">
|
||
|
<ng-container title>{{ "secretsNoItemsTitle" | i18n }}</ng-container>
|
||
|
<ng-container description>{{ "secretsNoItemsMessage" | i18n }}</ng-container>
|
||
|
<button bitButton buttonType="secondary" (click)="newSecretEvent.emit()">
|
||
|
<i class="bwi bwi-plus" aria-hidden="true"></i>
|
||
|
{{ "newSecret" | i18n }}
|
||
|
</button>
|
||
|
<button bitButton buttonType="secondary" (click)="importSecretsEvent.emit()">
|
||
|
<i class="bwi bwi-save tw-rotate-180" aria-hidden="true"></i>
|
||
|
{{ "importSecrets" | i18n }}
|
||
|
</button>
|
||
|
</sm-no-items>
|
||
|
|
||
|
<bit-table *ngIf="secrets?.length >= 1">
|
||
|
<ng-container header>
|
||
|
<tr>
|
||
|
<th bitCell class="tw-w-0">
|
||
|
<label class="!tw-mb-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 colspan="2">{{ "name" | i18n }}</th>
|
||
|
<th bitCell>{{ "projects" | 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"
|
||
|
[bitMenuTriggerFor]="tableMenu"
|
||
|
></button>
|
||
|
</th>
|
||
|
</tr>
|
||
|
</ng-container>
|
||
|
<ng-container body>
|
||
|
<tr bitRow *ngFor="let secret of secrets">
|
||
|
<td bitCell>
|
||
|
<input
|
||
|
type="checkbox"
|
||
|
(change)="$event ? selection.toggle(secret.id) : null"
|
||
|
[checked]="selection.isSelected(secret.id)"
|
||
|
/>
|
||
|
</td>
|
||
|
<td bitCell class="tw-w-0 tw-pr-0">
|
||
|
<i class="bwi bwi-key tw-text-xl tw-text-muted" aria-hidden="true"></i>
|
||
|
</td>
|
||
|
<td bitCell>{{ secret.name }}</td>
|
||
|
<td bitCell>
|
||
|
<span
|
||
|
*ngFor="let project of secret.projects"
|
||
|
bitBadge
|
||
|
badgeType="secondary"
|
||
|
class="tw-ml-1"
|
||
|
>
|
||
|
{{ project.name }}
|
||
|
</span>
|
||
|
</td>
|
||
|
<td bitCell>{{ secret.revisionDate | date: "medium" }}</td>
|
||
|
<td bitCell>
|
||
|
<button
|
||
|
bitIconButton="bwi-ellipsis-v"
|
||
|
buttonType="main"
|
||
|
[title]="'options' | i18n"
|
||
|
[attr.aria-label]="'options' | i18n"
|
||
|
[bitMenuTriggerFor]="secretMenu"
|
||
|
></button>
|
||
|
</td>
|
||
|
|
||
|
<bit-menu #secretMenu>
|
||
|
<button type="button" bitMenuItem (click)="editSecretEvent.emit(secret.id)">
|
||
|
<i class="bwi bwi-fw bwi-pencil tw-text-xl" aria-hidden="true"></i>
|
||
|
{{ "editSecret" | i18n }}
|
||
|
</button>
|
||
|
<button type="button" bitMenuItem (click)="copySecretNameEvent.emit(secret.id)">
|
||
|
<i class="bwi bwi-fw bwi-clone tw-text-xl" aria-hidden="true"></i>
|
||
|
{{ "copySecretName" | i18n }}
|
||
|
</button>
|
||
|
<button type="button" bitMenuItem (click)="copySecretValueEvent.emit(secret.id)">
|
||
|
<i class="bwi bwi-fw bwi-clone tw-text-xl" aria-hidden="true"></i>
|
||
|
{{ "copySecretValue" | i18n }}
|
||
|
</button>
|
||
|
<button type="button" bitMenuItem (click)="projectsEvent.emit(secret.id)">
|
||
|
<i class="bwi bwi-fw bwi-sitemap tw-text-xl" aria-hidden="true"></i>
|
||
|
{{ "projects" | i18n }}
|
||
|
</button>
|
||
|
<button type="button" bitMenuItem (click)="deleteSecretsEvent.emit([secret.id])">
|
||
|
<i class="bwi bwi-fw bwi-trash tw-text-xl tw-text-danger" aria-hidden="true"></i>
|
||
|
<span class="tw-text-danger">{{ "deleteSecret" | i18n }}</span>
|
||
|
</button>
|
||
|
</bit-menu>
|
||
|
</tr>
|
||
|
</ng-container>
|
||
|
</bit-table>
|
||
|
|
||
|
<bit-menu #tableMenu>
|
||
|
<button type="button" bitMenuItem>
|
||
|
<i class="bwi bwi-fw bwi-sitemap tw-text-xl" aria-hidden="true"></i>
|
||
|
{{ "projects" | i18n }}
|
||
|
</button>
|
||
|
<button type="button" bitMenuItem (click)="bulkDeleteSecrets()">
|
||
|
<i class="bwi bwi-fw bwi-trash tw-text-xl tw-text-danger" aria-hidden="true"></i>
|
||
|
<span class="tw-text-danger">{{ "deleteSecrets" | i18n }}</span>
|
||
|
</button>
|
||
|
</bit-menu>
|