Commit 616c1c72 authored by Phil Hughes's avatar Phil Hughes

fixed disabled action sticking around too long

fixed form collapsing too soon
parent f0ffc19e
<script> <script>
import { mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import * as consts from '../../stores/modules/commit/constants'; import * as consts from '../../stores/modules/commit/constants';
import RadioGroup from './radio_group.vue'; import RadioGroup from './radio_group.vue';
...@@ -21,6 +21,14 @@ export default { ...@@ -21,6 +21,14 @@ export default {
return this.changedFiles.length > 0 && this.stagedFiles.length > 0; return this.changedFiles.length > 0 && this.stagedFiles.length > 0;
}, },
}, },
mounted() {
if (this.disableMergeRequestRadio) {
this.updateCommitAction(consts.COMMIT_TO_CURRENT_BRANCH);
}
},
methods: {
...mapActions('commit', ['updateCommitAction']),
},
commitToCurrentBranch: consts.COMMIT_TO_CURRENT_BRANCH, commitToCurrentBranch: consts.COMMIT_TO_CURRENT_BRANCH,
commitToNewBranch: consts.COMMIT_TO_NEW_BRANCH, commitToNewBranch: consts.COMMIT_TO_NEW_BRANCH,
commitToNewBranchMR: consts.COMMIT_TO_NEW_BRANCH_MR, commitToNewBranchMR: consts.COMMIT_TO_NEW_BRANCH_MR,
......
...@@ -49,7 +49,8 @@ export default { ...@@ -49,7 +49,8 @@ export default {
} }
}, },
lastCommitMsg() { lastCommitMsg() {
this.isCompact = this.lastCommitMsg === ''; this.isCompact =
this.currentActivityView !== activityBarViews.commit && this.lastCommitMsg === '';
}, },
}, },
methods: { methods: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment