diff options
author | Phil Hughes <me@iamphill.com> | 2018-05-04 14:31:54 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-05-04 14:31:54 +0100 |
commit | 616c1c7294646e74706cb13be0517383a73b3c27 (patch) | |
tree | fd05a559c286376aac83b125bcda99d6d107d6f1 | |
parent | f0ffc19ee7259004df6cb45cf2c610fef224efe9 (diff) | |
download | gitlab-ce-616c1c7294646e74706cb13be0517383a73b3c27.tar.gz |
fixed disabled action sticking around too long
fixed form collapsing too soon
-rw-r--r-- | app/assets/javascripts/ide/components/commit_sidebar/actions.vue | 10 | ||||
-rw-r--r-- | app/assets/javascripts/ide/components/commit_sidebar/form.vue | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/actions.vue b/app/assets/javascripts/ide/components/commit_sidebar/actions.vue index 3790c3401f3..6a5790c9dff 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/actions.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/actions.vue @@ -1,5 +1,5 @@ <script> -import { mapState } from 'vuex'; +import { mapActions, mapState } from 'vuex'; import { sprintf, __ } from '~/locale'; import * as consts from '../../stores/modules/commit/constants'; import RadioGroup from './radio_group.vue'; @@ -21,6 +21,14 @@ export default { 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, commitToNewBranch: consts.COMMIT_TO_NEW_BRANCH, commitToNewBranchMR: consts.COMMIT_TO_NEW_BRANCH_MR, diff --git a/app/assets/javascripts/ide/components/commit_sidebar/form.vue b/app/assets/javascripts/ide/components/commit_sidebar/form.vue index 163b21221df..4a645c827ad 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/form.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/form.vue @@ -49,7 +49,8 @@ export default { } }, lastCommitMsg() { - this.isCompact = this.lastCommitMsg === ''; + this.isCompact = + this.currentActivityView !== activityBarViews.commit && this.lastCommitMsg === ''; }, }, methods: { |