diff options
author | Dessalines <tyhou13@gmx.com> | 2020-01-22 22:29:11 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-01-22 22:29:11 -0500 |
commit | 3b4258096c3c3dc160090436c9205e1ecf2e8e75 (patch) | |
tree | f07264d3de3b169c6140b2bf303ff7732d908b0a /ui/src/services | |
parent | 66af9623d90aadd47c9cf37faeac4f60f1d818d4 (diff) |
Adding a toaster to replace alerts. Fixes #457
Diffstat (limited to 'ui/src/services')
-rw-r--r-- | ui/src/services/WebSocketService.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/services/WebSocketService.ts b/ui/src/services/WebSocketService.ts index 146a9abf..e72a2871 100644 --- a/ui/src/services/WebSocketService.ts +++ b/ui/src/services/WebSocketService.ts @@ -41,6 +41,7 @@ import { Subject } from 'rxjs'; import { retryWhen, delay } from 'rxjs/operators'; import { UserService } from './'; import { i18n } from '../i18next'; +import { toast } from '../utils'; export class WebSocketService { private static _instance: WebSocketService; @@ -318,7 +319,7 @@ export class WebSocketService { private setAuth(obj: any, throwErr: boolean = true) { obj.auth = UserService.Instance.auth; if (obj.auth == null && throwErr) { - alert(i18n.t('not_logged_in')); + toast(i18n.t('not_logged_in'), 'danger'); throw 'Not logged in'; } } |