diff options
Diffstat (limited to 'app/assets/javascripts/integrations/edit/store')
5 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/integrations/edit/store/actions.js b/app/assets/javascripts/integrations/edit/store/actions.js index 199c9074ead..097304be242 100644 --- a/app/assets/javascripts/integrations/edit/store/actions.js +++ b/app/assets/javascripts/integrations/edit/store/actions.js @@ -3,3 +3,5 @@ import * as types from './mutation_types'; export const setOverride = ({ commit }, override) => commit(types.SET_OVERRIDE, override); export const setIsSaving = ({ commit }, isSaving) => commit(types.SET_IS_SAVING, isSaving); export const setIsTesting = ({ commit }, isTesting) => commit(types.SET_IS_TESTING, isTesting); +export const setIsResetting = ({ commit }, isResetting) => + commit(types.SET_IS_RESETTING, isResetting); diff --git a/app/assets/javascripts/integrations/edit/store/getters.js b/app/assets/javascripts/integrations/edit/store/getters.js index 4ee5f11855c..310d970c73e 100644 --- a/app/assets/javascripts/integrations/edit/store/getters.js +++ b/app/assets/javascripts/integrations/edit/store/getters.js @@ -1,6 +1,6 @@ export const isInheriting = state => (state.defaultState === null ? false : !state.override); -export const isSavingOrTesting = state => state.isSaving || state.isTesting; +export const isDisabled = state => state.isSaving || state.isTesting || state.isResetting; export const propsSource = (state, getters) => getters.isInheriting ? state.defaultState : state.customState; diff --git a/app/assets/javascripts/integrations/edit/store/mutation_types.js b/app/assets/javascripts/integrations/edit/store/mutation_types.js index 0dae8ea079e..2a84408f658 100644 --- a/app/assets/javascripts/integrations/edit/store/mutation_types.js +++ b/app/assets/javascripts/integrations/edit/store/mutation_types.js @@ -1,3 +1,4 @@ export const SET_OVERRIDE = 'SET_OVERRIDE'; export const SET_IS_SAVING = 'SET_IS_SAVING'; export const SET_IS_TESTING = 'SET_IS_TESTING'; +export const SET_IS_RESETTING = 'SET_IS_RESETTING'; diff --git a/app/assets/javascripts/integrations/edit/store/mutations.js b/app/assets/javascripts/integrations/edit/store/mutations.js index 8ac3c476f9e..07e3e25ccf0 100644 --- a/app/assets/javascripts/integrations/edit/store/mutations.js +++ b/app/assets/javascripts/integrations/edit/store/mutations.js @@ -10,4 +10,7 @@ export default { [types.SET_IS_TESTING](state, isTesting) { state.isTesting = isTesting; }, + [types.SET_IS_RESETTING](state, isResetting) { + state.isResetting = isResetting; + }, }; diff --git a/app/assets/javascripts/integrations/edit/store/state.js b/app/assets/javascripts/integrations/edit/store/state.js index a9ecee6c539..aae3db1583f 100644 --- a/app/assets/javascripts/integrations/edit/store/state.js +++ b/app/assets/javascripts/integrations/edit/store/state.js @@ -7,5 +7,6 @@ export default ({ defaultState = null, customState = {} } = {}) => { customState, isSaving: false, isTesting: false, + isResetting: false, }; }; |