Make File > Open more self-explanatory

Summary:
Yesterday I saw someone try to open the xcode executable with the File > Open function.

This made me realise it's not clear what this is for, and you might think it can open all kinds of things.

Reviewed By: danielbuechele

Differential Revision: D17225496

fbshipit-source-id: 893360a1f450a8db25be34fce6c288e8db8f9626
This commit is contained in:
John Knox
2019-09-06 04:12:58 -07:00
committed by Facebook Github Bot
parent 98b4071242
commit b4c1d1942a
2 changed files with 4 additions and 1 deletions

View File

@@ -209,7 +209,7 @@ function getTemplate(
label: 'File',
submenu: [
{
label: 'Open File...',
label: 'Import Flipper File...',
accelerator: 'CommandOrControl+O',
click: function() {
showOpenDialog(store);

View File

@@ -521,6 +521,9 @@ export function showOpenDialog(store: Store) {
remote.dialog.showOpenDialog(
{
properties: ['openFile'],
filters: [
{extensions: ['flipper', 'json', 'txt'], name: 'Flipper files'},
],
},
(files: Array<string>) => {
if (files !== undefined && files.length > 0) {