Install plugins from sidebar
Summary: This diff adds "download" button to the plugins shown in "Detected in App" section, so they can be downloaded, installed and enabled just in one click. For now UI is very simple - there is no progress indication and no error handling for failed downloads. I'll add them in next diffs. Please note that we are explicitly "star" every installed plugin to enable it straight away without additional clicks in "disabled" section. Reviewed By: mweststrate Differential Revision: D25393472 fbshipit-source-id: 0a224ea6d03db0ee9a70b7fa35ede9616c03d824
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ab441d8226
commit
97d37abbb2
@@ -121,7 +121,10 @@ export type Action =
|
||||
| {
|
||||
// Implemented by rootReducer in `store.tsx`
|
||||
type: 'UPDATE_PLUGIN';
|
||||
payload: PluginDefinition;
|
||||
payload: {
|
||||
plugin: PluginDefinition;
|
||||
enablePlugin: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
const DEFAULT_PLUGIN = 'DeviceLogs';
|
||||
@@ -400,7 +403,10 @@ export const selectClient = (clientId: string | null): Action => ({
|
||||
payload: clientId,
|
||||
});
|
||||
|
||||
export const registerPluginUpdate = (payload: PluginDefinition): Action => ({
|
||||
export const registerPluginUpdate = (payload: {
|
||||
plugin: PluginDefinition;
|
||||
enablePlugin: boolean;
|
||||
}): Action => ({
|
||||
type: 'UPDATE_PLUGIN',
|
||||
payload,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user