debian-mirror-gitlab/app/assets/javascripts/integrations/edit/store/getters.js

9 lines
391 B
JavaScript
Raw Normal View History

2020-11-24 15:15:51 +05:30
export const isInheriting = state => (state.defaultState === null ? false : !state.override);
2021-01-29 00:20:46 +05:30
export const isDisabled = state => state.isSaving || state.isTesting || state.isResetting;
2020-07-28 23:09:34 +05:30
export const propsSource = (state, getters) =>
2020-11-24 15:15:51 +05:30
getters.isInheriting ? state.defaultState : state.customState;
2020-07-28 23:09:34 +05:30
export const currentKey = (state, getters) => (getters.isInheriting ? 'admin' : 'custom');