1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +00:00

platform utils for toasting

This commit is contained in:
Kyle Spearrin
2018-10-02 23:33:56 -04:00
parent adba3f8d67
commit 89a448b12f
21 changed files with 91 additions and 86 deletions

View File

@@ -1,3 +1,4 @@
import { ToasterService } from 'angular2-toaster';
import * as tldjs from 'tldjs';
import { BrowserApi } from '../browser/browserApi';
@@ -178,8 +179,13 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
return true;
}
showToast(type: 'error' | 'success' | 'warning' | 'info', title: string, text: string, global?: any): void {
throw new Error('showToast not implemented');
showToast(type: 'error' | 'success' | 'warning' | 'info', title: string, text: string, options?: any): void {
this.messagingService.send('showToast', {
text: text,
title: title,
type: type,
options: options,
});
}
showDialog(text: string, title?: string, confirmText?: string, cancelText?: string, type?: string) {