Prechádzať zdrojové kódy

fix(Station page): add song to queue button shows properly on official stations too

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 4 rokov pred
rodič
commit
fefab11a38

+ 1 - 9
frontend/src/pages/Station/AddSongToQueue.vue

@@ -113,7 +113,7 @@
 								type="text"
 								placeholder="YouTube Playlist URL"
 								v-model="importQuery"
-								@keyup.enter="importPlaylist(false)"
+								@keyup.enter="importPlaylist()"
 							/>
 						</p>
 						<p class="control has-addons">
@@ -135,14 +135,6 @@
 									>publish</i
 								>Import</a
 							>
-							<!-- <a
-								class="button is-info"
-								v-on:click="importPlaylist(true)"
-								href="#"
-								><i class="material-icons icon-with-button"
-									>publish</i
-								>Import only music</a
-							> -->
 						</p>
 					</div>
 				</div>

+ 1 - 0
frontend/src/pages/Station/components/CurrentlyPlaying.vue

@@ -89,6 +89,7 @@ export default {
 	.thumbnail {
 		min-width: 140px;
 		max-height: 140px;
+		height: 100%;
 	}
 
 	#yt-thumbnail {

+ 26 - 21
frontend/src/pages/Station/components/Sidebar/Queue/index.vue

@@ -13,15 +13,23 @@
 		</div>
 		<div
 			id="queue-buttons"
-			v-if="loggedIn && station.type === 'community' && station.partyMode"
+			v-if="
+				(loggedIn &&
+					(station.type === 'community' && station.partyMode)) ||
+					station.type === 'official'
+			"
 		>
 			<button
 				id="add-song-to-queue"
 				class="button is-primary"
 				v-if="
-					(station.locked && isOwnerOnly()) ||
-						!station.locked ||
-						(station.locked && isAdminOnly() && dismissedWarning)
+					(station.type === 'community' &&
+						((station.locked && isOwnerOnly()) ||
+							!station.locked ||
+							(station.locked &&
+								isAdminOnly() &&
+								dismissedWarning))) ||
+						station.type === 'official'
 				"
 				@click="
 					openModal({
@@ -35,24 +43,21 @@
 					Add Song To Queue
 				</span>
 			</button>
-			<button
-				v-if="
-					station.locked &&
-						isAdminOnly() &&
-						!isOwnerOnly() &&
-						!dismissedWarning
-				"
-				class="button"
-				@click="dismissedWarning = true"
+			<div
+				id="queue-locked"
+				v-if="station.type === 'community' && station.locked"
 			>
-				THIS STATION'S QUEUE IS LOCKED.
-			</button>
-			<button
-				v-if="station.locked && !isAdminOnly() && !isOwnerOnly()"
-				class="button"
-			>
-				THIS STATION'S QUEUE IS LOCKED.
-			</button>
+				<button
+					v-if="isAdminOnly() && !isOwnerOnly() && !dismissedWarning"
+					class="button"
+					@click="dismissedWarning = true"
+				>
+					THIS STATION'S QUEUE IS LOCKED.
+				</button>
+				<button v-if="!isAdminOnly() && !isOwnerOnly()" class="button">
+					THIS STATION'S QUEUE IS LOCKED.
+				</button>
+			</div>
 		</div>
 	</div>
 </template>