2018-02-19 19:07:19 +01:00
|
|
|
import { DeviceType } from '../enums/deviceType';
|
2021-09-29 22:37:36 +02:00
|
|
|
import { ThemeType } from '../enums/themeType';
|
2018-01-06 21:47:23 +01:00
|
|
|
|
2018-01-25 20:26:09 +01:00
|
|
|
export abstract class PlatformUtilsService {
|
2018-03-21 16:19:05 +01:00
|
|
|
identityClientId: string;
|
2018-01-25 20:26:09 +01:00
|
|
|
getDevice: () => DeviceType;
|
|
|
|
getDeviceString: () => string;
|
|
|
|
isFirefox: () => boolean;
|
|
|
|
isChrome: () => boolean;
|
|
|
|
isEdge: () => boolean;
|
|
|
|
isOpera: () => boolean;
|
|
|
|
isVivaldi: () => boolean;
|
|
|
|
isSafari: () => boolean;
|
2018-06-08 05:36:39 +02:00
|
|
|
isIE: () => boolean;
|
2018-02-27 05:32:06 +01:00
|
|
|
isMacAppStore: () => boolean;
|
2019-08-20 19:47:15 +02:00
|
|
|
isViewOpen: () => Promise<boolean>;
|
2018-01-25 20:32:10 +01:00
|
|
|
launchUri: (uri: string, options?: any) => void;
|
2018-01-25 20:26:09 +01:00
|
|
|
saveFile: (win: Window, blobData: any, blobOptions: any, fileName: string) => void;
|
2021-04-07 19:42:06 +02:00
|
|
|
getApplicationVersion: () => Promise<string>;
|
2021-03-15 16:16:51 +01:00
|
|
|
supportsWebAuthn: (win: Window) => boolean;
|
2018-05-16 21:30:28 +02:00
|
|
|
supportsDuo: () => boolean;
|
2018-10-03 05:09:19 +02:00
|
|
|
showToast: (type: 'error' | 'success' | 'warning' | 'info', title: string, text: string | string[],
|
|
|
|
options?: any) => void;
|
2021-03-04 17:15:51 +01:00
|
|
|
showDialog: (body: string, title?: string, confirmText?: string, cancelText?: string,
|
|
|
|
type?: string, bodyIsHtml?: boolean) => Promise<boolean>;
|
2018-02-13 23:23:45 +01:00
|
|
|
isDev: () => boolean;
|
2018-06-30 19:51:09 +02:00
|
|
|
isSelfHost: () => boolean;
|
2021-05-11 22:39:31 +02:00
|
|
|
copyToClipboard: (text: string, options?: any) => void | boolean;
|
2019-02-27 04:35:53 +01:00
|
|
|
readFromClipboard: (options?: any) => Promise<string>;
|
2020-07-23 19:32:20 +02:00
|
|
|
supportsBiometric: () => Promise<boolean>;
|
|
|
|
authenticateBiometric: () => Promise<boolean>;
|
2021-09-29 22:37:36 +02:00
|
|
|
getDefaultSystemTheme: () => Promise<ThemeType.Light | ThemeType.Dark>;
|
|
|
|
onDefaultSystemThemeChange: (callback: ((theme: ThemeType.Light | ThemeType.Dark) => unknown)) => unknown;
|
|
|
|
getEffectiveTheme: () => Promise<ThemeType>;
|
2020-11-18 22:10:57 +01:00
|
|
|
supportsSecureStorage: () => boolean;
|
2018-01-06 21:47:23 +01:00
|
|
|
}
|