From 521c81525147798e7de93f90c7fe1b312564fbe6 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Sun, 6 Nov 2016 20:10:20 +0100
Subject: Add NavPanel.

---
 src/components/nav_panel/nav_panel.vue | 54 ++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 src/components/nav_panel/nav_panel.vue

(limited to 'src/components/nav_panel/nav_panel.vue')

diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue
new file mode 100644
index 00000000..b535b092
--- /dev/null
+++ b/src/components/nav_panel/nav_panel.vue
@@ -0,0 +1,54 @@
+<template>
+  <div class="nav-panel">
+    <div class="panel panel-default">
+      <ul>
+        <li ng-if='currentUser'>
+          <router-link to='/main/friends'>
+            Timeline
+          </router-link>
+        </li>
+        <li>
+          <router-link to='/main/public'>
+            Public Timeline
+          </router-link>
+        </li>
+        <!-- <li>
+             <router-link to='/main/all'>
+             The Whole Known Network
+             </router-link>
+             </li> -->
+      </ul>
+    </div>
+  </div>
+</template>
+
+<script src="./nav_panel.js" ></script>
+
+<style lang="scss">
+
+ .nav-panel ul {
+     list-style: none;
+     margin: 0;
+     padding: 0;
+ }
+
+ .nav-panel li {
+     border-bottom: 1px solid silver;
+     padding: 0.5em;
+     padding-left: 1em;
+ }
+
+ .nav-panel li:last-child {
+     border: none;
+ }
+
+ .nav-panel a {
+     display: block;
+     width: 100%;
+
+     &.router-link-active {
+         font-weight: bold
+     }
+ }
+
+</style>
-- 
cgit v1.2.3-70-g09d2


From 83e7add2c7cd3d7b878c82ffb86e09479bff3500 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Sun, 6 Nov 2016 21:46:01 +0100
Subject: 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

(limited to 'src/components/nav_panel/nav_panel.vue')

diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue
index b535b092..d493fad3 100644
--- a/src/components/nav_panel/nav_panel.vue
+++ b/src/components/nav_panel/nav_panel.vue
@@ -12,11 +12,11 @@
             Public Timeline
           </router-link>
         </li>
-        <!-- <li>
-             <router-link to='/main/all'>
-             The Whole Known Network
-             </router-link>
-             </li> -->
+        <li>
+          <router-link to='/main/all'>
+            The Whole Known Network
+          </router-link>
+        </li>
       </ul>
     </div>
   </div>
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 00000000..138118ad
--- /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 00000000..94cdaf17
--- /dev/null
+++ b/src/components/public_and_external_timeline/public_and_external_timeline.vue
@@ -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>
diff --git a/src/main.js b/src/main.js
index 7f917128..de3b2af1 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 9538517d..06585ac7 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]
-- 
cgit v1.2.3-70-g09d2

