Commit 7c202892 authored by Jacob Schatz's avatar Jacob Schatz Committed by Eric Eastwood

Make computed prop

parent 9a69e881
...@@ -11,6 +11,11 @@ const RepoCommitSection = { ...@@ -11,6 +11,11 @@ const RepoCommitSection = {
mixins: [RepoMixin], mixins: [RepoMixin],
computed: { computed: {
showCommitable() {
return isCommitable && changedFiles.length;
},
branchPaths() { branchPaths() {
const branch = this.currentBranch; const branch = this.currentBranch;
return this.changedFiles.map(f => f.path); return this.changedFiles.map(f => f.path);
...@@ -49,7 +54,7 @@ const RepoCommitSection = { ...@@ -49,7 +54,7 @@ const RepoCommitSection = {
resetCommitState() { resetCommitState() {
this.submitCommitsLoading = false; this.submitCommitsLoading = false;
this.changedFiles = []; this.changedFiles = [];
this.openedFiles = []; // this.openedFiles = [];
this.commitMessage = ''; this.commitMessage = '';
this.editMode = false; this.editMode = false;
window.scrollTo(0,0); window.scrollTo(0,0);
...@@ -61,7 +66,7 @@ export default RepoCommitSection; ...@@ -61,7 +66,7 @@ export default RepoCommitSection;
</script> </script>
<template> <template>
<div id="commit-area" v-if="isCommitable && changedFiles.length" > <div id="commit-area" v-if="showCommitable">
<form class="form-horizontal"> <form class="form-horizontal">
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
......
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