Browse Source

Moved Station Code to seperate folder. Changed route for Stations also

theflametrooper 8 years ago
parent
commit
c98038c0c5

+ 1 - 1
frontend/components/pages/Station.vue → frontend/components/Station/Station.vue

@@ -80,7 +80,7 @@
 </template>
 
 <script>
-	import StationHeader from '../StationHeader.vue'
+	import StationHeader from './StationHeader.vue';
 
 	export default {
 		data() {

+ 0 - 0
frontend/components/StationHeader.vue → frontend/components/Station/StationHeader.vue


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

@@ -55,7 +55,7 @@
 		<div class="group">
 			<!--<div class="group-title">{{group.name}}</div>-->
 			<div class="group-stations">
-				<div class="stations-station" v-for="station in $parent.stations" v-link="{ path: '/station/' + station.name }" @click="this.$dispatch('joinStation', station.id)">
+				<div class="stations-station" v-for="station in $parent.stations" v-link="{ path: '/' + station.name }" @click="this.$dispatch('joinStation', station.id)">
 					<img class="station-image" :src="station.playlist[station.currentSongIndex].thumbnail" />
 					<div class="station-info">
 						<div class="station-grid-left">

+ 5 - 2
frontend/main.js

@@ -4,7 +4,7 @@ import VueRouter from 'vue-router';
 import App from './App.vue';
 
 import Home from './components/pages/Home.vue';
-import Station from './components/pages/Station.vue';
+import Station from './components/Station/Station.vue';
 import Admin from './components/pages/Admin.vue';
 import User from './components/User/Show.vue';
 import Settings from './components/User/Settings.vue';
@@ -26,7 +26,10 @@ router.map({
 	'/admin': {
 		component: Admin
 	},
-	'/station/:id': {
+	'/:id': {
+		component: Station
+	},
+	'/community/:id': {
 		component: Station
 	}
 });