mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-27 04:03:00 +02:00
94 lines
3.5 KiB
HTML
94 lines
3.5 KiB
HTML
|
<div *ngIf="!projects" 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="projects?.length == 0">
|
||
|
<ng-container title>{{ "projectsNoItemsTitle" | i18n }}</ng-container>
|
||
|
<ng-container description>{{ "projectsNoItemsMessage" | i18n }}</ng-container>
|
||
|
<button bitButton buttonType="secondary" (click)="newProjectEvent.emit()">
|
||
|
<i class="bwi bwi-plus" aria-hidden="true"></i>
|
||
|
{{ "newProject" | 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="projects?.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>{{ "lastEdited" | i18n }}</th>
|
||
|
<th bitCell class="tw-w-0">
|
||
|
<button
|
||
|
bitIconButton="bwi-ellipsis-v"
|
||
|
buttonType="main"
|
||
|
[bitMenuTriggerFor]="tableMenu"
|
||
|
[title]="'options' | i18n"
|
||
|
[attr.aria-label]="'options' | i18n"
|
||
|
></button>
|
||
|
</th>
|
||
|
</tr>
|
||
|
</ng-container>
|
||
|
<ng-container body>
|
||
|
<tr bitRow *ngFor="let project of projects; index as i">
|
||
|
<td bitCell>
|
||
|
<input
|
||
|
type="checkbox"
|
||
|
(change)="$event ? selection.toggle(project.id) : null"
|
||
|
[checked]="selection.isSelected(project.id)"
|
||
|
/>
|
||
|
</td>
|
||
|
<td bitCell class="tw-w-0 tw-pr-0">
|
||
|
<i class="bwi bwi-collection tw-text-xl tw-text-muted" aria-hidden="true"></i>
|
||
|
</td>
|
||
|
<td bitCell>
|
||
|
<a [routerLink]="[project.id]">{{ project.name }}</a>
|
||
|
</td>
|
||
|
<td bitCell>{{ project.revisionDate | date: "medium" }}</td>
|
||
|
<td bitCell>
|
||
|
<button
|
||
|
bitIconButton="bwi-ellipsis-v"
|
||
|
buttonType="main"
|
||
|
[bitMenuTriggerFor]="projectMenu"
|
||
|
[title]="'options' | i18n"
|
||
|
[attr.aria-label]="'options' | i18n"
|
||
|
></button>
|
||
|
</td>
|
||
|
<bit-menu #projectMenu>
|
||
|
<button type="button" bitMenuItem (click)="editProjectEvent.emit(project.id)">
|
||
|
<i class="bwi bwi-fw bwi-pencil tw-text-xl" aria-hidden="true"></i>
|
||
|
{{ "editProject" | i18n }}
|
||
|
</button>
|
||
|
<button type="button" bitMenuItem (click)="viewProjectEvent.emit(project.id)">
|
||
|
<i class="bwi bwi-fw bwi-eye tw-text-xl" aria-hidden="true"></i>
|
||
|
{{ "viewProject" | i18n }}
|
||
|
</button>
|
||
|
<button type="button" bitMenuItem (click)="deleteProject(project.id)">
|
||
|
<i class="bwi bwi-fw bwi-trash tw-text-xl tw-text-danger" aria-hidden="true"></i>
|
||
|
<span class="tw-text-danger">{{ "deleteProject" | i18n }}</span>
|
||
|
</button>
|
||
|
</bit-menu>
|
||
|
</tr>
|
||
|
</ng-container>
|
||
|
</bit-table>
|
||
|
|
||
|
<bit-menu #tableMenu>
|
||
|
<button type="button" bitMenuItem (click)="bulkDeleteProjects()">
|
||
|
<i class="bwi bwi-fw bwi-trash tw-text-xl tw-text-danger" aria-hidden="true"></i>
|
||
|
<span class="tw-text-danger">{{ "deleteProjects" | i18n }}</span>
|
||
|
</button>
|
||
|
</bit-menu>
|