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

9 lines
395 B
JavaScript
Raw Normal View History

2021-03-08 18:12:59 +05:30
export const isInheriting = (state) => (state.defaultState === null ? false : !state.override);
2020-11-24 15:15:51 +05:30
2021-03-08 18:12:59 +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');