diff options
author | Phil Hughes <me@iamphill.com> | 2018-05-02 11:47:36 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-05-02 11:47:36 +0100 |
commit | 6bcde61b92a401b221f0d0b956001cb94e3cd9fd (patch) | |
tree | ca152128dfd1395e0d9cbfd5367d1495a755e479 /app/assets/javascripts/ide/components/commit_sidebar/actions.vue | |
parent | cf2def427590524e79056b46cee19ecea381f0d8 (diff) | |
download | gitlab-ce-6bcde61b92a401b221f0d0b956001cb94e3cd9fd.tar.gz |
disabled commit view when no changes are available
remove close button in tab
fix height not working in form
restored stage & unstage all changes
disable merge request radio button when staged & unstaged changes exist
Diffstat (limited to 'app/assets/javascripts/ide/components/commit_sidebar/actions.vue')
-rw-r--r-- | app/assets/javascripts/ide/components/commit_sidebar/actions.vue | 6 |
1 files changed, 4 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 45321df191c..a2763a45734 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 { mapGetters, mapState } from 'vuex'; import { sprintf, __ } from '~/locale'; import * as consts from '../../stores/modules/commit/constants'; import RadioGroup from './radio_group.vue'; @@ -9,7 +9,8 @@ export default { RadioGroup, }, computed: { - ...mapState(['currentBranchId']), + ...mapState(['currentBranchId', 'changedFiles', 'stagedFiles']), + ...mapGetters(['hasChanges']), commitToCurrentBranchText() { return sprintf( __('Commit to %{branchName} branch'), @@ -44,6 +45,7 @@ export default { :value="$options.commitToNewBranchMR" :label="__('Create a new branch and merge request')" :show-input="true" + :disabled="!!changedFiles.length && !!changedFiles.length" /> </div> </template> |