-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
vault-v2.component.html
83 lines (76 loc) · 2.94 KB
/
vault-v2.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<popup-page [loading]="loading$ | async" disablePadding>
<popup-header slot="header" [pageTitle]="'vault' | i18n">
<ng-container slot="end">
<app-new-item-dropdown [initialValues]="newItemItemValues$ | async"></app-new-item-dropdown>
<app-pop-out></app-pop-out>
<app-current-account></app-current-account>
</ng-container>
</popup-header>
<div
*ngIf="vaultState === VaultStateEnum.Empty"
class="tw-flex tw-flex-col tw-h-full tw-justify-center"
>
<bit-no-items [icon]="vaultIcon">
<ng-container slot="title">{{ "yourVaultIsEmpty" | i18n }}</ng-container>
<ng-container slot="description">{{ "autofillSuggestionsTip" | i18n }}</ng-container>
<app-new-item-dropdown
slot="button"
[initialValues]="newItemItemValues$ | async"
></app-new-item-dropdown>
</bit-no-items>
</div>
<blocked-injection-banner
*ngIf="vaultState !== VaultStateEnum.Empty"
slot="full-width-notice"
></blocked-injection-banner>
<!-- Show search & filters outside of the scroll area of the page -->
<ng-container
slot="above-scroll-area"
*ngIf="vaultState !== VaultStateEnum.Empty && !(loading$ | async)"
>
<app-vault-header-v2></app-vault-header-v2>
</ng-container>
<ng-container *ngIf="vaultState !== VaultStateEnum.Empty">
<div
*ngIf="vaultState === VaultStateEnum.NoResults"
class="tw-flex tw-flex-col tw-justify-center tw-h-auto tw-pt-12"
>
<bit-no-items [icon]="noResultsIcon">
<ng-container slot="title">{{ "noItemsMatchSearch" | i18n }}</ng-container>
<ng-container slot="description">{{ "clearFiltersOrTryAnother" | i18n }}</ng-container>
</bit-no-items>
</div>
<!-- For better consistency with screen readers, the role/aria needs to be on an element that isn't dynamic by *ngIf -->
<div role="status" aria-live="polite">
<div
*ngIf="vaultState === VaultStateEnum.DeactivatedOrg"
class="tw-flex tw-flex-col tw-justify-center tw-h-auto tw-pt-12"
>
<bit-no-items [icon]="deactivatedIcon">
<ng-container slot="title">
{{ "organizationIsDeactivated" | i18n }}
</ng-container>
<ng-container slot="description">{{ "contactYourOrgAdmin" | i18n }}</ng-container>
</bit-no-items>
</div>
</div>
<div
*ngIf="vaultState === null"
cdkVirtualScrollingElement
class="tw-h-full tw-p-3 bit-compact:tw-p-2 tw-styled-scrollbar"
>
<app-autofill-vault-list-items></app-autofill-vault-list-items>
<app-vault-list-items-container
[title]="'favorites' | i18n"
[ciphers]="favoriteCiphers$ | async"
id="favorites"
></app-vault-list-items-container>
<app-vault-list-items-container
[title]="'allItems' | i18n"
[ciphers]="remainingCiphers$ | async"
id="allItems"
disableSectionMargin
></app-vault-list-items-container>
</div>
</ng-container>
</popup-page>