Commit 2aede9a4 authored by Jacob Schatz's avatar Jacob Schatz Committed by Eric Eastwood

Computed if statement for repo edit button.

parent f45b680d
......@@ -9,6 +9,10 @@ export default {
buttonLabel() {
return this.editMode ? this.__('Cancel edit') : this.__('Edit');
},
showButton() {
return this.isCommitable && !this.activeFile.render_error;
}
},
methods: {
editCancelClicked() {
......@@ -31,7 +35,7 @@ export default {
</script>
<template>
<button class="btn btn-default" @click.prevent="editCancelClicked" v-cloak v-if="isCommitable && !activeFile.render_error" :disabled="binary">
<button class="btn btn-default" type="button" @click.prevent="editCancelClicked" v-if="showButton" :disabled="binary">
<i class="fa fa-pencil" v-if="!editMode"></i>
<span>{{buttonLabel}}</span>
</button>
......
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