replace sliding items with close buttons

This commit is contained in:
Matt Hill
2020-12-10 14:22:54 -07:00
committed by Aaron Greenspan
parent 5b3c692b7a
commit 4de0c97bb5
7 changed files with 65 additions and 51 deletions

View File

@@ -33,28 +33,24 @@
</ion-item-group>
<ion-item-group style="margin-bottom: 16px;">
<ion-item-sliding *ngFor="let not of notifications; let i = index">
<ion-item-options side="end">
<ion-item-option color="danger" (click)="remove(not.id, i)">
<ion-icon slot="icon-only" name="trash-outline"></ion-icon>
</ion-item-option>
</ion-item-options>
<ion-item>
<ion-label class="ion-text-wrap">
<h2>
<ion-text [color]="getColor(not)"><b>{{ not.title }}</b></ion-text>
</h2>
<h2 class="notification-message">{{ not.message }}</h2>
<p>{{ not.createdAt | date: 'short' }}</p>
<p>
<a style="text-decoration: none;"
[routerLink]="['/services', 'installed', not.appId]">{{ not.appId }}</a>
<span> - </span>
Code: {{ not.code }}
</p>
</ion-label>
</ion-item>
</ion-item-sliding>
<ion-item *ngFor="let not of notifications; let i = index">
<ion-label class="ion-text-wrap">
<h2>
<ion-text [color]="getColor(not)"><b>{{ not.title }}</b></ion-text>
</h2>
<h2 class="notification-message">{{ not.message }}</h2>
<p>{{ not.createdAt | date: 'short' }}</p>
<p>
<a style="text-decoration: none;"
[routerLink]="['/services', 'installed', not.appId]">{{ not.appId }}</a>
<span> - </span>
Code: {{ not.code }}
</p>
</ion-label>
<ion-button slot="end" fill="clear" (click)="remove(not.id, i)">
<ion-icon slot="icon-only" name="close-outline" color="medium"></ion-icon>
</ion-button>
</ion-item>
</ion-item-group>
<ion-infinite-scroll [disabled]="!needInfinite" (ionInfinite)="doInfinite($event)">