|
|
@ -1,18 +1,45 @@
|
|
|
|
<template lang="pug">
|
|
|
|
<template lang="pug">
|
|
|
|
.history
|
|
|
|
.container.is-fluid
|
|
|
|
.history-title {{ currentPath }}
|
|
|
|
.columns.is-gapless
|
|
|
|
.history-info
|
|
|
|
|
|
|
|
.columns
|
|
|
|
.column.is-narrow.is-hidden-touch.sidebar
|
|
|
|
.column
|
|
|
|
aside.stickyscroll
|
|
|
|
p Timestamp: #[strong 2017/07/02 5:19 PM]
|
|
|
|
.sidebar-label
|
|
|
|
p Author: #[strong Nicolas Giard]
|
|
|
|
span {{ $t('sidebar.pastversions') }}
|
|
|
|
p Commit: #[strong 379ff16957b2b7f978e02bfe50cd0cee182fcb8a]
|
|
|
|
ul.sidebar-menu
|
|
|
|
.column.history-info-actions
|
|
|
|
li(v-for='item in versions')
|
|
|
|
.button-group
|
|
|
|
a.is-multiline(:title='item.dateFull')
|
|
|
|
button.button.is-blue-grey() Compare With...
|
|
|
|
span {{ item.dateCalendar }}
|
|
|
|
button.button.is-blue-grey() Revert to version
|
|
|
|
span.is-small {{ item.commitAbbr }}
|
|
|
|
toggle.is-dark(v-model='sidebyside', desc='Side-by-side View')
|
|
|
|
|
|
|
|
.history-diff#diff
|
|
|
|
.column
|
|
|
|
|
|
|
|
.history
|
|
|
|
|
|
|
|
.history-title {{ currentPath }}
|
|
|
|
|
|
|
|
.history-info
|
|
|
|
|
|
|
|
.columns
|
|
|
|
|
|
|
|
.column.history-info-meta
|
|
|
|
|
|
|
|
p
|
|
|
|
|
|
|
|
i.nc-icon-outline.ui-1_calendar-check-62
|
|
|
|
|
|
|
|
span Timestamp: #[strong 2017/07/02 5:19 PM]
|
|
|
|
|
|
|
|
p
|
|
|
|
|
|
|
|
i.nc-icon-outline.i.nc-icon-outline.users_man-23
|
|
|
|
|
|
|
|
span Author: #[strong Nicolas Giard]
|
|
|
|
|
|
|
|
p
|
|
|
|
|
|
|
|
i.nc-icon-outline.media-1_flash-21
|
|
|
|
|
|
|
|
span Commit: #[strong 379ff16957b2b7f978e02bfe50cd0cee182fcb8a]
|
|
|
|
|
|
|
|
.column.history-info-actions
|
|
|
|
|
|
|
|
.button-group
|
|
|
|
|
|
|
|
button.button.is-blue-grey()
|
|
|
|
|
|
|
|
i.nc-icon-outline.design_path-intersect
|
|
|
|
|
|
|
|
span Compare With...
|
|
|
|
|
|
|
|
button.button.is-blue-grey()
|
|
|
|
|
|
|
|
i.nc-icon-outline.ui-1_eye-17
|
|
|
|
|
|
|
|
span View
|
|
|
|
|
|
|
|
button.button.is-blue-grey()
|
|
|
|
|
|
|
|
i.nc-icon-outline.arrows-4_undo-29
|
|
|
|
|
|
|
|
span Revert to version
|
|
|
|
|
|
|
|
toggle.is-dark(v-model='sidebyside', desc='Side-by-side View')
|
|
|
|
|
|
|
|
.history-diff#diff
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -20,24 +47,31 @@
|
|
|
|
let diffui
|
|
|
|
let diffui
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'history',
|
|
|
|
name: 'history',
|
|
|
|
props: ['currentPath'],
|
|
|
|
props: ['currentPath', 'historyData'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
versions: [],
|
|
|
|
diffui: {},
|
|
|
|
diffui: {},
|
|
|
|
sidebyside: true
|
|
|
|
sidebyside: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
sidebyside() {
|
|
|
|
|
|
|
|
this.draw()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
draw() {
|
|
|
|
draw() {
|
|
|
|
diffui.draw('#diff', {
|
|
|
|
diffui.draw('#diff', {
|
|
|
|
inputFormat: 'json',
|
|
|
|
inputFormat: 'json',
|
|
|
|
outputFormat: 'side-by-side',
|
|
|
|
outputFormat: this.sidebyside ? 'side-by-side' : 'line-by-line',
|
|
|
|
matching: 'words',
|
|
|
|
matching: 'words',
|
|
|
|
synchronisedScroll: true
|
|
|
|
synchronisedScroll: true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.versions = JSON.parse(this.historyData)
|
|
|
|
diffui = new Diff2HtmlUI({
|
|
|
|
diffui = new Diff2HtmlUI({
|
|
|
|
diff: `diff --git a/wiki/prerequisites.md b/wiki/prerequisites.md
|
|
|
|
diff: `diff --git a/wiki/prerequisites.md b/wiki/prerequisites.md
|
|
|
|
index 89a10de..4bc0d66 100644
|
|
|
|
index 89a10de..4bc0d66 100644
|
|
|
|