mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Feature: compact toasts (#4545)
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user