mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
implement launchUri function (#177)
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import * as child_process from 'child_process';
|
||||
|
||||
import { DeviceType } from '../../enums/deviceType';
|
||||
|
||||
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
|
||||
// tslint:disable-next-line
|
||||
const open = require('open');
|
||||
|
||||
export class CliPlatformUtilsService implements PlatformUtilsService {
|
||||
identityClientId: string;
|
||||
|
||||
@@ -81,7 +85,11 @@ export class CliPlatformUtilsService implements PlatformUtilsService {
|
||||
}
|
||||
|
||||
launchUri(uri: string, options?: any): void {
|
||||
throw new Error('Not implemented.');
|
||||
if (process.platform === 'linux') {
|
||||
child_process.spawnSync('xdg-open', [uri]);
|
||||
} else {
|
||||
open(uri);
|
||||
}
|
||||
}
|
||||
|
||||
saveFile(win: Window, blobData: any, blobOptions: any, fileName: string): void {
|
||||
|
||||
Reference in New Issue
Block a user