From c8b5d2351eaf8bb69e34c68f6dd057d0c73560b1 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 10 Mar 2021 21:23:36 -0600 Subject: [PATCH] Fix file --- src/redux/actions/mount_actions.js | 45 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/redux/actions/mount_actions.js b/src/redux/actions/mount_actions.js index 09685a2..6a3fb7b 100644 --- a/src/redux/actions/mount_actions.js +++ b/src/redux/actions/mount_actions.js @@ -1,10 +1,10 @@ -import {createAction} from '@reduxjs/toolkit'; +import { createAction } from '@reduxjs/toolkit'; import * as Constants from '../../constants'; -import {getIPCRenderer} from '../../utils.jsx'; +import { getIPCRenderer } from '../../utils.jsx'; -import {confirmYesNo, saveState} from './common_actions'; -import {notifyError} from './error_actions'; +import { confirmYesNo, saveState } from './common_actions'; +import { notifyError } from './error_actions'; export const addRemoteMount = (hostNameOrIp, port, token) => { return (dispatch, getState) => { @@ -23,20 +23,19 @@ export const addRemoteMount = (hostNameOrIp, port, token) => { Version: getState().relver.InstalledVersion, }); } else { - dispatch(noti - 'Failed to set \'RemoteToken\': ' - oken - ': " + arg.data.Error)); + dispatch( + notifyError('Failed to create S3 instance: ' + arg.data.Error) + ); dispatch(setBusy(false)); } }); ipcRenderer.send(Constants.IPC_Set_Config_Values, { Items: [ - {Name: 'RemoteMount.RemoteHostNameOrIp', Value: hostNameOrIp}, - {Name: 'RemoteMount.RemoteToken', Value: token}, - {Name: 'RemoteMount.RemotePort', Value: port}, - {Name: 'RemoteMount.IsRemoteMount', Value: 'true'}, + { Name: 'RemoteMount.RemoteHostNameOrIp', Value: hostNameOrIp }, + { Name: 'RemoteMount.RemoteToken', Value: token }, + { Name: 'RemoteMount.RemotePort', Value: port }, + { Name: 'RemoteMount.IsRemoteMount', Value: 'true' }, ], Provider: provider, Remote: true, @@ -77,11 +76,11 @@ export const addS3Mount = ( ipcRenderer.send(Constants.IPC_Set_Config_Values, { Items: [ - {Name: 'S3Config.AccessKey', Value: accessKey}, - {Name: 'S3Config.SecretKey', Value: secretKey}, - {Name: 'S3Config.Region', Value: region}, - {Name: 'S3Config.BucketName', Value: bucketName}, - {Name: 'S3Config.URL', Value: url}, + { Name: 'S3Config.AccessKey', Value: accessKey }, + { Name: 'S3Config.SecretKey', Value: secretKey }, + { Name: 'S3Config.Region', Value: region }, + { Name: 'S3Config.BucketName', Value: bucketName }, + { Name: 'S3Config.URL', Value: url }, ], Provider: provider, S3: true, @@ -139,34 +138,34 @@ 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}}; + return { type: SET_ALLOW_MOUNT, payload: { provider, allow } }; }; export const SET_AUTO_MOUNT_PROCESSED = 'mounts/setAutoMountProcessed'; export const setAutoMountProcessed = (provider, processed) => { - return {type: SET_AUTO_MOUNT_PROCESSED, payload: {provider, processed}}; + return { type: SET_AUTO_MOUNT_PROCESSED, payload: { 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}}; + 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}}; + 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) => {