Added release notes display to updater. RPS-48
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user