Commit b91d400e authored by Phil Hughes's avatar Phil Hughes

created computed props

removed unused parameters
parent b8bda4ce
......@@ -83,6 +83,12 @@ export default {
'is-open': this.file.opened,
};
},
showTreeChangesCount() {
return this.isTree && this.changesCount > 0 && !this.file.opened;
},
showChangedFileIcon() {
return this.file.changed || this.file.tempFile || this.file.staged;
},
},
updated() {
if (this.file.type === 'blob' && this.file.active) {
......@@ -140,7 +146,7 @@ export default {
v-if="file.mrChange"
/>
<span
v-if="isTree && changesCount > 0 && !file.opened"
v-if="showTreeChangesCount"
class="ide-tree-changes"
>
{{ changesCount }}
......@@ -155,7 +161,7 @@ export default {
/>
</span>
<changed-file-icon
v-else-if="file.changed || file.tempFile || file.staged"
v-else-if="showChangedFileIcon"
:file="file"
:show-tooltip="true"
:show-staged-icon="true"
......
......@@ -117,7 +117,7 @@ export const getRawFileData = ({ state, commit, dispatch }, { path, baseSha }) =
});
};
export const changeFileContent = ({ state, commit, dispatch, getters }, { path, content }) => {
export const changeFileContent = ({ state, commit }, { path, content }) => {
const file = state.entries[path];
commit(types.UPDATE_FILE_CONTENT, { path, content });
......
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