Change the export file extension type

Summary: This diff imports and exports data in a `.flipper` file extension. This diff also adds the support to open flipper app by double clicking on the `.flipper` file.

Reviewed By: danielbuechele

Differential Revision: D14042846

fbshipit-source-id: 17e6b55bf2796d9abdf985411fce799600f7792b
This commit is contained in:
Pritesh Nandgaonkar
2019-02-12 06:45:07 -08:00
committed by Facebook Github Bot
parent 73b816de16
commit 029377a849
7 changed files with 31 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ import {remote, ipcRenderer} from 'electron';
import type {Store} from '../reducers/index.js';
import type Logger from '../fb-stubs/Logger.js';
import {parseFlipperPorts} from '../utils/environmentVariables';
import {importFileToStore} from '../utils/exportData';
import {selectPlugin, userPreferredPlugin} from '../reducers/connections';
export const uriComponents = (url: string) => {
if (!url) {
@@ -55,6 +55,11 @@ export default (store: Store, logger: Logger) => {
);
}
});
ipcRenderer.on('open-flipper-file', (event, url) => {
importFileToStore(url, store);
});
ipcRenderer.on('flipper-deeplink-preferred-plugin', (event, url) => {
// flipper://<client>/<pluginId>/<payload>
const match = uriComponents(url);