Gate Export Flipper data feature
Summary: This diff gates the flipper export feature behind a gk Reviewed By: danielbuechele Differential Revision: D13860474 fbshipit-source-id: b7eda655418ccfd03b7bac42f0f741864164ea29
This commit is contained in:
committed by
Facebook Github Bot
parent
cbd70f573c
commit
8957b55eda
@@ -9,6 +9,7 @@ import type {FlipperPlugin, FlipperDevicePlugin} from './plugin.js';
|
||||
import {exportStoreToFile} from './utils/exportData.js';
|
||||
import type {Store} from './reducers/';
|
||||
import electron from 'electron';
|
||||
import {GK} from 'flipper';
|
||||
|
||||
export type DefaultKeyboardAction = 'clear' | 'goToBottom' | 'createPaste';
|
||||
export type TopLevelMenu = 'Edit' | 'View' | 'Window' | 'Help';
|
||||
@@ -180,18 +181,6 @@ function getTemplate(
|
||||
store: Store,
|
||||
): Array<MenuItem> {
|
||||
const template = [
|
||||
{
|
||||
label: 'File',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Export Data',
|
||||
role: 'export',
|
||||
click: function(item: Object, focusedWindow: Object) {
|
||||
exportStoreToFile(store);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
@@ -320,7 +309,21 @@ function getTemplate(
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
if (GK.get('flipper_import_export')) {
|
||||
console.log('flipper_import_export is true');
|
||||
template.unshift({
|
||||
label: 'File',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Export Data',
|
||||
role: 'export',
|
||||
click: function(item: Object, focusedWindow: Object) {
|
||||
exportStoreToFile(store);
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
if (process.platform === 'darwin') {
|
||||
const name = app.getName();
|
||||
template.unshift({
|
||||
|
||||
Reference in New Issue
Block a user