Add TWKN timeline.

This commit is contained in:
Roger Braun 2016-11-06 21:46:01 +01:00
parent 7fcd36e2c1
commit 83e7add2c7
5 changed files with 30 additions and 7 deletions

View File

@ -12,11 +12,11 @@
Public Timeline
</router-link>
</li>
<!-- <li>
<li>
<router-link to='/main/all'>
The Whole Known Network
</router-link>
</li> -->
</li>
</ul>
</div>
</div>

View File

@ -0,0 +1,11 @@
import Timeline from '../timeline/timeline.vue'
const PublicAndExternalTimeline = {
components: {
Timeline
},
computed: {
timeline () { return this.$store.state.statuses.timelines.publicAndExternal }
}
}
export default PublicAndExternalTimeline

View File

@ -0,0 +1,10 @@
<template>
<div class="timeline panel panel-default">
<div class="panel-heading">THE WHOLE KNOWN NETWORK</div>
<div class="panel-body">
<Timeline v-bind:timeline="timeline" v-bind:timeline-name="'publicAndExternal'"/>
</div>
</div>
</template>
<script src="./public_and_external_timeline.js"></script>

View File

@ -3,6 +3,7 @@ import VueRouter from 'vue-router'
import Vuex from 'vuex'
import App from './App.vue'
import PublicTimeline from './components/public_timeline/public_timeline.vue'
import PublicAndExternalTimeline from './components/public_and_external_timeline/public_and_external_timeline.vue'
import FriendsTimeline from './components/friends_timeline/friends_timeline.vue'
import statusesModule from './modules/statuses.js'
@ -19,7 +20,8 @@ const store = new Vuex.Store({
})
const routes = [
{ path: '/', redirect: '/main/public' },
{ path: '/', redirect: '/main/all' },
{ path: '/main/all', component: PublicAndExternalTimeline },
{ path: '/main/public', component: PublicTimeline },
{ path: '/main/friends', component: FriendsTimeline }
]

View File

@ -26,7 +26,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false}) =>
const timelineUrls = {
public: PUBLIC_TIMELINE_URL,
friends: FRIENDS_TIMELINE_URL,
'public-and-external': PUBLIC_AND_EXTERNAL_TIMELINE_URL
'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL
}
let url = timelineUrls[timeline]