55 lines
1.7 KiB
HTML
55 lines
1.7 KiB
HTML
<mat-card>
|
|
<mat-card-header>
|
|
<mat-card-title class="platform-title">
|
|
<div class="platform-heading">
|
|
E-Mails
|
|
</div>
|
|
<button mat-icon-button aria-label="How to use">
|
|
<mat-icon matTooltip="How to use" class="info-button">info</mat-icon>
|
|
</button>
|
|
</mat-card-title>
|
|
</mat-card-header>
|
|
<mat-card-content>
|
|
<mat-list *ngIf="emails$ | async as emails">
|
|
<mat-list-item *ngIf="emails.length === 0; else startButton">
|
|
<button mat-menu-item (click)="onCreate()">
|
|
<mat-icon>add</mat-icon>
|
|
<span> Add a platform connection!</span>
|
|
</button>
|
|
<mat-divider></mat-divider>
|
|
</mat-list-item>
|
|
<ng-template #startButton>
|
|
<mat-list-item>
|
|
<div class="toggle-container">
|
|
<mat-slide-toggle class="toggle"></mat-slide-toggle>
|
|
</div>
|
|
<mat-divider></mat-divider>
|
|
</mat-list-item>
|
|
</ng-template>
|
|
<mat-list-item *ngFor="let email of emails">
|
|
<div class="entry">
|
|
{{ email.name }}
|
|
<button
|
|
mat-icon-button
|
|
[matMenuTriggerFor]="menu"
|
|
aria-label="Example icon-button with a menu"
|
|
>
|
|
<mat-icon>more_vert</mat-icon>
|
|
</button>
|
|
</div>
|
|
<mat-divider></mat-divider>
|
|
<mat-menu #menu="matMenu">
|
|
<button mat-menu-item (click)="onDelete(email.id)">
|
|
<mat-icon>delete</mat-icon>
|
|
<span>Delete</span>
|
|
</button>
|
|
<button mat-menu-item (click)="onCreate()">
|
|
<mat-icon>add</mat-icon>
|
|
<span>Add another</span>
|
|
</button>
|
|
</mat-menu>
|
|
</mat-list-item>
|
|
</mat-list>
|
|
</mat-card-content>
|
|
</mat-card>
|