changelog: dialog for changelog

This commit is contained in:
muerwre 2018-12-07 17:38:49 +07:00
parent b719b3f1a2
commit 65e549a5af
12 changed files with 218 additions and 34 deletions

View file

@ -78,10 +78,16 @@ const setRenderer = (state, { payload }) => ({
const setProvider = (state, { provider }) => ({ ...state, provider });
const setDialog = (state, { dialog, dialog_active }) => ({
const setDialog = (state, { dialog }) => ({
...state,
dialog: dialog || state.dialog,
dialog_active: typeof dialog_active !== 'undefined' ? dialog_active : !state.dialog_active,
dialog,
// dialog_active: typeof dialog_active !== 'undefined' ? dialog_active : !state.dialog_active,
// dialog_active,
});
const setDialogActive = (state, { dialog_active }) => ({
...state,
dialog_active: dialog_active || !state.dialog_active,
});
const setReady = (state, { ready = true }) => ({
@ -114,6 +120,7 @@ const HANDLERS = ({
[ACTIONS.SET_PROVIDER]: setProvider,
[ACTIONS.SET_DIALOG]: setDialog,
[ACTIONS.SET_DIALOG_ACTIVE]: setDialogActive,
[ACTIONS.SET_READY]: setReady,
}: { [key: String]: Function });