Added release notes display to updater. RPS-48

This commit is contained in:
Patrick Fic
2020-11-16 10:04:11 -08:00
parent b6ce94df08
commit ecf911bc43
14 changed files with 123 additions and 4 deletions

View File

@@ -52,3 +52,8 @@ export const setUpdateProgress = (progress) => ({
type: ApplicationActionTypes.SET_UPDATE_PROGRESS,
payload: progress,
});
export const setReleaseNotes = (releaseNotes) => ({
type: ApplicationActionTypes.SET_RELEASE_NOTES,
payload: releaseNotes,
});

View File

@@ -9,6 +9,7 @@ const INITIAL_STATE = {
settings: {},
updateAvailable: false,
updateProgress: null,
releaseNotes: null,
};
const { ipcRenderer } = window;
@@ -66,6 +67,8 @@ const applicationReducer = (state = INITIAL_STATE, action) => {
return { ...state, updateAvailable: action.payload };
case ApplicationActionTypes.SET_UPDATE_PROGRESS:
return { ...state, updateProgress: action.payload };
case ApplicationActionTypes.SET_RELEASE_NOTES:
return { ...state, releaseNotes: action.payload };
default:
return state;
}

View File

@@ -36,7 +36,13 @@ export const selectUpdateAvailable = createSelector(
[selectApplication],
(application) => application.updateAvailable
);
export const selectUpdateProgress = createSelector(
[selectApplication],
(application) => application.updateProgress
);
export const selectReleaseNotes = createSelector(
[selectApplication],
(application) => application.releaseNotes
);

View File

@@ -10,6 +10,6 @@ const ApplicationActionTypes = {
SET_SETTINGS: "SET_SETTINGS",
SET_UPDATE_AVAILABLE: "SET_UPDATE_AVAILABLE",
SET_UPDATE_PROGRESS: "SET_UPDATE_PROGRESS",
SET_RELEASE_NOTES: "SET_RELEASE_NOTES",
};
export default ApplicationActionTypes;