Export Skylinks to json file
This commit is contained in:
@@ -47,11 +47,11 @@ export const notifyError = (msg, critical, callback) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const notifyInfo = (title, msg) => {
|
||||
export const notifyInfo = (title, msg, saveToFile, fileName, extension) => {
|
||||
return (dispatch) => {
|
||||
title = title ? title.toString() : 'Information';
|
||||
msg = msg ? msg.toString() : '';
|
||||
dispatch(setInfo(title, msg));
|
||||
dispatch(setInfo(title, msg, saveToFile, fileName, extension));
|
||||
};
|
||||
};
|
||||
|
||||
@@ -61,6 +61,9 @@ export const setErrorInfo = (msg, critical) => {
|
||||
};
|
||||
|
||||
export const SET_INFO = 'error/setInfo';
|
||||
export const setInfo = (title, msg) => {
|
||||
return { type: SET_INFO, payload: { title, msg } };
|
||||
export const setInfo = (title, msg, saveToFile, fileName, extension) => {
|
||||
return {
|
||||
type: SET_INFO,
|
||||
payload: { title, msg, saveToFile, fileName, extension },
|
||||
};
|
||||
};
|
||||
|
||||
@@ -44,7 +44,13 @@ export const errorReducer = createReducer(
|
||||
},
|
||||
[SET_INFO]: (state, action) => {
|
||||
const infoStack = [
|
||||
{ title: action.payload.title, message: action.payload.msg },
|
||||
{
|
||||
title: action.payload.title,
|
||||
message: action.payload.msg,
|
||||
saveToFile: action.payload.saveToFile,
|
||||
fileName: action.payload.fileName,
|
||||
extension: action.payload.extension,
|
||||
},
|
||||
...state.InfoStack,
|
||||
];
|
||||
return { ...state, DisplayInfo: true, InfoStack: infoStack };
|
||||
|
||||
Reference in New Issue
Block a user