compare two revisions

This commit is contained in:
Diffido 2018-01-26 16:50:49 +01:00
parent ddbaa5b0fb
commit 26716625ae

10
dist/history.html vendored
View file

@ -18,6 +18,10 @@
<md-table id="history-table" v-model="filtered_history"> <md-table id="history-table" v-model="filtered_history">
<md-table-toolbar> <md-table-toolbar>
<md-switch v-model="show_empty" @change="toggleShowEmpty">show entries with no changes</md-switch> <md-switch v-model="show_empty" @change="toggleShowEmpty">show entries with no changes</md-switch>
<br />
<md-button class="md-button md-primary" @click="compareSelected()" :disabled="!(oldid && diff)">
Compare selected revisions
</md-button>
</md-table-toolbar> </md-table-toolbar>
<md-table-row slot="md-table-row" slot-scope="{item}"> <md-table-row slot="md-table-row" slot-scope="{item}">
<md-table-cell> <md-table-cell>
@ -80,6 +84,12 @@ var app = new Vue({
}, },
toggleShowEmpty: function() { toggleShowEmpty: function() {
this.updateFilter(); this.updateFilter();
},
compareSelected: function() {
if (!(this.oldid && this.diff)) {
return;
}
window.location = '/diff.html?id=' + this.id + '&oldid=' + this.oldid + '&diff=' + this.diff;
} }
} }
}); });