@allow-large-files [flipper][deps] Upgrade Electron (#636)
Summary: allow-large-files Pull Request resolved: https://github.com/facebook/flipper/pull/636 per title Reviewed By: jknoxville Differential Revision: D18374332 fbshipit-source-id: f7300f527b65b65caebac51c5bcf8f019dc34228
This commit is contained in:
committed by
Facebook Github Bot
parent
0914deda2d
commit
a578b4d559
@@ -7,6 +7,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import electron from 'electron';
|
||||
import {FlexColumn, styled, Text, FlexRow, Input, colors, Glyph} from 'flipper';
|
||||
import React, {useState} from 'react';
|
||||
import {promises as fs} from 'fs';
|
||||
@@ -87,16 +88,18 @@ export function FilePathConfigField(props: {
|
||||
/>
|
||||
<FlexColumn
|
||||
onClick={() =>
|
||||
remote.dialog.showOpenDialog(
|
||||
{
|
||||
remote.dialog
|
||||
.showOpenDialog({
|
||||
properties: ['openDirectory', 'showHiddenFiles'],
|
||||
defaultPath: path.resolve('/'),
|
||||
},
|
||||
(paths: Array<string> | undefined) => {
|
||||
paths && setValue(paths[0]);
|
||||
paths && props.onChange(paths[0]);
|
||||
},
|
||||
)
|
||||
})
|
||||
.then((result: electron.SaveDialogReturnValue) => {
|
||||
if (result.filePath) {
|
||||
const path: string = result.filePath.toString();
|
||||
setValue(path);
|
||||
props.onChange(path);
|
||||
}
|
||||
})
|
||||
}>
|
||||
<CenteredGlyph name="dots-3-circle" variant="outline" />
|
||||
</FlexColumn>
|
||||
|
||||
Reference in New Issue
Block a user