Commit 061e6032 authored by Jacob Schatz's avatar Jacob Schatz

Pluralize files

parent c18fee94
...@@ -16,7 +16,11 @@ const RepoCommitSection = { ...@@ -16,7 +16,11 @@ const RepoCommitSection = {
return this.changedFiles.map((f) => { return this.changedFiles.map((f) => {
return Helper.getFilePathFromFullPath(f.url, branch); return Helper.getFilePathFromFullPath(f.url, branch);
}); });
} },
filePluralize() {
return this.changedFiles.length > 1 ? 'files' : 'file'
},
}, },
methods: { methods: {
...@@ -87,7 +91,7 @@ export default RepoCommitSection; ...@@ -87,7 +91,7 @@ export default RepoCommitSection;
<div class="col-md-offset-4 col-md-4"> <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="!commitMessage || submitCommitsLoading" class="btn btn-success submit-commit" @click.prevent="makeCommit">
<i class="fa fa-spinner fa-spin" v-if="submitCommitsLoading"></i> <i class="fa fa-spinner fa-spin" v-if="submitCommitsLoading"></i>
<span class="commit-summary">Commit {{changedFiles.length}} Files</span> <span class="commit-summary">Commit {{changedFiles.length}} {{filePluralize}}</span>
</button> </button>
</div> </div>
</fieldset> </fieldset>
......
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