Back out "Back out Electron 7.1.1/7.1.2 upgrades"
Summary: Original commit changeset: 05d13aca7145 Attempt to upgrade `electron` as it instacrashed; `electron-builder` version 22.1.0 didn't sign package correctly and caused the instacrash, Reduced the version to 21.2.0 (latest). Reviewed By: passy, nikoant Differential Revision: D18954671 fbshipit-source-id: bc2dbd4fec9afb51d9a535974651b13d195407b4
This commit is contained in:
committed by
Facebook Github Bot
parent
2fac06e018
commit
bacb1958fc
@@ -724,8 +724,9 @@ export function showOpenDialog(store: Store) {
|
||||
properties: ['openFile'],
|
||||
filters: [{extensions: ['flipper', 'json', 'txt'], name: 'Flipper files'}],
|
||||
};
|
||||
remote.dialog.showOpenDialog(options, (filePaths?: Array<string>) => {
|
||||
if (filePaths !== undefined && filePaths.length > 0) {
|
||||
remote.dialog.showOpenDialog(options).then(result => {
|
||||
const filePaths = result.filePaths;
|
||||
if (filePaths.length > 0) {
|
||||
tryCatchReportPlatformFailures(() => {
|
||||
importFileToStore(filePaths[0], store);
|
||||
}, `${IMPORT_FLIPPER_TRACE_EVENT}:UI`);
|
||||
@@ -734,14 +735,17 @@ export function showOpenDialog(store: Store) {
|
||||
}
|
||||
|
||||
export function startFileExport(dispatch: Store['dispatch']) {
|
||||
electron.remote.dialog.showSaveDialog(
|
||||
// @ts-ignore This appears to work but isn't allowed by the types
|
||||
null,
|
||||
{
|
||||
title: 'FlipperExport',
|
||||
defaultPath: path.join(os.homedir(), 'FlipperExport.flipper'),
|
||||
},
|
||||
async (file: string) => {
|
||||
electron.remote.dialog
|
||||
.showSaveDialog(
|
||||
// @ts-ignore This appears to work but isn't allowed by the types
|
||||
null,
|
||||
{
|
||||
title: 'FlipperExport',
|
||||
defaultPath: path.join(os.homedir(), 'FlipperExport.flipper'),
|
||||
},
|
||||
)
|
||||
.then(async (result: electron.SaveDialogReturnValue) => {
|
||||
const file = result.filePath;
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
@@ -752,8 +756,7 @@ export function startFileExport(dispatch: Store['dispatch']) {
|
||||
closeOnFinish: false,
|
||||
}),
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function startLinkExport(dispatch: Store['dispatch']) {
|
||||
|
||||
Reference in New Issue
Block a user