debian-mirror-gitlab/app/assets/javascripts/integrations/edit/store/getters.js
2021-03-08 18:12:59 +05:30

8 lines
395 B
JavaScript

export const isInheriting = (state) => (state.defaultState === null ? false : !state.override);
export const isDisabled = (state) => state.isSaving || state.isTesting || state.isResetting;
export const propsSource = (state, getters) =>
getters.isInheriting ? state.defaultState : state.customState;
export const currentKey = (state, getters) => (getters.isInheriting ? 'admin' : 'custom');