Decouple open/save dialogs, reload, shouldUseDarkColors from Electron

Summary: Per title. Less imports from Electron.

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D31923504

fbshipit-source-id: dc7557cf7c88c0c8168ba22f7dca7b3e2d339a09
This commit is contained in:
Michel Weststrate
2021-10-26 12:06:18 -07:00
committed by Facebook GitHub Bot
parent d5e4b0c360
commit 9763af4c96
12 changed files with 106 additions and 103 deletions

View File

@@ -35,6 +35,19 @@ export interface FlipperLib {
DetailsSidebarImplementation?(
props: DetailSidebarProps,
): React.ReactElement | null;
showSaveDialog?(options: {
defaultPath?: string;
message?: string;
title?: string;
}): Promise<string | undefined>;
showOpenDialog?(options: {
defaultPath?: string;
filter?: {
extensions: string[];
name: string;
};
}): Promise<string | undefined>;
showSelectDirectoryDialog?(defaultPath?: string): Promise<string | undefined>;
}
export let flipperLibInstance: FlipperLib | undefined;