1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012 |
- <template>
- <div class="station-playlists">
- <div class="tabs-container">
- <div class="tab-selection">
- <button
- class="button is-default"
- ref="search-tab"
- :class="{ selected: tab === 'search' }"
- @click="showTab('search')"
- >
- Search
- </button>
- <button
- v-if="station.type === 'community'"
- class="button is-default"
- ref="my-playlists-tab"
- :class="{ selected: tab === 'my-playlists' }"
- @click="showTab('my-playlists')"
- >
- My Playlists
- </button>
- <button
- class="button is-default"
- ref="party-tab"
- :class="{ selected: tab === 'party' }"
- v-if="isPartyMode()"
- @click="showTab('party')"
- >
- Party
- </button>
- <button
- class="button is-default"
- ref="included-tab"
- :class="{ selected: tab === 'included' }"
- v-if="isPlaylistMode()"
- @click="showTab('included')"
- >
- Included
- </button>
- <button
- class="button is-default"
- ref="excluded-tab"
- :class="{ selected: tab === 'excluded' }"
- @click="showTab('excluded')"
- >
- Excluded
- </button>
- </div>
- <div class="tab" v-show="tab === 'search'">
- <label class="label"> Search for a public playlist </label>
- <div class="control is-grouped input-with-button">
- <p class="control is-expanded">
- <input
- class="input"
- type="text"
- placeholder="Enter your playlist query here..."
- v-model="search.query"
- @keyup.enter="searchForPlaylists(1)"
- />
- </p>
- <p class="control">
- <a class="button is-info" @click="searchForPlaylists(1)"
- ><i class="material-icons icon-with-button"
- >search</i
- >Search</a
- >
- </p>
- </div>
- <div v-if="search.results.length > 0">
- <playlist-item
- v-for="playlist in search.results"
- :key="`searchKey-${playlist._id}`"
- :playlist="playlist"
- :show-owner="true"
- >
- <i
- class="material-icons"
- slot="item-icon"
- v-if="
- isAllowedToParty() && isSelected(playlist._id)
- "
- content="This playlist is currently selected"
- v-tippy
- >
- radio
- </i>
- <i
- class="material-icons"
- slot="item-icon"
- v-else-if="
- isOwnerOrAdmin() &&
- isPlaylistMode() &&
- isIncluded(playlist._id)
- "
- content="This playlist is currently included"
- v-tippy
- >
- play_arrow
- </i>
- <i
- class="material-icons excluded-icon"
- slot="item-icon"
- v-else-if="
- isOwnerOrAdmin() && isExcluded(playlist._id)
- "
- content="This playlist is currently excluded"
- v-tippy
- >
- block
- </i>
- <i
- class="material-icons"
- slot="item-icon"
- 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>
- <div class="icons-group" slot="actions">
- <i
- v-if="isExcluded(playlist._id)"
- class="material-icons stop-icon"
- content="This playlist is blacklisted in this station"
- v-tippy="{ theme: 'info' }"
- >play_disabled</i
- >
- <confirm
- v-if="isPartyMode() && isSelected(playlist._id)"
- @confirm="deselectPartyPlaylist(playlist._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(playlist._id)
- "
- @confirm="removeIncludedPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Stop playing songs from this playlist"
- v-tippy
- >
- stop
- </i>
- </confirm>
- <i
- v-if="
- isPartyMode() &&
- !isSelected(playlist._id) &&
- !isExcluded(playlist._id)
- "
- @click="selectPartyPlaylist(playlist)"
- class="material-icons play-icon"
- content="Request songs from this playlist"
- v-tippy
- >play_arrow</i
- >
- <i
- v-if="
- isOwnerOrAdmin() &&
- isPlaylistMode() &&
- !isIncluded(playlist._id) &&
- !isExcluded(playlist._id)
- "
- @click="includePlaylist(playlist)"
- class="material-icons play-icon"
- :content="'Play songs from this playlist'"
- v-tippy
- >play_arrow</i
- >
- <confirm
- v-if="
- isOwnerOrAdmin() &&
- !isExcluded(playlist._id)
- "
- @confirm="blacklistPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Blacklist Playlist"
- v-tippy
- >block</i
- >
- </confirm>
- <confirm
- v-if="
- isOwnerOrAdmin() && isExcluded(playlist._id)
- "
- @confirm="removeExcludedPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Stop blacklisting songs from this playlist"
- v-tippy
- >
- stop
- </i>
- </confirm>
- <i
- v-if="playlist.createdBy === myUserId"
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="Edit Playlist"
- v-tippy
- >edit</i
- >
- <i
- v-if="
- playlist.createdBy !== myUserId &&
- (playlist.privacy === 'public' ||
- isAdmin())
- "
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="View Playlist"
- v-tippy
- >visibility</i
- >
- </div>
- </playlist-item>
- <button
- v-if="resultsLeftCount > 0"
- class="button is-primary load-more-button"
- @click="searchForPlaylists(search.page + 1)"
- >
- Load {{ nextPageResultsCount }} more results
- </button>
- </div>
- </div>
- <div
- v-if="station.type === 'community'"
- class="tab"
- v-show="tab === 'my-playlists'"
- >
- <button
- class="button is-primary"
- id="create-new-playlist-button"
- @click="openModal('createPlaylist')"
- >
- Create new playlist
- </button>
- <draggable
- class="menu-list scrollable-list"
- v-if="playlists.length > 0"
- v-model="playlists"
- v-bind="dragOptions"
- @start="drag = true"
- @end="drag = false"
- @change="savePlaylistOrder"
- >
- <transition-group
- type="transition"
- :name="!drag ? 'draggable-list-transition' : null"
- >
- <playlist-item
- class="item-draggable"
- v-for="playlist in playlists"
- :key="playlist._id"
- :playlist="playlist"
- >
- <i
- class="material-icons"
- slot="item-icon"
- v-if="
- isAllowedToParty() &&
- isSelected(playlist._id)
- "
- content="This playlist is currently selected"
- v-tippy
- >
- radio
- </i>
- <i
- class="material-icons"
- slot="item-icon"
- v-else-if="
- isOwnerOrAdmin() &&
- isPlaylistMode() &&
- isIncluded(playlist._id)
- "
- content="This playlist is currently included"
- v-tippy
- >
- play_arrow
- </i>
- <i
- class="material-icons excluded-icon"
- slot="item-icon"
- v-else-if="
- isOwnerOrAdmin() && isExcluded(playlist._id)
- "
- content="This playlist is currently excluded"
- v-tippy
- >
- block
- </i>
- <i
- class="material-icons"
- slot="item-icon"
- 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>
- <div slot="actions">
- <!-- <i
- v-if="isExcluded(playlist._id)"
- class="material-icons stop-icon"
- content="This playlist is blacklisted in this station"
- v-tippy="{ theme: 'info' }"
- >play_disabled</i
- > -->
- <i
- v-if="
- isPartyMode() &&
- !isSelected(playlist._id)
- "
- @click="selectPartyPlaylist(playlist)"
- class="material-icons play-icon"
- content="Request songs from this playlist"
- v-tippy
- >play_arrow</i
- >
- <i
- v-if="
- isPlaylistMode() &&
- isOwnerOrAdmin() &&
- !isSelected(playlist._id)
- "
- @click="includePlaylist(playlist)"
- class="material-icons play-icon"
- content="Play songs from this playlist"
- v-tippy
- >play_arrow</i
- >
- <confirm
- v-if="
- isPartyMode() &&
- isSelected(playlist._id)
- "
- @confirm="
- deselectPartyPlaylist(playlist._id)
- "
- >
- <i
- class="material-icons stop-icon"
- content="Stop requesting songs from this playlist"
- v-tippy
- >stop</i
- >
- </confirm>
- <confirm
- v-if="
- isPlaylistMode() &&
- isOwnerOrAdmin() &&
- isIncluded(playlist._id)
- "
- @confirm="
- removeIncludedPlaylist(playlist._id)
- "
- >
- <i
- class="material-icons stop-icon"
- content="Stop playing songs from this playlist"
- v-tippy
- >stop</i
- >
- </confirm>
- <confirm
- v-if="
- isOwnerOrAdmin() &&
- !isExcluded(playlist._id)
- "
- @confirm="blacklistPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Blacklist Playlist"
- v-tippy
- >block</i
- >
- </confirm>
- <confirm
- v-if="
- isOwnerOrAdmin() &&
- isExcluded(playlist._id)
- "
- @confirm="
- removeExcludedPlaylist(playlist._id)
- "
- >
- <i
- class="material-icons stop-icon"
- content="Stop blacklisting songs from this playlist"
- v-tippy
- >
- stop
- </i>
- </confirm>
- <i
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="Edit Playlist"
- v-tippy
- >edit</i
- >
- </div>
- </playlist-item>
- </transition-group>
- </draggable>
- <p v-else class="has-text-centered scrollable-list">
- You don't have any playlists!
- </p>
- </div>
- <div class="tab" v-show="tab === 'party'" v-if="isPartyMode()">
- <div v-if="partyPlaylists.length > 0">
- <playlist-item
- v-for="playlist in partyPlaylists"
- :key="`key-${playlist._id}`"
- :playlist="playlist"
- :show-owner="true"
- >
- <i
- class="material-icons"
- slot="item-icon"
- content="This playlist is currently selected"
- v-tippy
- >
- radio
- </i>
- <div class="icons-group" slot="actions">
- <confirm
- v-if="isOwnerOrAdmin()"
- @confirm="deselectPartyPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Stop playing songs from this playlist"
- v-tippy
- >
- stop
- </i>
- </confirm>
- <confirm
- v-if="isOwnerOrAdmin()"
- @confirm="blacklistPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Blacklist Playlist"
- v-tippy
- >block</i
- >
- </confirm>
- <i
- v-if="playlist.createdBy === myUserId"
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="Edit Playlist"
- v-tippy
- >edit</i
- >
- <i
- v-if="
- playlist.createdBy !== myUserId &&
- (playlist.privacy === 'public' ||
- isAdmin())
- "
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="View Playlist"
- v-tippy
- >visibility</i
- >
- </div>
- </playlist-item>
- </div>
- <p v-else class="has-text-centered scrollable-list">
- No playlists currently being played.
- </p>
- </div>
- <div
- class="tab"
- v-show="tab === 'included'"
- v-if="isPlaylistMode()"
- >
- <div v-if="includedPlaylists.length > 0">
- <playlist-item
- v-for="playlist in includedPlaylists"
- :key="`key-${playlist._id}`"
- :playlist="playlist"
- :show-owner="true"
- >
- <i
- class="material-icons"
- slot="item-icon"
- content="This playlist is currently included"
- v-tippy
- >
- play_arrow
- </i>
- <div class="icons-group" slot="actions">
- <confirm
- v-if="isOwnerOrAdmin()"
- @confirm="removeIncludedPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Stop playing songs from this playlist"
- v-tippy
- >
- stop
- </i>
- </confirm>
- <confirm
- v-if="isOwnerOrAdmin()"
- @confirm="blacklistPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Blacklist Playlist"
- v-tippy
- >block</i
- >
- </confirm>
- <i
- v-if="playlist.createdBy === myUserId"
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="Edit Playlist"
- v-tippy
- >edit</i
- >
- <i
- v-if="
- playlist.createdBy !== myUserId &&
- (playlist.privacy === 'public' ||
- isAdmin())
- "
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="View Playlist"
- v-tippy
- >visibility</i
- >
- </div>
- </playlist-item>
- </div>
- <p v-else class="has-text-centered scrollable-list">
- No playlists currently included.
- </p>
- </div>
- <div
- class="tab"
- v-show="tab === 'excluded'"
- v-if="isOwnerOrAdmin()"
- >
- <div v-if="excludedPlaylists.length > 0">
- <playlist-item
- :playlist="playlist"
- v-for="playlist in excludedPlaylists"
- :key="`key-${playlist._id}`"
- >
- <i
- class="material-icons excluded-icon"
- slot="item-icon"
- content="This playlist is currently excluded"
- v-tippy
- >
- block
- </i>
- <div class="icons-group" slot="actions">
- <confirm
- @confirm="removeExcludedPlaylist(playlist._id)"
- >
- <i
- class="material-icons stop-icon"
- content="Stop blacklisting songs from this playlist
- "
- v-tippy
- >stop</i
- >
- </confirm>
- <i
- v-if="playlist.createdBy === userId"
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="Edit Playlist"
- v-tippy
- >edit</i
- >
- <i
- v-else
- @click="showPlaylist(playlist._id)"
- class="material-icons edit-icon"
- content="View Playlist"
- v-tippy
- >visibility</i
- >
- </div>
- </playlist-item>
- </div>
- <p v-else class="has-text-centered scrollable-list">
- No playlists currently excluded.
- </p>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { mapActions, mapState, mapGetters } from "vuex";
- import Toast from "toasters";
- import PlaylistItem from "@/components/PlaylistItem.vue";
- import Confirm from "@/components/Confirm.vue";
- import SortablePlaylists from "@/mixins/SortablePlaylists.vue";
- export default {
- components: {
- PlaylistItem,
- Confirm
- },
- mixins: [SortablePlaylists],
- data() {
- return {
- tab: "included",
- search: {
- query: "",
- searchedQuery: "",
- page: 0,
- count: 0,
- resultsLeft: 0,
- results: []
- }
- };
- },
- computed: {
- resultsLeftCount() {
- return this.search.count - this.search.results.length;
- },
- nextPageResultsCount() {
- return Math.min(this.search.pageSize, this.resultsLeftCount);
- },
- ...mapState({
- loggedIn: state => state.user.auth.loggedIn,
- role: state => state.user.auth.role,
- userId: state => state.user.auth.userId,
- partyPlaylists: state => state.station.partyPlaylists
- }),
- ...mapState("modals/manageStation", {
- parentTab: state => state.tab,
- originalStation: state => state.originalStation,
- station: state => state.station,
- includedPlaylists: state => state.includedPlaylists,
- excludedPlaylists: state => state.excludedPlaylists,
- songsList: state => state.songsList
- }),
- ...mapGetters({
- socket: "websockets/getSocket"
- })
- },
- watch: {
- // eslint-disable-next-line func-names
- parentTab(value) {
- if (value === "playlists") {
- if (this.tab === "included" && this.isPartyMode()) {
- this.showTab("party");
- } else if (this.tab === "party" && this.isPlaylistMode()) {
- this.showTab("included");
- }
- }
- }
- },
- mounted() {
- if (this.station.type === "community" && this.station.partyMode)
- this.showTab("search");
- this.socket.dispatch("playlists.indexMyPlaylists", true, res => {
- if (res.status === "success") this.setPlaylists(res.data.playlists);
- this.orderOfPlaylists = this.calculatePlaylistOrder(); // order in regards to the database
- });
- this.socket.dispatch(
- `stations.getStationIncludedPlaylistsById`,
- this.station._id,
- res => {
- if (res.status === "success") {
- this.station.includedPlaylists = res.data.playlists;
- this.originalStation.includedPlaylists = res.data.playlists;
- }
- }
- );
- this.socket.dispatch(
- `stations.getStationExcludedPlaylistsById`,
- this.station._id,
- res => {
- if (res.status === "success") {
- this.station.excludedPlaylists = res.data.playlists;
- this.originalStation.excludedPlaylists = res.data.playlists;
- }
- }
- );
- },
- methods: {
- showTab(tab) {
- this.$refs[`${tab}-tab`].scrollIntoView();
- this.tab = tab;
- },
- isOwner() {
- return (
- this.loggedIn &&
- this.station &&
- this.userId === this.station.owner
- );
- },
- isAdmin() {
- return this.loggedIn && this.role === "admin";
- },
- isOwnerOrAdmin() {
- return this.isOwner() || this.isAdmin();
- },
- isPartyMode() {
- return (
- this.station &&
- this.station.type === "community" &&
- this.station.partyMode
- );
- },
- isAllowedToParty() {
- return (
- this.station &&
- this.isPartyMode() &&
- (!this.station.locked || this.isOwnerOrAdmin()) &&
- this.loggedIn
- );
- },
- isPlaylistMode() {
- return this.station && !this.isPartyMode();
- },
- showPlaylist(playlistId) {
- this.editPlaylist(playlistId);
- this.openModal("editPlaylist");
- },
- selectPartyPlaylist(playlist) {
- if (!this.isSelected(playlist.id)) {
- this.partyPlaylists.push(playlist);
- this.addPartyPlaylistSongToQueue();
- new Toast(
- "Successfully selected playlist to auto request songs."
- );
- } else {
- new Toast("Error: Playlist already selected.");
- }
- },
- includePlaylist(playlist) {
- this.socket.dispatch(
- "stations.includePlaylist",
- this.station._id,
- playlist._id,
- res => {
- new Toast(res.message);
- }
- );
- },
- deselectPartyPlaylist(id) {
- return new Promise(resolve => {
- let selected = false;
- this.partyPlaylists.forEach((playlist, index) => {
- if (playlist._id === id) {
- selected = true;
- this.partyPlaylists.splice(index, 1);
- }
- });
- if (selected) {
- new Toast("Successfully deselected playlist.");
- resolve();
- } else {
- new Toast("Playlist not selected.");
- resolve();
- }
- });
- },
- removeIncludedPlaylist(id) {
- return new Promise(resolve => {
- this.socket.dispatch(
- "stations.removeIncludedPlaylist",
- this.station._id,
- id,
- res => {
- new Toast(res.message);
- resolve();
- }
- );
- });
- },
- removeExcludedPlaylist(id) {
- return new Promise(resolve => {
- this.socket.dispatch(
- "stations.removeExcludedPlaylist",
- this.station._id,
- id,
- res => {
- new Toast(res.message);
- resolve();
- }
- );
- });
- },
- isSelected(id) {
- let selected = false;
- this.partyPlaylists.forEach(playlist => {
- if (playlist._id === id) selected = true;
- });
- return selected;
- },
- isIncluded(id) {
- let included = false;
- this.includedPlaylists.forEach(playlist => {
- if (playlist._id === id) included = true;
- });
- return included;
- },
- isExcluded(id) {
- let selected = false;
- this.excludedPlaylists.forEach(playlist => {
- if (playlist._id === id) selected = true;
- });
- return selected;
- },
- searchForPlaylists(page) {
- if (
- this.search.page >= page ||
- this.search.searchedQuery !== this.search.query
- ) {
- this.search.results = [];
- this.search.page = 0;
- this.search.count = 0;
- this.search.resultsLeft = 0;
- this.search.pageSize = 0;
- }
- const { query } = this.search;
- const action =
- this.station.type === "official"
- ? "playlists.searchOfficial"
- : "playlists.searchCommunity";
- this.search.searchedQuery = this.search.query;
- this.socket.dispatch(action, query, page, res => {
- const { data } = res;
- const { count, pageSize, playlists } = data;
- if (res.status === "success") {
- this.search.results = [
- ...this.search.results,
- ...playlists
- ];
- this.search.page = page;
- this.search.count = count;
- this.search.resultsLeft =
- count - this.search.results.length;
- this.search.pageSize = pageSize;
- } else if (res.status === "error") {
- this.search.results = [];
- this.search.page = 0;
- this.search.count = 0;
- this.search.resultsLeft = 0;
- this.search.pageSize = 0;
- new Toast(res.message);
- }
- });
- },
- async blacklistPlaylist(id) {
- if (this.isIncluded(id)) await this.removeIncludedPlaylist(id);
- this.socket.dispatch(
- "stations.excludePlaylist",
- this.station._id,
- id,
- res => {
- new Toast(res.message);
- }
- );
- },
- addPartyPlaylistSongToQueue() {
- let isInQueue = false;
- if (
- this.station.type === "community" &&
- this.station.partyMode === true
- ) {
- this.songsList.forEach(queueSong => {
- if (queueSong.requestedBy === this.userId) isInQueue = true;
- });
- if (!isInQueue && this.partyPlaylists) {
- const selectedPlaylist = this.partyPlaylists[
- Math.floor(Math.random() * this.partyPlaylists.length)
- ];
- if (
- selectedPlaylist._id &&
- selectedPlaylist.songs.length > 0
- ) {
- const selectedSong =
- selectedPlaylist.songs[
- Math.floor(
- Math.random() *
- selectedPlaylist.songs.length
- )
- ];
- if (selectedSong.youtubeId) {
- this.socket.dispatch(
- "stations.addToQueue",
- this.station._id,
- selectedSong.youtubeId,
- data => {
- if (data.status !== "success")
- new Toast("Error auto queueing song");
- }
- );
- }
- }
- }
- }
- },
- ...mapActions("station", ["updatePartyPlaylists"]),
- ...mapActions("modalVisibility", ["openModal"]),
- ...mapActions("user/playlists", ["editPlaylist", "setPlaylists"])
- }
- };
- </script>
- <style lang="scss" scoped>
- .excluded-icon {
- color: var(--red);
- }
- .included-icon {
- color: var(--green);
- }
- .selected-icon {
- color: var(--purple);
- }
- .station-playlists {
- .tabs-container {
- .tab-selection {
- display: flex;
- overflow-x: auto;
- .button {
- border-radius: 0;
- border: 0;
- text-transform: uppercase;
- font-size: 14px;
- color: var(--dark-grey-3);
- background-color: var(--light-grey-2);
- flex-grow: 1;
- height: 32px;
- &:not(:first-of-type) {
- margin-left: 5px;
- }
- }
- .selected {
- background-color: var(--primary-color) !important;
- color: var(--white) !important;
- font-weight: 600;
- }
- }
- .tab {
- padding: 15px 0;
- border-radius: 0;
- .playlist-item:not(:last-of-type),
- .item.item-draggable:not(:last-of-type) {
- margin-bottom: 10px;
- }
- .load-more-button {
- width: 100%;
- margin-top: 10px;
- }
- }
- }
- }
- .draggable-list-transition-move {
- transition: transform 0.5s;
- }
- .draggable-list-ghost {
- opacity: 0.5;
- filter: brightness(95%);
- }
- </style>
|