|
1 | 1 | @if (ivasAreLoading()) { |
2 | | - <p class="text-base">Loading your contact addresses..</p> |
| 2 | +<p class="text-base">Loading your contact addresses..</p> |
3 | 3 | } @else if (ivasError()) { |
4 | | - <p class="font-bold text-red-600"> |
5 | | - Your contact addresses could not be loaded. Please try again later. |
6 | | - </p> |
7 | | -} @else { |
8 | | - @if (!ivas().length) { |
9 | | - <p class="text-base"> |
10 | | - You have not yet created any contact addresses. This is needed if you wish to |
11 | | - download research data. |
12 | | - </p> |
13 | | - } |
14 | | - <p class="pb-4 text-base"> |
15 | | - Adding new contact addresses is done via the button at the end of this section. |
16 | | - After a new address is added, you must request verification of the address using the |
17 | | - button next to the address. Removing a contact address is done through the deletion |
18 | | - button to the right, but you will lose access to any datasets whose access was |
19 | | - linked to that address. |
20 | | - </p> |
21 | | - @if (ivas().length) { |
| 4 | +<p class="font-bold text-red-600"> |
| 5 | + Your contact addresses could not be loaded. Please try again later. |
| 6 | +</p> |
| 7 | +} @else { @if (!ivas().length) { |
| 8 | +<p class="text-base"> |
| 9 | + You have not yet created any contact addresses. This is needed if you wish to download |
| 10 | + research data. |
| 11 | +</p> |
| 12 | +} |
| 13 | +<p class="text-base"> |
| 14 | + Adding new contact addresses is done via the button at the end of this section. After |
| 15 | + a new address is added, you must request verification of the address using the button |
| 16 | + next to the address. Removing a contact address is done through the deletion button to |
| 17 | + the right, but you will lose access to any datasets whose access was linked to that |
| 18 | + address. |
| 19 | +</p> |
| 20 | +@if (ivas().length) { |
| 21 | +<div |
| 22 | + class="border-outline-dark mb-4 grid grid-cols-1 border-t [&_button>mat-icon]:-translate-y-0.75" |
| 23 | +> |
| 24 | + @for (iva of ivas(); track iva.id) { |
| 25 | + <div |
| 26 | + class="border-outline-dark grid grid-cols-12 items-center gap-2 border-b py-2 text-black" |
| 27 | + > |
22 | 28 | <div |
23 | | - class="border-outline-dark mb-4 grid grid-cols-1 border-t [&_button>mat-icon]:-translate-y-0.75" |
| 29 | + class="col-span-11 flex min-h-12 items-center md:col-span-6 lg:col-span-4 lg:row-span-1 lg:pe-4 xl:col-span-4 xl:pe-4 2xl:col-span-5" |
| 30 | + [class.md:row-span-2]="iva.state !== 'Verified'" |
24 | 31 | > |
25 | | - @for (iva of ivas(); track iva.id) { |
26 | | - <div |
27 | | - class="border-outline-dark grid grid-cols-12 items-center gap-2 border-b py-2 text-black" |
28 | | - > |
29 | | - <div |
30 | | - class="col-span-11 flex min-h-12 items-center md:col-span-6 lg:col-span-4 lg:row-span-1 lg:pe-4 xl:col-span-4 xl:pe-4 2xl:col-span-5" |
31 | | - [class.md:row-span-2]="iva.state !== 'Verified'" |
32 | | - > |
33 | | - <div>{{ (iva.type | IvaTypePipe).name }}: {{ iva.value }}</div> |
34 | | - </div> |
35 | | - <div |
36 | | - mat-cell |
37 | | - class="order-3 col-span-12 flex h-full items-center justify-center md:order-0 md:col-span-5 lg:col-span-3 xl:col-span-3 2xl:col-span-2" |
38 | | - > |
39 | | - <div class="min-w-64 text-center lg:text-start"> |
40 | | - @switch (iva.state) { |
41 | | - @case ('Verified') { |
42 | | - <div class="text-bold text-success text-base"> |
43 | | - Address has been verified |
44 | | - <mat-icon class="align-bottom" fontIcon="verified_user"></mat-icon> |
45 | | - </div> |
46 | | - } |
47 | | - @case ('Unverified') { |
48 | | - <div class="text-bold text-error text-base"> |
49 | | - Needs verification |
50 | | - <mat-icon class="align-bottom" fontIcon="gpp_bad"></mat-icon> |
51 | | - </div> |
52 | | - } |
53 | | - @case ('CodeTransmitted') { |
54 | | - <div class="text-bold text-warning text-base"> |
55 | | - Code has been sent |
56 | | - <mat-icon class="align-bottom" fontIcon="pin"></mat-icon> |
57 | | - </div> |
58 | | - } |
59 | | - @default { |
60 | | - <div class="text-bold text-info text-base"> |
61 | | - Waiting for verification |
62 | | - <mat-icon class="align-bottom" fontIcon="pending"></mat-icon> |
63 | | - </div> |
64 | | - } |
65 | | - } |
66 | | - </div> |
67 | | - </div> |
68 | | - <div |
69 | | - mat-cell |
70 | | - class="order-4 col-span-12 my-2 min-w-48 text-center md:order-3 md:col-span-5 md:col-start-7 md:my-0 lg:order-3 lg:col-span-4 lg:block xl:col-span-3 2xl:col-span-2" |
71 | | - [class.md:hidden]="iva.state === 'Verified'" |
72 | | - > |
73 | | - @if (iva.state === 'Unverified') { |
74 | | - <button |
75 | | - (click)="requestVerification(iva)" |
76 | | - class="w-full sm:w-64" |
77 | | - mat-stroked-button |
78 | | - data-umami-event="User IVA list Request Verification Clicked" |
79 | | - > |
80 | | - <mat-icon fontIcon="pin"></mat-icon> Request verification |
81 | | - </button> |
82 | | - } @else if (iva.state !== 'Verified') { |
83 | | - <button |
84 | | - (click)="enterVerificationCode(iva)" |
85 | | - [disabled]="checkingIvaId()" |
86 | | - class="w-full sm:w-64" |
87 | | - mat-stroked-button |
88 | | - data-umami-event="User IVA list Enter Verification Code Clicked" |
89 | | - > |
90 | | - <mat-icon fontIcon="dialpad"></mat-icon> Enter verification code |
91 | | - </button> |
92 | | - } |
93 | | - </div> |
94 | | - |
95 | | - <div |
96 | | - class="order-2 flex h-12 items-center md:order-3 lg:order-4 lg:row-span-1 2xl:ps-6" |
97 | | - [class.md:row-span-2]="iva.state !== 'Verified'" |
98 | | - > |
99 | | - <button |
100 | | - (click)="deleteWhenConfirmed(iva)" |
101 | | - mat-icon-button |
102 | | - aria-label="Delete" |
103 | | - data-umami-event="User IVA list Delete Clicked" |
104 | | - > |
105 | | - <mat-icon fontIcon="delete"></mat-icon> |
106 | | - </button> |
107 | | - </div> |
| 32 | + <div>{{ (iva.type | IvaTypePipe).name }}: {{ iva.value }}</div> |
| 33 | + </div> |
| 34 | + <div |
| 35 | + mat-cell |
| 36 | + class="order-3 col-span-12 flex h-full items-center justify-center md:order-0 md:col-span-5 lg:col-span-3 xl:col-span-3 2xl:col-span-2" |
| 37 | + > |
| 38 | + <div class="min-w-64 text-center lg:text-start"> |
| 39 | + @switch (iva.state) { @case ('Verified') { |
| 40 | + <div class="text-bold text-success text-base"> |
| 41 | + Address has been verified |
| 42 | + <mat-icon class="align-bottom" fontIcon="verified_user"></mat-icon> |
| 43 | + </div> |
| 44 | + } @case ('Unverified') { |
| 45 | + <div class="text-bold text-error text-base"> |
| 46 | + Needs verification |
| 47 | + <mat-icon class="align-bottom" fontIcon="gpp_bad"></mat-icon> |
| 48 | + </div> |
| 49 | + } @case ('CodeTransmitted') { |
| 50 | + <div class="text-bold text-warning text-base"> |
| 51 | + Code has been sent |
| 52 | + <mat-icon class="align-bottom" fontIcon="pin"></mat-icon> |
| 53 | + </div> |
| 54 | + } @default { |
| 55 | + <div class="text-bold text-info text-base"> |
| 56 | + Waiting for verification |
| 57 | + <mat-icon class="align-bottom" fontIcon="pending"></mat-icon> |
108 | 58 | </div> |
| 59 | + } } |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + <div |
| 63 | + mat-cell |
| 64 | + class="order-4 col-span-12 my-2 min-w-48 text-center md:order-3 md:col-span-5 md:col-start-7 md:my-0 lg:order-3 lg:col-span-4 lg:block xl:col-span-3 2xl:col-span-2" |
| 65 | + [class.md:hidden]="iva.state === 'Verified'" |
| 66 | + > |
| 67 | + @if (iva.state === 'Unverified') { |
| 68 | + <button |
| 69 | + (click)="requestVerification(iva)" |
| 70 | + class="w-full sm:w-64" |
| 71 | + mat-stroked-button |
| 72 | + data-umami-event="User IVA list Request Verification Clicked" |
| 73 | + > |
| 74 | + <mat-icon fontIcon="pin"></mat-icon> Request verification |
| 75 | + </button> |
| 76 | + } @else if (iva.state !== 'Verified') { |
| 77 | + <button |
| 78 | + (click)="enterVerificationCode(iva)" |
| 79 | + [disabled]="checkingIvaId()" |
| 80 | + class="w-full sm:w-64" |
| 81 | + mat-stroked-button |
| 82 | + data-umami-event="User IVA list Enter Verification Code Clicked" |
| 83 | + > |
| 84 | + <mat-icon fontIcon="dialpad"></mat-icon> Enter verification code |
| 85 | + </button> |
109 | 86 | } |
110 | 87 | </div> |
| 88 | + |
| 89 | + <div |
| 90 | + class="order-2 flex h-12 items-center md:order-3 lg:order-4 lg:row-span-1 2xl:ps-6" |
| 91 | + [class.md:row-span-2]="iva.state !== 'Verified'" |
| 92 | + > |
| 93 | + <button |
| 94 | + (click)="deleteWhenConfirmed(iva)" |
| 95 | + mat-icon-button |
| 96 | + aria-label="Delete" |
| 97 | + data-umami-event="User IVA list Delete Clicked" |
| 98 | + > |
| 99 | + <mat-icon fontIcon="delete"></mat-icon> |
| 100 | + </button> |
| 101 | + </div> |
| 102 | + </div> |
111 | 103 | } |
112 | | - <button |
113 | | - (click)="enterNew()" |
114 | | - mat-raised-button |
115 | | - class="button-quaternary mt-4" |
116 | | - data-umami-event="User IVA list Add Contact Clicked" |
117 | | - > |
118 | | - <mat-icon fontIcon="add"></mat-icon>Add contact address |
119 | | - </button> |
| 104 | +</div> |
| 105 | +} |
| 106 | +<button |
| 107 | + (click)="enterNew()" |
| 108 | + mat-raised-button |
| 109 | + class="button-quaternary mt-4" |
| 110 | + data-umami-event="User IVA list Add Contact Clicked" |
| 111 | +> |
| 112 | + <mat-icon fontIcon="add"></mat-icon>Add contact address |
| 113 | +</button> |
120 | 114 | } |
0 commit comments