Prettier code cleanup for .ts files

See #182
This commit is contained in:
Michael Shamoon
2022-03-11 10:53:32 -08:00
parent f8c8161a3e
commit f34202a82a
159 changed files with 3882 additions and 2716 deletions

View File

@@ -1,8 +1,7 @@
import { Injectable } from '@angular/core';
import { Subject, zip } from 'rxjs';
import { Injectable } from '@angular/core'
import { Subject, zip } from 'rxjs'
export interface Toast {
title: string
content: string
@@ -12,15 +11,13 @@ export interface Toast {
action?: any
actionName?: string
}
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class ToastService {
constructor() { }
constructor() {}
private toasts: Toast[] = []
@@ -32,15 +29,15 @@ export class ToastService {
}
showError(content: string, delay: number = 10000) {
this.show({title: $localize`Error`, content: content, delay: delay})
this.show({ title: $localize`Error`, content: content, delay: delay })
}
showInfo(content: string, delay: number = 5000) {
this.show({title: $localize`Information`, content: content, delay: delay})
this.show({ title: $localize`Information`, content: content, delay: delay })
}
closeToast(toast: Toast) {
let index = this.toasts.findIndex(t => t == toast)
let index = this.toasts.findIndex((t) => t == toast)
if (index > -1) {
this.toasts.splice(index, 1)
this.toastsSubject.next(this.toasts)
@@ -50,5 +47,4 @@ export class ToastService {
getToasts() {
return this.toastsSubject
}
}