mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
implement platform utils additions
This commit is contained in:
parent
d9fb4f2d67
commit
f2f34c8e70
@ -161,7 +161,6 @@ angular
|
||||
cryptoService.getOrgKey($scope.cipher.organizationId).then(function (key) {
|
||||
return cryptoService.decryptFromBytes(req.response, key);
|
||||
}).then(function (decBuf) {
|
||||
var blob = new Blob([decBuf]);
|
||||
BrowserApi.downloadFile($window, decBuf, null, attachment.fileName);
|
||||
|
||||
$timeout(function () {
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user