From 83e7add2c7cd3d7b878c82ffb86e09479bff3500 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 6 Nov 2016 21:46:01 +0100 Subject: [PATCH] Add TWKN timeline. --- src/components/nav_panel/nav_panel.vue | 10 +++++----- .../public_and_external_timeline.js | 11 +++++++++++ .../public_and_external_timeline.vue | 10 ++++++++++ src/main.js | 4 +++- src/services/api/api.service.js | 2 +- 5 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 src/components/public_and_external_timeline/public_and_external_timeline.js create mode 100644 src/components/public_and_external_timeline/public_and_external_timeline.vue diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index b535b092aa..d493fad390 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -12,11 +12,11 @@ Public Timeline - +
  • + + The Whole Known Network + +
  • diff --git a/src/components/public_and_external_timeline/public_and_external_timeline.js b/src/components/public_and_external_timeline/public_and_external_timeline.js new file mode 100644 index 0000000000..138118ad9c --- /dev/null +++ b/src/components/public_and_external_timeline/public_and_external_timeline.js @@ -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 diff --git a/src/components/public_and_external_timeline/public_and_external_timeline.vue b/src/components/public_and_external_timeline/public_and_external_timeline.vue new file mode 100644 index 0000000000..94cdaf17fb --- /dev/null +++ b/src/components/public_and_external_timeline/public_and_external_timeline.vue @@ -0,0 +1,10 @@ + + + diff --git a/src/main.js b/src/main.js index 7f917128cc..de3b2af1cb 100644 --- a/src/main.js +++ b/src/main.js @@ -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 } ] diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 9538517d65..06585ac711 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -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]