瀏覽代碼

fix: Moving songs in the queue in ManageStation from admin page doesn't work

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 3 年之前
父節點
當前提交
a9991835b9
共有 2 個文件被更改,包括 11 次插入4 次删除
  1. 10 3
      frontend/src/components/Queue.vue
  2. 1 1
      frontend/src/components/modals/ManageStation/index.vue

+ 10 - 3
frontend/src/components/Queue.vue

@@ -182,9 +182,16 @@ export default {
 			loggedIn: state => state.user.auth.loggedIn,
 			userId: state => state.user.auth.userId,
 			userRole: state => state.user.auth.role,
-			station: state => state.station.station,
-			songsList: state => state.station.songsList,
-			otherSongsList: state => state.modals.manageStation.songsList,
+			station(state) {
+				return this.sector === "station"
+					? state.station.station
+					: state.modals.manageStation.station;
+			},
+			songsList(state) {
+				return this.sector === "station"
+					? state.station.songsList
+					: state.modals.manageStation.songsList;
+			},
 			noSong: state => state.station.noSong
 		}),
 		...mapGetters({

+ 1 - 1
frontend/src/components/modals/ManageStation/index.vue

@@ -148,7 +148,7 @@
 		</template>
 		<template #footer>
 			<router-link
-				v-if="sector !== 'station'"
+				v-if="sector !== 'station' && station.name"
 				:to="{
 					name: 'station',
 					params: { id: station.name }