mirror of https://github.com/Requarks/wiki.git
11 changed files with 2761 additions and 383 deletions
Unified View
Diff Options
-
1client/client-app.js
-
7client/components/common/nav-header.vue
-
8client/components/editor.vue
-
136client/components/history.vue
-
2client/store/index.js
-
21client/store/page.js
-
12client/themes/default/components/app.vue
-
68package.json
-
18server/controllers/common.js
-
11server/views/history.pug
-
2860yarn.lock
@ -0,0 +1,136 @@ |
|||||
|
<template lang='pug'> |
||||
|
v-app(:dark='darkMode').history |
||||
|
nav-header |
||||
|
v-content |
||||
|
v-toolbar(color='primary', dark) |
||||
|
.subheading Viewing history of page #[strong /{{path}}] |
||||
|
v-spacer |
||||
|
.caption.blue--text.text--lighten-3 ID {{id}} |
||||
|
v-btn.ml-4(depressed, color='blue darken-1', @click='goLive') Return to Live Version |
||||
|
v-container(fluid, grid-list-xl) |
||||
|
v-layout(row, wrap) |
||||
|
v-flex(xs5) |
||||
|
v-chip.ma-0.grey--text.text--darken-2( |
||||
|
label |
||||
|
small |
||||
|
color='grey lighten-2' |
||||
|
) |
||||
|
span Live |
||||
|
v-timeline( |
||||
|
dense |
||||
|
) |
||||
|
v-timeline-item( |
||||
|
fill-dot |
||||
|
color='primary' |
||||
|
icon='edit' |
||||
|
) |
||||
|
v-card.grey.lighten-3.radius-7(flat) |
||||
|
v-card-text |
||||
|
v-layout(justify-space-between) |
||||
|
v-flex(xs7) |
||||
|
v-chip.ml-0.mr-3( |
||||
|
label |
||||
|
small |
||||
|
color='primary' |
||||
|
) |
||||
|
span.white--text Viewing |
||||
|
span Edited by John Doe |
||||
|
v-flex(xs5, text-xs-right, align-center, d-flex) |
||||
|
.caption Today at 12:34 PM |
||||
|
|
||||
|
v-timeline-item( |
||||
|
fill-dot |
||||
|
small |
||||
|
color='primary' |
||||
|
icon='edit' |
||||
|
) |
||||
|
v-card.grey.lighten-3.radius-7(flat) |
||||
|
v-card-text |
||||
|
v-layout(justify-space-between) |
||||
|
v-flex(xs7) |
||||
|
span Edited by Jane Doe |
||||
|
v-flex(xs5, text-xs-right, align-center, d-flex) |
||||
|
.caption Today at 12:27 PM |
||||
|
|
||||
|
v-timeline-item( |
||||
|
fill-dot |
||||
|
small |
||||
|
color='purple' |
||||
|
icon='forward' |
||||
|
) |
||||
|
v-card.purple.lighten-5.radius-7(flat) |
||||
|
v-card-text |
||||
|
v-layout(justify-space-between) |
||||
|
v-flex(xs7) |
||||
|
span Moved page from #[strong /test] to #[strong /home] by John Doe |
||||
|
v-flex(xs5, text-xs-right, align-center, d-flex) |
||||
|
.caption Yesterday at 10:45 AM |
||||
|
|
||||
|
v-timeline-item( |
||||
|
fill-dot |
||||
|
color='teal' |
||||
|
icon='add' |
||||
|
) |
||||
|
v-card.teal.lighten-5.radius-7(flat) |
||||
|
v-card-text |
||||
|
v-layout(justify-space-between) |
||||
|
v-flex(xs7): span Initial page creation by John Doe |
||||
|
v-flex(xs5, text-xs-right, align-center, d-flex) |
||||
|
.caption Last Tuesday at 7:56 PM |
||||
|
v-chip.ma-0.grey--text.text--darken-2( |
||||
|
label |
||||
|
small |
||||
|
color='grey lighten-2' |
||||
|
) End of history |
||||
|
|
||||
|
v-flex(xs7) |
||||
|
v-card.radius-7 |
||||
|
v-card-text |
||||
|
v-card.grey.lighten-4.radius-7(flat) |
||||
|
v-card-text |
||||
|
.subheading Page Title |
||||
|
.caption Some page description |
||||
|
|
||||
|
nav-footer |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
/* global siteConfig */ |
||||
|
|
||||
|
export default { |
||||
|
props: { |
||||
|
id: { |
||||
|
type: Number, |
||||
|
default: 0 |
||||
|
}, |
||||
|
locale: { |
||||
|
type: String, |
||||
|
default: 'en' |
||||
|
}, |
||||
|
path: { |
||||
|
type: String, |
||||
|
default: 'home' |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return {} |
||||
|
}, |
||||
|
computed: { |
||||
|
darkMode() { return siteConfig.darkMode } |
||||
|
}, |
||||
|
created () { |
||||
|
this.$store.commit('page/SET_ID', this.id) |
||||
|
this.$store.commit('page/SET_LOCALE', this.locale) |
||||
|
this.$store.commit('page/SET_PATH', this.path) |
||||
|
}, |
||||
|
methods: { |
||||
|
goLive() { |
||||
|
window.location.assign(`/${this.path}`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss'> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,21 @@ |
|||||
|
import { make } from 'vuex-pathify' |
||||
|
|
||||
|
const state = { |
||||
|
id: 0, |
||||
|
authorId: 0, |
||||
|
authorName: 'Unknown', |
||||
|
createdAt: '', |
||||
|
description: '', |
||||
|
isPublished: true, |
||||
|
locale: 'en', |
||||
|
path: '', |
||||
|
tags: [], |
||||
|
title: '', |
||||
|
updatedAt: '' |
||||
|
} |
||||
|
|
||||
|
export default { |
||||
|
namespaced: true, |
||||
|
state, |
||||
|
mutations: make.mutations(state) |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
extends master.pug |
||||
|
|
||||
|
block head |
||||
|
|
||||
|
block body |
||||
|
#root |
||||
|
history( |
||||
|
id=page.id |
||||
|
locale=page.localeCode |
||||
|
path=page.path |
||||
|
) |
2860
yarn.lock
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save