Pārlūkot izejas kodu

fix: Manage station featured playlists merge fix

Owen Diffey 3 gadi atpakaļ
vecāks
revīzija
3fb0f198f5

+ 12 - 101
frontend/src/components/modals/ManageStation/Tabs/Playlists.vue

@@ -95,55 +95,6 @@
 						:playlist="featuredPlaylist"
 						:show-owner="true"
 					>
-						<template #item-icon>
-							<i
-								class="material-icons"
-								v-if="
-									isAllowedToParty() &&
-									isSelected(featuredPlaylist._id)
-								"
-								content="This playlist is currently selected"
-								v-tippy
-							>
-								radio
-							</i>
-							<i
-								class="material-icons"
-								v-else-if="
-									isOwnerOrAdmin() &&
-									isPlaylistMode() &&
-									isIncluded(featuredPlaylist._id)
-								"
-								content="This playlist is currently included"
-								v-tippy
-							>
-								play_arrow
-							</i>
-							<i
-								class="material-icons excluded-icon"
-								v-else-if="
-									isOwnerOrAdmin() &&
-									isExcluded(featuredPlaylist._id)
-								"
-								content="This playlist is currently excluded"
-								v-tippy
-							>
-								block
-							</i>
-							<i
-								class="material-icons"
-								v-else
-								:content="
-									isPartyMode()
-										? 'This playlist is currently not selected or excluded'
-										: 'This playlist is currently not included or excluded'
-								"
-								v-tippy
-							>
-								play_disabled
-							</i>
-						</template>
-
 						<template #actions>
 							<i
 								v-if="isExcluded(featuredPlaylist._id)"
@@ -154,29 +105,13 @@
 							>
 							<confirm
 								v-if="
-									isPartyMode() &&
+									(isOwnerOrAdmin() ||
+										(station.type === 'community' &&
+											station.partyMode)) &&
 									isSelected(featuredPlaylist._id)
 								"
 								@confirm="
-									deselectPartyPlaylist(featuredPlaylist._id)
-								"
-							>
-								<i
-									class="material-icons stop-icon"
-									content="Stop playing songs from this playlist"
-									v-tippy
-								>
-									stop
-								</i>
-							</confirm>
-							<confirm
-								v-if="
-									isOwnerOrAdmin() &&
-									isPlaylistMode() &&
-									isIncluded(featuredPlaylist._id)
-								"
-								@confirm="
-									removeIncludedPlaylist(featuredPlaylist._id)
+									deselectPlaylist(featuredPlaylist._id)
 								"
 							>
 								<i
@@ -189,26 +124,19 @@
 							</confirm>
 							<i
 								v-if="
-									isPartyMode() &&
+									(isOwnerOrAdmin() ||
+										(station.type === 'community' &&
+											station.partyMode)) &&
 									!isSelected(featuredPlaylist._id) &&
 									!isExcluded(featuredPlaylist._id)
 								"
-								@click="selectPartyPlaylist(featuredPlaylist)"
+								@click="selectPlaylist(featuredPlaylist)"
 								class="material-icons play-icon"
-								content="Request songs from this playlist"
-								v-tippy
-								>play_arrow</i
-							>
-							<i
-								v-if="
-									isOwnerOrAdmin() &&
-									isPlaylistMode() &&
-									!isIncluded(featuredPlaylist._id) &&
-									!isExcluded(featuredPlaylist._id)
+								:content="
+									station.partyMode
+										? 'Request songs from this playlist'
+										: 'Play songs from this playlist'
 								"
-								@click="includePlaylist(featuredPlaylist)"
-								class="material-icons play-icon"
-								:content="'Play songs from this playlist'"
 								v-tippy
 								>play_arrow</i
 							>
@@ -228,23 +156,6 @@
 									>block</i
 								>
 							</confirm>
-							<confirm
-								v-if="
-									isOwnerOrAdmin() &&
-									isExcluded(featuredPlaylist._id)
-								"
-								@confirm="
-									removeExcludedPlaylist(featuredPlaylist._id)
-								"
-							>
-								<i
-									class="material-icons stop-icon"
-									content="Stop blacklisting songs from this playlist"
-									v-tippy
-								>
-									stop
-								</i>
-							</confirm>
 							<i
 								v-if="featuredPlaylist.createdBy === myUserId"
 								@click="showPlaylist(featuredPlaylist._id)"