1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00
Files
browser/src/abstractions/platformUtils.service.ts
2018-10-03 00:03:49 -04:00

33 lines
1.3 KiB
TypeScript

import { DeviceType } from '../enums/deviceType';
export abstract class PlatformUtilsService {
identityClientId: string;
getDevice: () => DeviceType;
getDeviceString: () => string;
isFirefox: () => boolean;
isChrome: () => boolean;
isEdge: () => boolean;
isOpera: () => boolean;
isVivaldi: () => boolean;
isSafari: () => boolean;
isIE: () => boolean;
isMacAppStore: () => boolean;
analyticsId: () => string;
getDomain: (uriString: string) => string;
isViewOpen: () => boolean;
lockTimeout: () => number;
launchUri: (uri: string, options?: any) => void;
saveFile: (win: Window, blobData: any, blobOptions: any, fileName: string) => void;
getApplicationVersion: () => string;
supportsU2f: (win: Window) => boolean;
supportsDuo: () => boolean;
showToast: (type: 'error' | 'success' | 'warning' | 'info', title: string, text: string | string[],
options?: any) => void;
showDialog: (text: string, title?: string, confirmText?: string, cancelText?: string,
type?: string) => Promise<boolean>;
eventTrack: (action: string, label?: string, options?: any) => void;
isDev: () => boolean;
isSelfHost: () => boolean;
copyToClipboard: (text: string, options?: any) => void;
}