1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

implement platform utils additions

This commit is contained in:
Kyle Spearrin
2018-01-25 14:31:54 -05:00
parent d9fb4f2d67
commit f2f34c8e70
2 changed files with 12 additions and 1 deletions

View File

@@ -140,6 +140,18 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
return tabOpen;
}
launchUri(uri: string, options?: any): void {
BrowserApi.createNewTab(uri, options && options.extensionPage === true);
}
saveFile(win: Window, blobData: any, blobOptions: any, fileName: string): void {
BrowserApi.downloadFile(win, blobData, blobOptions, fileName);
}
alertError(title: string, message: string): void {
// TODO
}
private sidebarViewName(): string {
if ((window as any).chrome.sidebarAction && this.isFirefox()) {
return 'sidebar';