Feature: compact toasts (#4545)

This commit is contained in:
shamoon
2023-11-13 13:17:44 -08:00
committed by GitHub
parent facb7226fe
commit 90707d661b
9 changed files with 127 additions and 119 deletions

View File

@@ -2,12 +2,12 @@ import { Injectable } from '@angular/core'
import { Subject } from 'rxjs'
export interface Toast {
title: string
content: string
delay: number
delayRemaining?: number
action?: any
actionName?: string
@@ -34,7 +34,6 @@ export class ToastService {
showError(content: string, error: any = null, delay: number = 10000) {
this.show({
title: $localize`Error`,
content: content,
delay: delay,
classname: 'error',
@@ -43,7 +42,7 @@ export class ToastService {
}
showInfo(content: string, delay: number = 5000) {
this.show({ title: $localize`Information`, content: content, delay: delay })
this.show({ content: content, delay: delay })
}
closeToast(toast: Toast) {