Make getFlipperLib generally available, and use it to decouple opening links from Electron
Summary: This stack reduces our direct dependency on Electron, for example by exposing our own API to open links. Also exposing `getFlipperLib` as API from `flipper-plugin`, so that these utility methods are available outside plugin contexts as well. Reviewed By: timur-valiev Differential Revision: D29661689 fbshipit-source-id: 0c0523326eeb0d9d8fbe3e03c4609327bb53596b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2b236c6114
commit
5dbd3bd414
@@ -40,13 +40,13 @@ import {
|
||||
_LoggerContext,
|
||||
Layout,
|
||||
theme,
|
||||
getFlipperLib,
|
||||
} from 'flipper-plugin';
|
||||
import isProduction from './utils/isProduction';
|
||||
import {Button, Input, Result, Typography} from 'antd';
|
||||
import constants from './fb-stubs/constants';
|
||||
import styled from '@emotion/styled';
|
||||
import {CopyOutlined} from '@ant-design/icons';
|
||||
import {clipboard} from 'electron/common';
|
||||
import {getVersionString} from './utils/versionString';
|
||||
import {PersistGate} from 'redux-persist/integration/react';
|
||||
import {ipcRenderer} from 'electron';
|
||||
@@ -107,7 +107,7 @@ class AppFrame extends React.Component<
|
||||
key="copy_error"
|
||||
icon={<CopyOutlined />}
|
||||
onClick={() => {
|
||||
clipboard.writeText(this.getError());
|
||||
getFlipperLib().writeTextToClipboard(this.getError());
|
||||
}}>
|
||||
Copy error
|
||||
</Button>,
|
||||
|
||||
Reference in New Issue
Block a user