Browse Source

Added official station route without official prefix in url.

KrisVos130 8 years ago
parent
commit
a945f40d74
2 changed files with 5 additions and 2 deletions
  1. 2 2
      frontend/components/pages/Home.vue
  2. 3 0
      frontend/main.js

+ 2 - 2
frontend/components/pages/Home.vue

@@ -3,7 +3,7 @@
 		<main-header></main-header>
 		<div class="group">
 			<div class="group-title">Official Stations</div>
-			<div class="card station-card" v-for="station in stations.official" v-link="{ path: '/official/' + station._id }" @click="this.$dispatch('joinStation', station._id)">
+			<div class="card station-card" v-for="station in stations.official" v-link="{ path: '/' + station._id }" @click="this.$dispatch('joinStation', station._id)">
 				<div class="card-image">
 					<figure class="image is-square">
 						<img :src="station.currentSong.thumbnail" onerror="this.src='/assets/notes-transparent.png'" />
@@ -25,7 +25,7 @@
 						{{ station.description }}
 					</div>
 				</div>
-				<a @click="this.$dispatch('joinStation', station._id)" href='#' class='absolute-a' v-link="{ path: '/official/' + station._id }"></a>
+				<a @click="this.$dispatch('joinStation', station._id)" href='#' class='absolute-a' v-link="{ path: '/' + station._id }"></a>
 			</div>
 		</div>
 		<div class="group">

+ 3 - 0
frontend/main.js

@@ -97,6 +97,9 @@ router.map({
 	'/official/:id': {
 		component: Station
 	},
+	'/:id': {
+		component: Station
+	},
 	'/community/:id': {
 		component: Station
 	}