Prettier support
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import {getIPCRenderer} from '../../utils';
|
||||
import { getIPCRenderer } from '../../utils.jsx';
|
||||
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
let yesNoResolvers = [];
|
||||
|
||||
export const confirmYesNo = title => {
|
||||
return dispatch => {
|
||||
return new Promise(resolve => {
|
||||
export const confirmYesNo = (title) => {
|
||||
return (dispatch) => {
|
||||
return new Promise((resolve) => {
|
||||
dispatch(handleConfirmYesNo(true, title, resolve));
|
||||
});
|
||||
};
|
||||
@@ -17,15 +18,12 @@ export const DISPLAY_CONFIRM_YES_NO = 'common/displayConfirmYesNo';
|
||||
const displayConfirmYesNo = (show, title) => {
|
||||
return {
|
||||
type: DISPLAY_CONFIRM_YES_NO,
|
||||
payload: {
|
||||
show,
|
||||
title
|
||||
},
|
||||
payload: { show, title },
|
||||
};
|
||||
};
|
||||
|
||||
export const displaySelectAppPlatform = display => {
|
||||
return dispatch => {
|
||||
export const displaySelectAppPlatform = (display) => {
|
||||
return (dispatch) => {
|
||||
if (display) {
|
||||
dispatch(showWindow());
|
||||
}
|
||||
@@ -34,14 +32,14 @@ export const displaySelectAppPlatform = display => {
|
||||
};
|
||||
};
|
||||
|
||||
export const hideConfirmYesNo = confirmed => {
|
||||
return dispatch => {
|
||||
export const hideConfirmYesNo = (confirmed) => {
|
||||
return (dispatch) => {
|
||||
dispatch(handleConfirmYesNo(false, confirmed));
|
||||
};
|
||||
};
|
||||
|
||||
const handleConfirmYesNo = (show, titleOrConfirmed, resolve) => {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
if (show) {
|
||||
yesNoResolvers.push(resolve);
|
||||
dispatch(displayConfirmYesNo(show, titleOrConfirmed));
|
||||
@@ -57,26 +55,23 @@ export const NOTIFY_APPLICATION_BUSY = 'common/notifyApplicationBusy';
|
||||
export const notifyApplicationBusy = (busy, transparent) => {
|
||||
return {
|
||||
type: NOTIFY_APPLICATION_BUSY,
|
||||
payload: {
|
||||
busy,
|
||||
transparent
|
||||
},
|
||||
payload: { busy, transparent },
|
||||
};
|
||||
};
|
||||
|
||||
export const notifyRebootRequired = createAction('common/notifyRebootRequired');
|
||||
|
||||
export const rebootSystem = () => {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(setApplicationReady(false));
|
||||
if (ipcRenderer) {
|
||||
ipcRenderer.send(Constants.IPC_Reboot_System);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export const saveState = () => {
|
||||
return (dispatch, getState) => {
|
||||
return (_, getState) => {
|
||||
const state = getState();
|
||||
if (state.common.AppReady) {
|
||||
let currentState = {
|
||||
@@ -94,9 +89,7 @@ export const saveState = () => {
|
||||
}
|
||||
|
||||
if (ipcRenderer) {
|
||||
ipcRenderer.send(Constants.IPC_Save_State, {
|
||||
State: currentState
|
||||
});
|
||||
ipcRenderer.send(Constants.IPC_Save_State, { State: currentState });
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -106,7 +99,7 @@ export const setAllowMount = createAction('common/setAllowMount');
|
||||
export const setApplicationReady = createAction('common/setApplicationReady');
|
||||
|
||||
export const SET_DISPLAY_SELECT_APPPLATFORM = 'common/displaySelectAppPlatform';
|
||||
export const setDisplaySelectAppPlatform = display => {
|
||||
export const setDisplaySelectAppPlatform = (display) => {
|
||||
return {
|
||||
type: SET_DISPLAY_SELECT_APPPLATFORM,
|
||||
payload: display,
|
||||
@@ -116,14 +109,14 @@ export const setDisplaySelectAppPlatform = display => {
|
||||
export const setLinuxAppPlatform = createAction('common/setLinuxAppPlatform');
|
||||
|
||||
export const setRebootRequired = () => {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(showWindow());
|
||||
dispatch(notifyRebootRequired(true));
|
||||
};
|
||||
};
|
||||
|
||||
export const showWindow = () => {
|
||||
return dispatch => {
|
||||
return (_) => {
|
||||
if (ipcRenderer) {
|
||||
ipcRenderer.send(Constants.IPC_Show_Window);
|
||||
}
|
||||
@@ -131,7 +124,7 @@ export const showWindow = () => {
|
||||
};
|
||||
|
||||
export const shutdownApplication = () => {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(setApplicationReady(false));
|
||||
if (ipcRenderer) {
|
||||
ipcRenderer.send(Constants.IPC_Shutdown);
|
||||
|
||||
@@ -1,58 +1,76 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import {getIPCRenderer} from '../../utils';
|
||||
import {notifyError} from './error_actions';
|
||||
import { getIPCRenderer } from '../../utils.jsx';
|
||||
|
||||
import { notifyError } from './error_actions';
|
||||
import {
|
||||
installAndTestRelease,
|
||||
installDependency,
|
||||
installRelease,
|
||||
installUpgrade
|
||||
installUpgrade,
|
||||
} from './install_actions';
|
||||
|
||||
export const setAllowDownload = createAction('download/setAllowDownload');
|
||||
|
||||
export const SET_DOWNLOAD_BEGIN = 'download/setDownloadBegin';
|
||||
export const setDownloadBegin = (name, type, url) => {
|
||||
return {
|
||||
type: SET_DOWNLOAD_BEGIN,
|
||||
payload: {
|
||||
name,
|
||||
type,
|
||||
url
|
||||
}
|
||||
};
|
||||
return { type: SET_DOWNLOAD_BEGIN, payload: { name, type, url } };
|
||||
};
|
||||
|
||||
export const setDownloadEnd = createAction('download/setDownloadEnd');
|
||||
export const setDownloadProgress = createAction('download/setDownloadProgress');
|
||||
|
||||
export const downloadItem = (name, type, urls, isWinFSP, testVersion, appPlatform) => {
|
||||
export const downloadItem = (
|
||||
name,
|
||||
type,
|
||||
urls,
|
||||
isWinFSP,
|
||||
testVersion,
|
||||
appPlatform
|
||||
) => {
|
||||
return (dispatch, getState) => {
|
||||
if (!Array.isArray(urls)) {
|
||||
urls = [urls];
|
||||
}
|
||||
|
||||
const downloadComplete = result => {
|
||||
const downloadComplete = (result) => {
|
||||
if (result.Success) {
|
||||
switch (type) {
|
||||
case Constants.INSTALL_TYPES.Dependency:
|
||||
dispatch(installDependency(result.Destination, result.URL, isWinFSP));
|
||||
break;
|
||||
case Constants.INSTALL_TYPES.Release:
|
||||
dispatch(installRelease(result.Destination));
|
||||
break;
|
||||
case Constants.INSTALL_TYPES.TestRelease:
|
||||
dispatch(installAndTestRelease(result.Destination, testVersion, appPlatform));
|
||||
break;
|
||||
case Constants.INSTALL_TYPES.Upgrade:
|
||||
//const info = this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]];
|
||||
const sha256 = null;//info.sha256;
|
||||
const signature = null;//info.sig;
|
||||
dispatch(installUpgrade(result.Destination, sha256, signature, !!result.SkipVerification));
|
||||
break;
|
||||
default:
|
||||
dispatch(notifyError('Unknown download type: ' + type));
|
||||
break;
|
||||
case Constants.INSTALL_TYPES.Dependency:
|
||||
dispatch(
|
||||
installDependency(result.Destination, result.URL, isWinFSP)
|
||||
);
|
||||
break;
|
||||
case Constants.INSTALL_TYPES.Release:
|
||||
dispatch(installRelease(result.Destination));
|
||||
break;
|
||||
case Constants.INSTALL_TYPES.TestRelease:
|
||||
dispatch(
|
||||
installAndTestRelease(
|
||||
result.Destination,
|
||||
testVersion,
|
||||
appPlatform
|
||||
)
|
||||
);
|
||||
break;
|
||||
case Constants.INSTALL_TYPES.Upgrade:
|
||||
// const info =
|
||||
// this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]];
|
||||
const sha256 = null; // info.sha256;
|
||||
const signature = null; // info.sig;
|
||||
dispatch(
|
||||
installUpgrade(
|
||||
result.Destination,
|
||||
sha256,
|
||||
signature,
|
||||
!!result.SkipVerification
|
||||
)
|
||||
);
|
||||
break;
|
||||
default:
|
||||
dispatch(notifyError('Unknown download type: ' + type));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (type === Constants.INSTALL_TYPES.TestRelease) {
|
||||
@@ -62,10 +80,13 @@ export const downloadItem = (name, type, urls, isWinFSP, testVersion, appPlatfor
|
||||
}
|
||||
};
|
||||
|
||||
const downloadAtIndex = index => {
|
||||
const downloadAtIndex = (index) => {
|
||||
const url = urls[index];
|
||||
const state = getState();
|
||||
if ((index > 0) || (!state.download.DownloadActive && state.download.AllowDownload)) {
|
||||
if (
|
||||
index > 0 ||
|
||||
(!state.download.DownloadActive && state.download.AllowDownload)
|
||||
) {
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
if (ipcRenderer) {
|
||||
dispatch(setDownloadBegin(name, type, url));
|
||||
@@ -75,8 +96,11 @@ export const downloadItem = (name, type, urls, isWinFSP, testVersion, appPlatfor
|
||||
};
|
||||
|
||||
const downloadFileComplete = (_, arg) => {
|
||||
ipcRenderer.removeListener(Constants.IPC_Download_File_Progress, downloadFileProgress);
|
||||
if (!arg.data.Success && (++index < urls.length)) {
|
||||
ipcRenderer.removeListener(
|
||||
Constants.IPC_Download_File_Progress,
|
||||
downloadFileProgress
|
||||
);
|
||||
if (!arg.data.Success && ++index < urls.length) {
|
||||
downloadAtIndex(index);
|
||||
} else {
|
||||
downloadComplete(arg.data);
|
||||
@@ -84,8 +108,14 @@ export const downloadItem = (name, type, urls, isWinFSP, testVersion, appPlatfor
|
||||
}
|
||||
};
|
||||
|
||||
ipcRenderer.on(Constants.IPC_Download_File_Progress, downloadFileProgress);
|
||||
ipcRenderer.once(Constants.IPC_Download_File_Complete, downloadFileComplete);
|
||||
ipcRenderer.on(
|
||||
Constants.IPC_Download_File_Progress,
|
||||
downloadFileProgress
|
||||
);
|
||||
ipcRenderer.once(
|
||||
Constants.IPC_Download_File_Complete,
|
||||
downloadFileComplete
|
||||
);
|
||||
|
||||
ipcRenderer.send(Constants.IPC_Download_File, {
|
||||
Filename: name,
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
showWindow,
|
||||
shutdownApplication
|
||||
} from './common_actions';
|
||||
import { showWindow, shutdownApplication } from './common_actions';
|
||||
|
||||
let ErrorActions = [];
|
||||
|
||||
@@ -36,13 +33,13 @@ export const dismissError = () => {
|
||||
};
|
||||
|
||||
export const dismissInfo = () => {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(clearInfo());
|
||||
};
|
||||
};
|
||||
|
||||
export const notifyError = (msg, critical, callback) => {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
ErrorActions = [callback, ...ErrorActions];
|
||||
msg = msg ? msg.toString() : 'Unknown Error';
|
||||
dispatch(setErrorInfo(msg, critical));
|
||||
@@ -51,7 +48,7 @@ export const notifyError = (msg, critical, callback) => {
|
||||
};
|
||||
|
||||
export const notifyInfo = (title, msg) => {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
title = title ? title.toString() : 'Information';
|
||||
msg = msg ? msg.toString() : '';
|
||||
dispatch(setInfo(title, msg));
|
||||
@@ -60,23 +57,10 @@ export const notifyInfo = (title, msg) => {
|
||||
|
||||
export const SET_ERROR_INFO = 'error/setErrorInfo';
|
||||
export const setErrorInfo = (msg, critical) => {
|
||||
return {
|
||||
type: SET_ERROR_INFO,
|
||||
payload: {
|
||||
msg,
|
||||
critical
|
||||
}
|
||||
}
|
||||
return { type: SET_ERROR_INFO, payload: { msg, critical } };
|
||||
};
|
||||
|
||||
|
||||
export const SET_INFO = 'error/setInfo';
|
||||
export const setInfo = (title, msg) => {
|
||||
return {
|
||||
type: SET_INFO,
|
||||
payload: {
|
||||
title,
|
||||
msg
|
||||
}
|
||||
}
|
||||
};
|
||||
return { type: SET_INFO, payload: { title, msg } };
|
||||
};
|
||||
|
||||
@@ -1,18 +1,8 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import {
|
||||
getIPCRenderer,
|
||||
getSelectedVersionFromState
|
||||
} from '../../utils';
|
||||
import {notifyError} from './error_actions';
|
||||
import {downloadItem, setAllowDownload} from './download_actions';
|
||||
import {
|
||||
loadReleases,
|
||||
setActiveRelease,
|
||||
setInstalledVersion,
|
||||
setReleaseUpgradeAvailable,
|
||||
setNewReleasesAvailable2,
|
||||
} from './release_version_actions';
|
||||
import { getIPCRenderer, getSelectedVersionFromState } from '../../utils.jsx';
|
||||
|
||||
import {
|
||||
confirmYesNo,
|
||||
displaySelectAppPlatform,
|
||||
@@ -21,18 +11,28 @@ import {
|
||||
setLinuxAppPlatform,
|
||||
setRebootRequired,
|
||||
showWindow,
|
||||
shutdownApplication
|
||||
shutdownApplication,
|
||||
} from './common_actions';
|
||||
import {unmountAll} from './mount_actions';
|
||||
import { downloadItem, setAllowDownload } from './download_actions';
|
||||
import { notifyError } from './error_actions';
|
||||
import { unmountAll } from './mount_actions';
|
||||
import {
|
||||
loadReleases,
|
||||
setActiveRelease,
|
||||
setInstalledVersion,
|
||||
setNewReleasesAvailable2,
|
||||
setReleaseUpgradeAvailable,
|
||||
} from './release_version_actions';
|
||||
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
|
||||
export const checkInstalled = (dependencies, version) => {
|
||||
return (dispatch, getState) => {
|
||||
const checkInstalledComplete = (event, arg) => {
|
||||
const checkInstalledComplete = (_, arg) => {
|
||||
const result = arg.data;
|
||||
const updateState = () => {
|
||||
const installedVersion = result.Success && result.Exists ? result.Version : 'none';
|
||||
const installedVersion =
|
||||
result.Success && result.Exists ? result.Version : 'none';
|
||||
const state = getState();
|
||||
|
||||
const release = state.relver.Release;
|
||||
@@ -40,7 +40,9 @@ export const checkInstalled = (dependencies, version) => {
|
||||
|
||||
let upgradeAvailable = false;
|
||||
if (installedVersion !== 'none') {
|
||||
const latestVersion = state.relver.VersionLookup[Constants.RELEASE_TYPES[release]].length - 1;
|
||||
const latestVersion =
|
||||
state.relver.VersionLookup[Constants.RELEASE_TYPES[release]]
|
||||
.length - 1;
|
||||
if (version === -1) {
|
||||
version = latestVersion;
|
||||
dispatch(setActiveRelease(release, version));
|
||||
@@ -57,14 +59,18 @@ export const checkInstalled = (dependencies, version) => {
|
||||
const autoInstallRelease = getState().install.AutoInstallRelease;
|
||||
dispatch(setAutoInstallRelease(false));
|
||||
|
||||
if (result.Dependencies && (result.Dependencies.length > 0)) {
|
||||
if (result.Dependencies && result.Dependencies.length > 0) {
|
||||
dispatch(showWindow());
|
||||
} else if ((installedVersion === 'none') && autoInstallRelease) {
|
||||
} else if (installedVersion === 'none' && autoInstallRelease) {
|
||||
dispatch(setAllowMount(false));
|
||||
const versionString = getState().relver.VersionLookup[Constants.RELEASE_TYPES[release]][version];
|
||||
const versionString = getState().relver.VersionLookup[
|
||||
Constants.RELEASE_TYPES[release]
|
||||
][version];
|
||||
const urls = getState().relver.LocationsLookup[versionString].urls;
|
||||
const fileName = versionString + '.zip';
|
||||
dispatch(downloadItem(fileName, Constants.INSTALL_TYPES.Release, urls));
|
||||
dispatch(
|
||||
downloadItem(fileName, Constants.INSTALL_TYPES.Release, urls)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -75,7 +81,10 @@ export const checkInstalled = (dependencies, version) => {
|
||||
}
|
||||
};
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Check_Installed_Reply, checkInstalledComplete);
|
||||
ipcRenderer.once(
|
||||
Constants.IPC_Check_Installed_Reply,
|
||||
checkInstalledComplete
|
||||
);
|
||||
ipcRenderer.send(Constants.IPC_Check_Installed, {
|
||||
Dependencies: dependencies,
|
||||
Version: version,
|
||||
@@ -89,10 +98,14 @@ export const checkVersionInstalled = () => {
|
||||
|
||||
dispatch(setAllowDownload(false));
|
||||
const selectedVersion = getSelectedVersionFromState(state);
|
||||
if (selectedVersion && (selectedVersion !== 'unavailable')) {
|
||||
if (selectedVersion && selectedVersion !== 'unavailable') {
|
||||
let dependencies = [];
|
||||
if (state.relver.LocationsLookup[selectedVersion] && state.relver.LocationsLookup[selectedVersion].dependencies) {
|
||||
dependencies = state.relver.LocationsLookup[selectedVersion].dependencies;
|
||||
if (
|
||||
state.relver.LocationsLookup[selectedVersion] &&
|
||||
state.relver.LocationsLookup[selectedVersion].dependencies
|
||||
) {
|
||||
dependencies =
|
||||
state.relver.LocationsLookup[selectedVersion].dependencies;
|
||||
}
|
||||
dispatch(checkInstalled(dependencies, selectedVersion));
|
||||
} else {
|
||||
@@ -107,9 +120,9 @@ export const installDependency = (source, url, isWinFSP) => {
|
||||
if (ipcRenderer && !getState().install.InstallActive) {
|
||||
dispatch(setInstallActive(Constants.INSTALL_TYPES.Dependency));
|
||||
|
||||
const installDependencyComplete = (event, arg) => {
|
||||
const installDependencyComplete = (_, arg) => {
|
||||
const result = arg.data;
|
||||
const handleCompleted = ()=> {
|
||||
const handleCompleted = () => {
|
||||
if (result.RebootRequired) {
|
||||
dispatch(setRebootRequired());
|
||||
} else {
|
||||
@@ -122,13 +135,16 @@ export const installDependency = (source, url, isWinFSP) => {
|
||||
};
|
||||
|
||||
if (result.Success && source.toLowerCase().endsWith('.dmg')) {
|
||||
const dep = getState().install.MissingDependencies.find(d => {
|
||||
const dep = getState().install.MissingDependencies.find((d) => {
|
||||
return d.download === url;
|
||||
});
|
||||
const i = setInterval(()=> {
|
||||
const ret = ipcRenderer.sendSync(Constants.IPC_Check_Dependency_Installed + '_sync', {
|
||||
File: dep.file,
|
||||
});
|
||||
const i = setInterval(() => {
|
||||
const ret = ipcRenderer.sendSync(
|
||||
Constants.IPC_Check_Dependency_Installed + '_sync',
|
||||
{
|
||||
File: dep.file,
|
||||
}
|
||||
);
|
||||
|
||||
if (ret.data.Exists) {
|
||||
clearInterval(i);
|
||||
@@ -142,7 +158,10 @@ export const installDependency = (source, url, isWinFSP) => {
|
||||
}
|
||||
};
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Install_Dependency_Reply, installDependencyComplete);
|
||||
ipcRenderer.once(
|
||||
Constants.IPC_Install_Dependency_Reply,
|
||||
installDependencyComplete
|
||||
);
|
||||
ipcRenderer.send(Constants.IPC_Install_Dependency, {
|
||||
Source: source,
|
||||
URL: url,
|
||||
@@ -160,7 +179,7 @@ export const installAndTestRelease = (source, version, appPlatform) => {
|
||||
FilePath: source,
|
||||
});
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Test_Release_Reply, (event, arg) => {
|
||||
ipcRenderer.once(Constants.IPC_Test_Release_Reply, (_, arg) => {
|
||||
if (arg.data.Success) {
|
||||
ipcRenderer.sendSync(Constants.IPC_Set_Linux_AppPlatform, {
|
||||
AppPlatform: appPlatform,
|
||||
@@ -177,10 +196,13 @@ export const installAndTestRelease = (source, version, appPlatform) => {
|
||||
});
|
||||
ipcRenderer.send(Constants.IPC_Test_Release, {
|
||||
Version: version,
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Extract_Release_Complete, extractReleaseComplete);
|
||||
ipcRenderer.once(
|
||||
Constants.IPC_Extract_Release_Complete,
|
||||
extractReleaseComplete
|
||||
);
|
||||
ipcRenderer.send(Constants.IPC_Extract_Release, {
|
||||
Source: source,
|
||||
Version: version,
|
||||
@@ -192,7 +214,10 @@ export const installAndTestRelease = (source, version, appPlatform) => {
|
||||
export const installReleaseByVersion = (release, version) => {
|
||||
return (dispatch, getState) => {
|
||||
const install = () => {
|
||||
if (getState().download.AllowDownload && !getState().download.DownloadActive) {
|
||||
if (
|
||||
getState().download.AllowDownload &&
|
||||
!getState().download.DownloadActive
|
||||
) {
|
||||
dispatch(setAutoInstallRelease(true));
|
||||
dispatch(setActiveRelease(release, version));
|
||||
} else {
|
||||
@@ -202,31 +227,34 @@ export const installReleaseByVersion = (release, version) => {
|
||||
|
||||
if (getState().mounts.MountsBusy) {
|
||||
dispatch(confirmYesNo('Unmount all drives?'))
|
||||
.then(confirmed => {
|
||||
.then((confirmed) => {
|
||||
if (confirmed) {
|
||||
dispatch(unmountAll(install));
|
||||
}
|
||||
})
|
||||
.catch(error => notifyError(error));
|
||||
.catch((error) => notifyError(error));
|
||||
} else {
|
||||
install();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export const installRelease = source => {
|
||||
export const installRelease = (source) => {
|
||||
return (dispatch, getState) => {
|
||||
if (ipcRenderer && !getState().install.InstallActive) {
|
||||
dispatch(setInstallActive(Constants.INSTALL_TYPES.Release));
|
||||
|
||||
const version = getSelectedVersionFromState(getState());
|
||||
const extractReleaseComplete = (event, arg) => {
|
||||
const extractReleaseComplete = (_, arg) => {
|
||||
ipcRenderer.send(Constants.IPC_Delete_File, {
|
||||
FilePath: source,
|
||||
});
|
||||
|
||||
if (arg.data.Success) {
|
||||
localStorage.setItem('previous_releases', localStorage.getItem('releases'));
|
||||
localStorage.setItem(
|
||||
'previous_releases',
|
||||
localStorage.getItem('releases')
|
||||
);
|
||||
dispatch(setNewReleasesAvailable2([]));
|
||||
}
|
||||
|
||||
@@ -234,7 +262,10 @@ export const installRelease = source => {
|
||||
dispatch(checkVersionInstalled());
|
||||
};
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Extract_Release_Complete, extractReleaseComplete);
|
||||
ipcRenderer.once(
|
||||
Constants.IPC_Extract_Release_Complete,
|
||||
extractReleaseComplete
|
||||
);
|
||||
ipcRenderer.send(Constants.IPC_Extract_Release, {
|
||||
Source: source,
|
||||
Version: version,
|
||||
@@ -249,23 +280,33 @@ export const installUpgrade = (source, sha256, signature, skipVerification) => {
|
||||
dispatch(setInstallActive(Constants.INSTALL_TYPES.Upgrade));
|
||||
dispatch(setApplicationReady(false));
|
||||
|
||||
const installUpgradeComplete = (event, arg) => {
|
||||
const installUpgradeComplete = (_, arg) => {
|
||||
const result = arg.data;
|
||||
if (result.Success) {
|
||||
dispatch(shutdownApplication());
|
||||
} else {
|
||||
dispatch(setApplicationReady(true));
|
||||
dispatch(setInstallComplete(result));
|
||||
dispatch(notifyError(result.Error, false, () => {
|
||||
// TODO Prompt to verify
|
||||
if (result.AllowSkipVerification) {
|
||||
dispatch(installUpgrade(source, sha256, signature, true));
|
||||
}
|
||||
}, false));
|
||||
dispatch(
|
||||
notifyError(
|
||||
result.Error,
|
||||
false,
|
||||
() => {
|
||||
// TODO Prompt to verify
|
||||
if (result.AllowSkipVerification) {
|
||||
dispatch(installUpgrade(source, sha256, signature, true));
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Install_Upgrade_Reply, installUpgradeComplete);
|
||||
ipcRenderer.once(
|
||||
Constants.IPC_Install_Upgrade_Reply,
|
||||
installUpgradeComplete
|
||||
);
|
||||
ipcRenderer.send(Constants.IPC_Install_Upgrade, {
|
||||
Sha256: sha256,
|
||||
Signature: signature,
|
||||
@@ -276,9 +317,17 @@ export const installUpgrade = (source, sha256, signature, skipVerification) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const setAutoInstallRelease = createAction('install/setAutoInstallRelease');
|
||||
export const setDismissDependencies = createAction('install/setDismissDependencies');
|
||||
export const setAutoInstallRelease = createAction(
|
||||
'install/setAutoInstallRelease'
|
||||
);
|
||||
export const setDismissDependencies = createAction(
|
||||
'install/setDismissDependencies'
|
||||
);
|
||||
export const setInstallActive = createAction('install/setInstallActive');
|
||||
export const setInstallTestActive = createAction('install/setInstallTestActive');
|
||||
export const setInstallTestActive = createAction(
|
||||
'install/setInstallTestActive'
|
||||
);
|
||||
export const setInstallComplete = createAction('install/setInstallComplete');
|
||||
export const setMissingDependencies = createAction('install/setMissingDependencies');
|
||||
export const setMissingDependencies = createAction(
|
||||
'install/setMissingDependencies'
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import {getIPCRenderer} from '../../utils';
|
||||
import {getIPCRenderer} from '../../utils.jsx';
|
||||
|
||||
import {confirmYesNo, saveState} from './common_actions';
|
||||
import {notifyError} from './error_actions';
|
||||
@@ -23,8 +23,10 @@ export const addRemoteMount = (hostNameOrIp, port, token) => {
|
||||
Version: getState().relver.InstalledVersion,
|
||||
});
|
||||
} else {
|
||||
dispatch(
|
||||
notifyError('Failed to set \'RemoteToken\': ' + arg.data.Error));
|
||||
dispatch(noti
|
||||
'Failed to set \'RemoteToken\': '
|
||||
oken
|
||||
': " + arg.data.Error));
|
||||
dispatch(setBusy(false));
|
||||
}
|
||||
});
|
||||
@@ -43,7 +45,14 @@ export const addRemoteMount = (hostNameOrIp, port, token) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const addS3Mount = (name, accessKey, secretKey, region, bucketName, url) => {
|
||||
export const addS3Mount = (
|
||||
name,
|
||||
accessKey,
|
||||
secretKey,
|
||||
region,
|
||||
bucketName,
|
||||
url
|
||||
) => {
|
||||
return (dispatch, getState) => {
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
const provider = 'S3' + name;
|
||||
@@ -60,7 +69,8 @@ export const addS3Mount = (name, accessKey, secretKey, region, bucketName, url)
|
||||
});
|
||||
} else {
|
||||
dispatch(
|
||||
notifyError('Failed to create S3 instance: ' + arg.data.Error));
|
||||
notifyError('Failed to create S3 instance: ' + arg.data.Error)
|
||||
);
|
||||
dispatch(setBusy(false));
|
||||
}
|
||||
});
|
||||
@@ -95,11 +105,12 @@ export const displayConfiguration = (provider, remote, s3) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const removeMount = provider => {
|
||||
return dispatch => {
|
||||
export const removeMount = (provider) => {
|
||||
return (dispatch) => {
|
||||
const isRemote = provider.startsWith('Remote');
|
||||
dispatch(confirmYesNo('Delete [' + provider.substr(isRemote ? 6 : 2) + ']?'))
|
||||
.then(confirmed => {
|
||||
dispatch(
|
||||
confirmYesNo('Delete [' + provider.substr(isRemote ? 6 : 2) + ']?')
|
||||
).then((confirmed) => {
|
||||
if (confirmed) {
|
||||
dispatch(removeMount2(provider));
|
||||
}
|
||||
@@ -107,8 +118,8 @@ export const removeMount = provider => {
|
||||
};
|
||||
};
|
||||
|
||||
const removeMount2 = provider => {
|
||||
return dispatch => {
|
||||
const removeMount2 = (provider) => {
|
||||
return (dispatch) => {
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
ipcRenderer.once(Constants.IPC_Remove_Mount_Reply, (_, arg) => {
|
||||
if (arg.data.Success) {
|
||||
@@ -119,7 +130,7 @@ const removeMount2 = provider => {
|
||||
const isRemote = provider.startsWith('Remote');
|
||||
ipcRenderer.send(Constants.IPC_Remove_Mount, {
|
||||
Remote: isRemote,
|
||||
Name: provider.substr(isRemote ? 6 : 2)
|
||||
Name: provider.substr(isRemote ? 6 : 2),
|
||||
});
|
||||
};
|
||||
};
|
||||
@@ -128,15 +139,13 @@ export const removeMount3 = createAction('mounts/removeMount3');
|
||||
|
||||
export const RESET_MOUNTS_STATE = 'mounts/resetMountsState';
|
||||
export const resetMountsState = () => {
|
||||
return {type: RESET_MOUNTS_STATE, payload: null,}
|
||||
return {type: RESET_MOUNTS_STATE, payload: null};
|
||||
};
|
||||
|
||||
export const SET_ALLOW_MOUNT = 'mounts/setAllowMount';
|
||||
export const setAllowMount =
|
||||
(provider,
|
||||
allow) => {
|
||||
return {type: SET_ALLOW_MOUNT, payload: {provider, allow}};
|
||||
};
|
||||
export const setAllowMount = (provider, allow) => {
|
||||
return {type: SET_ALLOW_MOUNT, payload: {provider, allow}};
|
||||
};
|
||||
|
||||
export const SET_AUTO_MOUNT_PROCESSED = 'mounts/setAutoMountProcessed';
|
||||
export const setAutoMountProcessed = (provider, processed) => {
|
||||
@@ -146,26 +155,22 @@ export const setAutoMountProcessed = (provider, processed) => {
|
||||
export const setBusy = createAction('mounts/setBusy');
|
||||
|
||||
export const SET_MOUNT_STATE = 'mounts/setMountState';
|
||||
export const setMountState =
|
||||
(provider,
|
||||
state) => {
|
||||
return {type: SET_MOUNT_STATE, payload: {provider, state}};
|
||||
};
|
||||
export const setMountState = (provider, state) => {
|
||||
return {type: SET_MOUNT_STATE, payload: {provider, state}};
|
||||
};
|
||||
|
||||
export const SET_MOUNTED = 'mounts/setMounted';
|
||||
export const setMounted =
|
||||
(provider,
|
||||
mounted) => {
|
||||
return {type: SET_MOUNTED, payload: {provider, mounted}};
|
||||
};
|
||||
export const setMounted = (provider, mounted) => {
|
||||
return {type: SET_MOUNTED, payload: {provider, mounted}};
|
||||
};
|
||||
|
||||
export const SET_PROVIDER_STATE = 'mounts/setProviderState';
|
||||
export const setProviderState = (provider, state) => {
|
||||
return {type: SET_PROVIDER_STATE, payload: {provider, state}}
|
||||
return {type: SET_PROVIDER_STATE, payload: {provider, state}};
|
||||
};
|
||||
|
||||
export const unmountAll = completedCallback => {
|
||||
return dispatch => {
|
||||
export const unmountAll = (completedCallback) => {
|
||||
return (dispatch) => {
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
const unmountedCallback = () => {
|
||||
dispatch(resetMountsState());
|
||||
@@ -173,5 +178,5 @@ export const unmountAll = completedCallback => {
|
||||
};
|
||||
ipcRenderer.once(Constants.IPC_Unmount_All_Drives_Reply, unmountedCallback);
|
||||
ipcRenderer.send(Constants.IPC_Unmount_All_Drives);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
export const displayPinnedManager = createAction('pinned/displayPinnedManager');
|
||||
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import axios from 'axios';
|
||||
|
||||
import * as Constants from '../../constants';
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import {notifyError} from './error_actions';
|
||||
import {
|
||||
checkNewReleases,
|
||||
getIPCRenderer,
|
||||
getNewReleases,
|
||||
getSelectedVersionFromState,
|
||||
} from '../../utils.jsx';
|
||||
|
||||
import {
|
||||
saveState,
|
||||
setAllowMount,
|
||||
setApplicationReady,
|
||||
showWindow
|
||||
showWindow,
|
||||
} from './common_actions';
|
||||
import { notifyError } from './error_actions';
|
||||
import {
|
||||
checkVersionInstalled,
|
||||
setDismissDependencies
|
||||
setDismissDependencies,
|
||||
} from './install_actions';
|
||||
import {unmountAll} from './mount_actions';
|
||||
import {
|
||||
checkNewReleases,
|
||||
getIPCRenderer,
|
||||
getNewReleases, getSelectedVersionFromState
|
||||
} from '../../utils';
|
||||
import { unmountAll } from './mount_actions';
|
||||
|
||||
export const CLEAR_UI_UPGRADE = 'relver/clearUIUpgrade';
|
||||
export const clearUIUpgrade = () => {
|
||||
@@ -27,12 +30,12 @@ export const clearUIUpgrade = () => {
|
||||
};
|
||||
};
|
||||
|
||||
const cleanupOldReleases = versionList => {
|
||||
return dispatch => {
|
||||
const cleanupOldReleases = (versionList) => {
|
||||
return (_) => {
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
if (ipcRenderer) {
|
||||
ipcRenderer.sendSync(Constants.IPC_Cleanup_Releases + '_sync', {
|
||||
version_list: versionList
|
||||
version_list: versionList,
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -42,55 +45,74 @@ export const detectUIUpgrade = () => {
|
||||
return (dispatch, getState) => {
|
||||
axios
|
||||
.get(Constants.UI_RELEASES_URL)
|
||||
.then(response => {
|
||||
.then((response) => {
|
||||
const state = getState();
|
||||
const appPlatform = state.common.AppPlatform;
|
||||
const version = state.common.Version;
|
||||
const data = response.data;
|
||||
|
||||
if (data.Versions &&
|
||||
if (
|
||||
data.Versions &&
|
||||
data.Versions[appPlatform] &&
|
||||
(data.Versions[appPlatform].length > 0) &&
|
||||
(data.Versions[appPlatform][0] !== version)) {
|
||||
dispatch(setUIUpgradeData(data.Locations[appPlatform][data.Versions[appPlatform][0]], data.Versions[appPlatform][0]));
|
||||
data.Versions[appPlatform].length > 0 &&
|
||||
data.Versions[appPlatform][0] !== version
|
||||
) {
|
||||
dispatch(
|
||||
setUIUpgradeData(
|
||||
data.Locations[appPlatform][data.Versions[appPlatform][0]],
|
||||
data.Versions[appPlatform][0]
|
||||
)
|
||||
);
|
||||
if (!state.relver.UpgradeDismissed) {
|
||||
dispatch(showWindow());
|
||||
}
|
||||
} else {
|
||||
dispatch(clearUIUpgrade());
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
dispatch(clearUIUpgrade());
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
export const loadReleases = () => {
|
||||
return (dispatch, getState) => {
|
||||
const dispatchActions = (locationsLookup, versionLookup)=> {
|
||||
const dispatchActions = (locationsLookup, versionLookup) => {
|
||||
const state = getState().relver;
|
||||
let release = state.Release;
|
||||
if (release >= Constants.RELEASE_TYPES.length) {
|
||||
release = Constants.DEFAULT_RELEASE;
|
||||
}
|
||||
|
||||
let latestVersion = versionLookup[Constants.RELEASE_TYPES[release]].length - 1;
|
||||
let latestVersion =
|
||||
versionLookup[Constants.RELEASE_TYPES[release]].length - 1;
|
||||
let version = state.Version;
|
||||
if (versionLookup[Constants.RELEASE_TYPES[release]][0] === 'unavailable') {
|
||||
if (
|
||||
versionLookup[Constants.RELEASE_TYPES[release]][0] === 'unavailable'
|
||||
) {
|
||||
release = Constants.DEFAULT_RELEASE;
|
||||
version = latestVersion = versionLookup[Constants.RELEASE_TYPES[release]].length - 1
|
||||
} else if ((version === -1) || !versionLookup[Constants.RELEASE_TYPES[release]][version]) {
|
||||
version = latestVersion =
|
||||
versionLookup[Constants.RELEASE_TYPES[release]].length - 1;
|
||||
} else if (
|
||||
version === -1 ||
|
||||
!versionLookup[Constants.RELEASE_TYPES[release]][version]
|
||||
) {
|
||||
version = latestVersion;
|
||||
}
|
||||
|
||||
dispatch(setReleaseData(locationsLookup, versionLookup));
|
||||
|
||||
const dispatchActions = (processAllowDismiss = true) => {
|
||||
dispatch(setReleaseUpgradeAvailable((version !== latestVersion)));
|
||||
dispatch(setReleaseUpgradeAvailable(version !== latestVersion));
|
||||
dispatch(setApplicationReady(true));
|
||||
dispatch(detectUIUpgrade());
|
||||
if (processAllowDismiss) {
|
||||
dispatch(setAllowDismissDependencies(versionLookup[Constants.RELEASE_TYPES[release]].length > 1));
|
||||
dispatch(
|
||||
setAllowDismissDependencies(
|
||||
versionLookup[Constants.RELEASE_TYPES[release]].length > 1
|
||||
)
|
||||
);
|
||||
}
|
||||
dispatch(checkVersionInstalled());
|
||||
|
||||
@@ -98,16 +120,18 @@ export const loadReleases = () => {
|
||||
for (const key of Object.keys(locationsLookup)) {
|
||||
versionList.push(key);
|
||||
}
|
||||
dispatch(cleanupOldReleases(versionList))
|
||||
dispatch(cleanupOldReleases(versionList));
|
||||
};
|
||||
|
||||
if ((version !== state.Version) || (release !== state.Release)) {
|
||||
dispatch(unmountAll(() => {
|
||||
dispatch(setActiveRelease(release, version));
|
||||
dispatchActions(false);
|
||||
dispatch(showWindow());
|
||||
dispatch(saveState());
|
||||
}));
|
||||
if (version !== state.Version || release !== state.Release) {
|
||||
dispatch(
|
||||
unmountAll(() => {
|
||||
dispatch(setActiveRelease(release, version));
|
||||
dispatchActions(false);
|
||||
dispatch(showWindow());
|
||||
dispatch(saveState());
|
||||
})
|
||||
);
|
||||
} else {
|
||||
dispatchActions();
|
||||
}
|
||||
@@ -115,7 +139,7 @@ export const loadReleases = () => {
|
||||
|
||||
axios
|
||||
.get(Constants.RELEASES_URL)
|
||||
.then(response => {
|
||||
.then((response) => {
|
||||
const appPlatform = getState().common.AppPlatform;
|
||||
const versionLookup = {
|
||||
Release: response.data.Versions.Release[appPlatform],
|
||||
@@ -129,14 +153,21 @@ export const loadReleases = () => {
|
||||
|
||||
const storedReleases = localStorage.getItem('releases');
|
||||
let newReleases = [];
|
||||
if (storedReleases && (storedReleases.length > 0)) {
|
||||
newReleases = getNewReleases(JSON.parse(storedReleases).VersionLookup, versionLookup, getSelectedVersionFromState(getState()));
|
||||
if (storedReleases && storedReleases.length > 0) {
|
||||
newReleases = getNewReleases(
|
||||
JSON.parse(storedReleases).VersionLookup,
|
||||
versionLookup,
|
||||
getSelectedVersionFromState(getState())
|
||||
);
|
||||
}
|
||||
|
||||
localStorage.setItem('releases', JSON.stringify({
|
||||
LocationsLookup: locationsLookup,
|
||||
VersionLookup: versionLookup
|
||||
}));
|
||||
localStorage.setItem(
|
||||
'releases',
|
||||
JSON.stringify({
|
||||
LocationsLookup: locationsLookup,
|
||||
VersionLookup: versionLookup,
|
||||
})
|
||||
);
|
||||
dispatchActions(locationsLookup, versionLookup);
|
||||
|
||||
dispatch(setNewReleasesAvailable(newReleases));
|
||||
@@ -144,12 +175,17 @@ export const loadReleases = () => {
|
||||
dispatch(setNewReleasesAvailable2(newReleases));
|
||||
localStorage.setItem('previous_releases', storedReleases);
|
||||
dispatch(showWindow());
|
||||
} else if ((newReleases = checkNewReleases(getSelectedVersionFromState(getState()))).length > 0) {
|
||||
} else if (
|
||||
(newReleases = checkNewReleases(
|
||||
getSelectedVersionFromState(getState())
|
||||
)).length > 0
|
||||
) {
|
||||
dispatch(setNewReleasesAvailable2(newReleases));
|
||||
}
|
||||
}).catch(error => {
|
||||
})
|
||||
.catch((error) => {
|
||||
const releases = localStorage.getItem('releases');
|
||||
if (releases && (releases.length > 0)) {
|
||||
if (releases && releases.length > 0) {
|
||||
const obj = JSON.parse(releases);
|
||||
const locationsLookup = obj.LocationsLookup;
|
||||
const versionLookup = obj.VersionLookup;
|
||||
@@ -166,10 +202,7 @@ export const NOTIFY_ACTIVE_RELEASE = 'relver/notifyActiveRelease';
|
||||
export const notifyActiveRelease = (release, version) => {
|
||||
return {
|
||||
type: NOTIFY_ACTIVE_RELEASE,
|
||||
payload: {
|
||||
release: release,
|
||||
version: version
|
||||
},
|
||||
payload: { release: release, version: version },
|
||||
};
|
||||
};
|
||||
|
||||
@@ -183,7 +216,7 @@ export const setActiveRelease = (release, version) => {
|
||||
version = -1;
|
||||
}
|
||||
const versions = relver.VersionLookup[Constants.RELEASE_TYPES[release]];
|
||||
dispatch(setAllowDismissDependencies(versions && (versions.length > 1)));
|
||||
dispatch(setAllowDismissDependencies(versions && versions.length > 1));
|
||||
dispatch(setDismissDependencies(false));
|
||||
dispatch(notifyActiveRelease(release, version));
|
||||
if (common.AppReady) {
|
||||
@@ -192,25 +225,35 @@ export const setActiveRelease = (release, version) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const setAllowDismissDependencies = createAction('relver/setAllowDismissDependencies');
|
||||
export const setDismissNewReleasesAvailable = createAction('relver/setDismissNewReleasesAvailable');
|
||||
export const setAllowDismissDependencies = createAction(
|
||||
'relver/setAllowDismissDependencies'
|
||||
);
|
||||
export const setDismissNewReleasesAvailable = createAction(
|
||||
'relver/setDismissNewReleasesAvailable'
|
||||
);
|
||||
export const setDismissUIUpgrade = createAction('relver/setDismissUIUpgrade');
|
||||
export const setInstalledVersion = createAction('relver/setInstalledVersion');
|
||||
export const setNewReleasesAvailable = createAction('relver/setNewReleasesAvailable');
|
||||
export const setNewReleasesAvailable2 = createAction('relver/setNewReleasesAvailable2');
|
||||
export const setNewReleasesAvailable = createAction(
|
||||
'relver/setNewReleasesAvailable'
|
||||
);
|
||||
export const setNewReleasesAvailable2 = createAction(
|
||||
'relver/setNewReleasesAvailable2'
|
||||
);
|
||||
|
||||
export const SET_RELEASE_DATA = 'relver/setReleaseData';
|
||||
export const setReleaseData = (locationsLookup, versionLookup)=> {
|
||||
export const setReleaseData = (locationsLookup, versionLookup) => {
|
||||
return {
|
||||
type: SET_RELEASE_DATA,
|
||||
payload: {
|
||||
locations: locationsLookup,
|
||||
versions: versionLookup,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export const setReleaseUpgradeAvailable = createAction('relver/setReleaseUpgradeAvailable');
|
||||
export const setReleaseUpgradeAvailable = createAction(
|
||||
'relver/setReleaseUpgradeAvailable'
|
||||
);
|
||||
|
||||
export const SET_UI_UPGRADE_DATA = 'relver/setUIUpgradeData';
|
||||
export const setUIUpgradeData = (upgradeData, version) => {
|
||||
@@ -219,6 +262,6 @@ export const setUIUpgradeData = (upgradeData, version) => {
|
||||
payload: {
|
||||
upgrade_data: upgradeData,
|
||||
version: version,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {createAction} from '@reduxjs/toolkit';
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
export const displaySkynetExport = createAction('skynet/displaySkynetExport');
|
||||
export const displaySkynetImport = createAction('skynet/displaySkynetImport');
|
||||
|
||||
Reference in New Issue
Block a user