Partial import processing

This commit is contained in:
2020-06-15 16:03:01 -05:00
parent f29ecf5d5d
commit 5e6431d630
8 changed files with 104 additions and 11 deletions

View File

@@ -1,5 +1,27 @@
import {createAction} from '@reduxjs/toolkit';
import {getIPCRenderer} from '../../utils';
import * as Constants from '../../constants';
import {notifyError} from './error_actions';
export const displaySkynetExport = createAction('skynet/displaySkynetExport');
export const displaySkynetImport = createAction('skynet/displaySkynetImport');
export const importSkylinks = (version, jsonArray) => {
return dispatch => {
const ipcRenderer = getIPCRenderer();
if (ipcRenderer) {
ipcRenderer.once(Constants.IPC_Import_Skylinks_Reply, (_, arg) => {
if (arg.data.Success) {
} else {
dispatch(notifyError(arg.data.Error));
}
});
ipcRenderer.send(Constants.IPC_Import_Skylinks, {
Version: version,
JsonArray: jsonArray,
});
}
};
};