Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2017-08-06 18:12:29 +0300
committerJacob Schatz <jschatz1@gmail.com>2017-08-06 18:12:29 +0300
commit6cbeedb6ba06d43766002256f8ea5554573270fd (patch)
treece657a6630541fffac73a4cec771842f85f3dde0 /app/assets/javascripts
parentf86cea6fdb59612e675d006559705a91e7371c15 (diff)
Disabled into computed
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/repo/components/repo_commit_section.vue6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/repo/components/repo_commit_section.vue b/app/assets/javascripts/repo/components/repo_commit_section.vue
index 2e34633c049..c939c5b6bb9 100644
--- a/app/assets/javascripts/repo/components/repo_commit_section.vue
+++ b/app/assets/javascripts/repo/components/repo_commit_section.vue
@@ -16,6 +16,10 @@ const RepoCommitSection = {
return this.changedFiles.map(f => Helper.getFilePathFromFullPath(f.url, branch));
},
+ cantCommitYet() {
+ return !commitMessage || submitCommitsLoading;
+ },
+
filePluralize() {
return this.changedFiles.length > 1 ? 'files' : 'file';
},
@@ -84,7 +88,7 @@ export default RepoCommitSection;
</div>
</div>
<div class="col-md-offset-4 col-md-4">
- <button type="submit" :disabled="!commitMessage || submitCommitsLoading" class="btn btn-success submit-commit" @click.prevent="makeCommit">
+ <button type="submit" :disabled="cantCommitYet" class="btn btn-success submit-commit" @click.prevent="makeCommit">
<i class="fa fa-spinner fa-spin" v-if="submitCommitsLoading"></i>
<span class="commit-summary">Commit {{changedFiles.length}} {{filePluralize}}</span>
</button>