Added user follows

This commit is contained in:
2017-07-21 10:10:48 +02:00
parent 8a72b76d27
commit 524ab3fff9
10 changed files with 126 additions and 18 deletions

View File

@ -9,7 +9,7 @@ export class StatusMessage {
this.text = text
}
show(message: string, duration?: number) {
show(message: string, duration: number) {
let messageId = String(Date.now())
this.text.innerText = message
@ -27,10 +27,15 @@ export class StatusMessage {
}
showError(message: string, duration?: number) {
this.show(message, duration)
this.show(message, duration || 4000)
this.container.classList.add("error-message")
}
showInfo(message: string, duration?: number) {
this.show(message, duration || 2000)
this.container.classList.add("info-message")
}
close() {
this.container.classList.add("fade-out")
}