Playlists.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1. <template>
  2. <div class="station-playlists">
  3. <div class="tabs-container">
  4. <div class="tab-selection">
  5. <button
  6. class="button is-default"
  7. :class="{ selected: tab === 'search' }"
  8. @click="showTab('search')"
  9. >
  10. Search
  11. </button>
  12. <button
  13. v-if="station.type === 'community'"
  14. class="button is-default"
  15. :class="{ selected: tab === 'my-playlists' }"
  16. @click="showTab('my-playlists')"
  17. >
  18. My Playlists
  19. </button>
  20. <button
  21. class="button is-default"
  22. :class="{ selected: tab === 'party' }"
  23. v-if="station.type === 'community' && station.partyMode"
  24. @click="showTab('party')"
  25. >
  26. Party
  27. </button>
  28. <button
  29. class="button is-default"
  30. :class="{ selected: tab === 'included' }"
  31. v-if="!(station.type === 'community' && station.partyMode)"
  32. @click="showTab('included')"
  33. >
  34. Included
  35. </button>
  36. <button
  37. class="button is-default"
  38. :class="{ selected: tab === 'excluded' }"
  39. @click="showTab('excluded')"
  40. >
  41. Excluded
  42. </button>
  43. </div>
  44. <div class="tab" v-show="tab === 'search'">
  45. <label class="label"> Search for a public playlist </label>
  46. <div class="control is-grouped input-with-button">
  47. <p class="control is-expanded">
  48. <input
  49. class="input"
  50. type="text"
  51. placeholder="Enter your playlist query here..."
  52. v-model="search.query"
  53. @keyup.enter="searchForPlaylists(1)"
  54. />
  55. </p>
  56. <p class="control">
  57. <a class="button is-info" @click="searchForPlaylists(1)"
  58. ><i class="material-icons icon-with-button"
  59. >search</i
  60. >Search</a
  61. >
  62. </p>
  63. </div>
  64. <div v-if="search.results.length > 0">
  65. <playlist-item
  66. v-for="playlist in search.results"
  67. :key="`searchKey-${playlist._id}`"
  68. :playlist="playlist"
  69. :show-owner="true"
  70. >
  71. <div class="icons-group" slot="actions">
  72. <i
  73. v-if="isExcluded(playlist._id)"
  74. class="material-icons stop-icon"
  75. content="This playlist is blacklisted in this station"
  76. v-tippy
  77. >play_disabled</i
  78. >
  79. <confirm
  80. v-if="
  81. station.type === 'community' &&
  82. station.partyMode &&
  83. isSelected(playlist._id)
  84. "
  85. @confirm="deselectPartyPlaylist(playlist._id)"
  86. >
  87. <i
  88. class="material-icons stop-icon"
  89. content="Stop playing songs from this playlist"
  90. v-tippy
  91. >
  92. stop
  93. </i>
  94. </confirm>
  95. <confirm
  96. v-if="
  97. isOwnerOrAdmin() &&
  98. !(
  99. station.type === 'community' &&
  100. station.partyMode
  101. ) &&
  102. isIncluded(playlist._id)
  103. "
  104. @confirm="removeIncludedPlaylist(playlist._id)"
  105. >
  106. <i
  107. class="material-icons stop-icon"
  108. content="Stop playing songs from this playlist"
  109. v-tippy
  110. >
  111. stop
  112. </i>
  113. </confirm>
  114. <i
  115. v-if="
  116. station.type === 'community' &&
  117. station.partyMode &&
  118. !isSelected(playlist._id) &&
  119. !isExcluded(playlist._id)
  120. "
  121. @click="selectPartyPlaylist(playlist)"
  122. class="material-icons play-icon"
  123. content="Request songs from this playlist"
  124. v-tippy
  125. >play_arrow</i
  126. >
  127. <i
  128. v-if="
  129. isOwnerOrAdmin() &&
  130. !(
  131. station.type === 'community' &&
  132. station.partyMode
  133. ) &&
  134. !isIncluded(playlist._id) &&
  135. !isExcluded(playlist._id)
  136. "
  137. @click="includePlaylist(playlist)"
  138. class="material-icons play-icon"
  139. :content="'Play songs from this playlist'"
  140. v-tippy
  141. >play_arrow</i
  142. >
  143. <confirm
  144. v-if="
  145. isOwnerOrAdmin() &&
  146. !isExcluded(playlist._id)
  147. "
  148. @confirm="blacklistPlaylist(playlist._id)"
  149. >
  150. <i
  151. class="material-icons stop-icon"
  152. content="Blacklist Playlist"
  153. v-tippy
  154. >block</i
  155. >
  156. </confirm>
  157. <i
  158. v-if="playlist.createdBy === myUserId"
  159. @click="showPlaylist(playlist._id)"
  160. class="material-icons edit-icon"
  161. content="Edit Playlist"
  162. v-tippy
  163. >edit</i
  164. >
  165. <i
  166. v-if="
  167. playlist.createdBy !== myUserId &&
  168. (playlist.privacy === 'public' ||
  169. isAdmin())
  170. "
  171. @click="showPlaylist(playlist._id)"
  172. class="material-icons edit-icon"
  173. content="View Playlist"
  174. v-tippy
  175. >visibility</i
  176. >
  177. </div>
  178. </playlist-item>
  179. <button
  180. v-if="resultsLeftCount > 0"
  181. class="button is-primary load-more-button"
  182. @click="searchForPlaylists(search.page + 1)"
  183. >
  184. Load {{ nextPageResultsCount }} more results
  185. </button>
  186. </div>
  187. </div>
  188. <div
  189. v-if="station.type === 'community'"
  190. class="tab"
  191. v-show="tab === 'my-playlists'"
  192. >
  193. <button
  194. class="button is-primary"
  195. id="create-new-playlist-button"
  196. @click="openModal('createPlaylist')"
  197. >
  198. Create new playlist
  199. </button>
  200. <draggable
  201. class="menu-list scrollable-list"
  202. v-if="playlists.length > 0"
  203. v-model="playlists"
  204. v-bind="dragOptions"
  205. @start="drag = true"
  206. @end="drag = false"
  207. @change="savePlaylistOrder"
  208. >
  209. <transition-group
  210. type="transition"
  211. :name="!drag ? 'draggable-list-transition' : null"
  212. >
  213. <playlist-item
  214. class="item-draggable"
  215. v-for="playlist in playlists"
  216. :key="playlist._id"
  217. :playlist="playlist"
  218. >
  219. <div slot="actions">
  220. <i
  221. v-if="isExcluded(playlist._id)"
  222. class="material-icons stop-icon"
  223. content="This playlist is blacklisted in this station"
  224. v-tippy
  225. >play_disabled</i
  226. >
  227. <i
  228. v-if="
  229. station.type === 'community' &&
  230. station.partyMode &&
  231. !isSelected(playlist._id) &&
  232. !isExcluded(playlist._id)
  233. "
  234. @click="selectPartyPlaylist(playlist)"
  235. class="material-icons play-icon"
  236. content="Request songs from this playlist"
  237. v-tippy
  238. >play_arrow</i
  239. >
  240. <i
  241. v-if="
  242. station.type === 'community' &&
  243. isOwnerOrAdmin() &&
  244. !station.partyMode &&
  245. !isSelected(playlist._id) &&
  246. !isExcluded(playlist._id)
  247. "
  248. @click="includePlaylist(playlist)"
  249. class="material-icons play-icon"
  250. content="Play songs from this playlist"
  251. v-tippy
  252. >play_arrow</i
  253. >
  254. <confirm
  255. v-if="
  256. station.type === 'community' &&
  257. station.partyMode &&
  258. isSelected(playlist._id)
  259. "
  260. @confirm="
  261. deselectPartyPlaylist(playlist._id)
  262. "
  263. >
  264. <i
  265. class="material-icons stop-icon"
  266. content="Stop requesting songs from this playlist"
  267. v-tippy
  268. >stop</i
  269. >
  270. </confirm>
  271. <confirm
  272. v-if="
  273. station.type === 'community' &&
  274. isOwnerOrAdmin() &&
  275. !station.partyMode &&
  276. isIncluded(playlist._id)
  277. "
  278. @confirm="
  279. removeIncludedPlaylist(playlist._id)
  280. "
  281. >
  282. <i
  283. class="material-icons stop-icon"
  284. content="Stop playing songs from this playlist"
  285. v-tippy
  286. >stop</i
  287. >
  288. </confirm>
  289. <confirm
  290. v-if="
  291. isOwnerOrAdmin() &&
  292. !isExcluded(playlist._id)
  293. "
  294. @confirm="blacklistPlaylist(playlist._id)"
  295. >
  296. <i
  297. class="material-icons stop-icon"
  298. content="Blacklist Playlist"
  299. v-tippy
  300. >block</i
  301. >
  302. </confirm>
  303. <i
  304. @click="showPlaylist(playlist._id)"
  305. class="material-icons edit-icon"
  306. content="Edit Playlist"
  307. v-tippy
  308. >edit</i
  309. >
  310. </div>
  311. </playlist-item>
  312. </transition-group>
  313. </draggable>
  314. <p v-else class="has-text-centered scrollable-list">
  315. You don't have any playlists!
  316. </p>
  317. </div>
  318. <div
  319. class="tab"
  320. v-show="tab === 'party'"
  321. v-if="station.type === 'community' && station.partyMode"
  322. >
  323. <div v-if="partyPlaylists.length > 0">
  324. <playlist-item
  325. v-for="playlist in partyPlaylists"
  326. :key="`key-${playlist._id}`"
  327. :playlist="playlist"
  328. :show-owner="true"
  329. >
  330. <div class="icons-group" slot="actions">
  331. <confirm
  332. v-if="isOwnerOrAdmin()"
  333. @confirm="deselectPartyPlaylist(playlist._id)"
  334. >
  335. <i
  336. class="material-icons stop-icon"
  337. content="Stop playing songs from this playlist"
  338. v-tippy
  339. >
  340. stop
  341. </i>
  342. </confirm>
  343. <confirm
  344. v-if="isOwnerOrAdmin()"
  345. @confirm="blacklistPlaylist(playlist._id)"
  346. >
  347. <i
  348. class="material-icons stop-icon"
  349. content="Blacklist Playlist"
  350. v-tippy
  351. >block</i
  352. >
  353. </confirm>
  354. <i
  355. v-if="playlist.createdBy === myUserId"
  356. @click="showPlaylist(playlist._id)"
  357. class="material-icons edit-icon"
  358. content="Edit Playlist"
  359. v-tippy
  360. >edit</i
  361. >
  362. <i
  363. v-if="
  364. playlist.createdBy !== myUserId &&
  365. (playlist.privacy === 'public' ||
  366. isAdmin())
  367. "
  368. @click="showPlaylist(playlist._id)"
  369. class="material-icons edit-icon"
  370. content="View Playlist"
  371. v-tippy
  372. >visibility</i
  373. >
  374. </div>
  375. </playlist-item>
  376. </div>
  377. <p v-else class="has-text-centered scrollable-list">
  378. No playlists currently being played.
  379. </p>
  380. </div>
  381. <div
  382. class="tab"
  383. v-show="tab === 'included'"
  384. v-if="!(station.type === 'community' && station.partyMode)"
  385. >
  386. <div v-if="includedPlaylists.length > 0">
  387. <playlist-item
  388. v-for="playlist in includedPlaylists"
  389. :key="`key-${playlist._id}`"
  390. :playlist="playlist"
  391. :show-owner="true"
  392. >
  393. <div class="icons-group" slot="actions">
  394. <confirm
  395. v-if="isOwnerOrAdmin()"
  396. @confirm="removeIncludedPlaylist(playlist._id)"
  397. >
  398. <i
  399. class="material-icons stop-icon"
  400. content="Stop playing songs from this playlist"
  401. v-tippy
  402. >
  403. stop
  404. </i>
  405. </confirm>
  406. <confirm
  407. v-if="isOwnerOrAdmin()"
  408. @confirm="blacklistPlaylist(playlist._id)"
  409. >
  410. <i
  411. class="material-icons stop-icon"
  412. content="Blacklist Playlist"
  413. v-tippy
  414. >block</i
  415. >
  416. </confirm>
  417. <i
  418. v-if="playlist.createdBy === myUserId"
  419. @click="showPlaylist(playlist._id)"
  420. class="material-icons edit-icon"
  421. content="Edit Playlist"
  422. v-tippy
  423. >edit</i
  424. >
  425. <i
  426. v-if="
  427. playlist.createdBy !== myUserId &&
  428. (playlist.privacy === 'public' ||
  429. isAdmin())
  430. "
  431. @click="showPlaylist(playlist._id)"
  432. class="material-icons edit-icon"
  433. content="View Playlist"
  434. v-tippy
  435. >visibility</i
  436. >
  437. </div>
  438. </playlist-item>
  439. </div>
  440. <p v-else class="has-text-centered scrollable-list">
  441. No playlists currently included.
  442. </p>
  443. </div>
  444. <div class="tab" v-show="tab === 'excluded'">
  445. <div v-if="excludedPlaylists.length > 0">
  446. <playlist-item
  447. :playlist="playlist"
  448. v-for="playlist in excludedPlaylists"
  449. :key="`key-${playlist._id}`"
  450. >
  451. <div class="icons-group" slot="actions">
  452. <confirm
  453. @confirm="removeExcludedPlaylist(playlist._id)"
  454. >
  455. <i
  456. class="material-icons stop-icon"
  457. content="Stop blacklisting songs from this playlist
  458. "
  459. v-tippy
  460. >stop</i
  461. >
  462. </confirm>
  463. <i
  464. v-if="playlist.createdBy === userId"
  465. @click="showPlaylist(playlist._id)"
  466. class="material-icons edit-icon"
  467. content="Edit Playlist"
  468. v-tippy
  469. >edit</i
  470. >
  471. <i
  472. v-else
  473. @click="showPlaylist(playlist._id)"
  474. class="material-icons edit-icon"
  475. content="View Playlist"
  476. v-tippy
  477. >visibility</i
  478. >
  479. </div>
  480. </playlist-item>
  481. </div>
  482. <p v-else class="has-text-centered scrollable-list">
  483. No playlists currently excluded.
  484. </p>
  485. </div>
  486. </div>
  487. </div>
  488. </template>
  489. <script>
  490. import { mapActions, mapState, mapGetters } from "vuex";
  491. import Toast from "toasters";
  492. import PlaylistItem from "@/components/PlaylistItem.vue";
  493. import Confirm from "@/components/Confirm.vue";
  494. import SortablePlaylists from "@/mixins/SortablePlaylists.vue";
  495. export default {
  496. components: {
  497. PlaylistItem,
  498. Confirm
  499. },
  500. mixins: [SortablePlaylists],
  501. data() {
  502. return {
  503. tab: "included",
  504. search: {
  505. query: "",
  506. searchedQuery: "",
  507. page: 0,
  508. count: 0,
  509. resultsLeft: 0,
  510. results: []
  511. }
  512. };
  513. },
  514. computed: {
  515. resultsLeftCount() {
  516. return this.search.count - this.search.results.length;
  517. },
  518. nextPageResultsCount() {
  519. return Math.min(this.search.pageSize, this.resultsLeftCount);
  520. },
  521. ...mapState({
  522. loggedIn: state => state.user.auth.loggedIn,
  523. role: state => state.user.auth.role,
  524. userId: state => state.user.auth.userId,
  525. partyPlaylists: state => state.station.partyPlaylists
  526. }),
  527. ...mapState("modals/manageStation", {
  528. originalStation: state => state.originalStation,
  529. station: state => state.station,
  530. includedPlaylists: state => state.includedPlaylists,
  531. excludedPlaylists: state => state.excludedPlaylists,
  532. songsList: state => state.songsList
  533. }),
  534. ...mapGetters({
  535. socket: "websockets/getSocket"
  536. })
  537. },
  538. mounted() {
  539. if (this.station.type === "community" && this.station.partyMode)
  540. this.showTab("search");
  541. this.socket.dispatch("playlists.indexMyPlaylists", true, res => {
  542. if (res.status === "success") this.setPlaylists(res.data.playlists);
  543. this.orderOfPlaylists = this.calculatePlaylistOrder(); // order in regards to the database
  544. });
  545. this.socket.dispatch(
  546. `stations.getStationIncludedPlaylistsById`,
  547. this.station._id,
  548. res => {
  549. if (res.status === "success") {
  550. this.station.includedPlaylists = res.data.playlists;
  551. this.originalStation.includedPlaylists = res.data.playlists;
  552. }
  553. }
  554. );
  555. this.socket.dispatch(
  556. `stations.getStationExcludedPlaylistsById`,
  557. this.station._id,
  558. res => {
  559. if (res.status === "success") {
  560. this.station.excludedPlaylists = res.data.playlists;
  561. this.originalStation.excludedPlaylists = res.data.playlists;
  562. }
  563. }
  564. );
  565. },
  566. methods: {
  567. showTab(tab) {
  568. this.tab = tab;
  569. },
  570. isOwner() {
  571. return this.loggedIn && this.userId === this.station.owner;
  572. },
  573. isAdmin() {
  574. return this.loggedIn && this.role === "admin";
  575. },
  576. isOwnerOrAdmin() {
  577. return this.isOwner() || this.isAdmin();
  578. },
  579. showPlaylist(playlistId) {
  580. this.editPlaylist(playlistId);
  581. this.openModal("editPlaylist");
  582. },
  583. selectPartyPlaylist(playlist) {
  584. if (!this.isSelected(playlist.id)) {
  585. this.partyPlaylists.push(playlist);
  586. this.addPartyPlaylistSongToQueue();
  587. new Toast(
  588. "Successfully selected playlist to auto request songs."
  589. );
  590. } else {
  591. new Toast("Error: Playlist already selected.");
  592. }
  593. },
  594. includePlaylist(playlist) {
  595. this.socket.dispatch(
  596. "stations.includePlaylist",
  597. this.station._id,
  598. playlist._id,
  599. res => {
  600. new Toast(res.message);
  601. }
  602. );
  603. },
  604. deselectPartyPlaylist(id) {
  605. return new Promise(resolve => {
  606. let selected = false;
  607. this.partyPlaylists.forEach((playlist, index) => {
  608. if (playlist._id === id) {
  609. selected = true;
  610. this.partyPlaylists.splice(index, 1);
  611. }
  612. });
  613. if (selected) {
  614. new Toast("Successfully deselected playlist.");
  615. resolve();
  616. } else {
  617. new Toast("Playlist not selected.");
  618. resolve();
  619. }
  620. });
  621. },
  622. removeIncludedPlaylist(id) {
  623. return new Promise(resolve => {
  624. this.socket.dispatch(
  625. "stations.removeIncludedPlaylist",
  626. this.station._id,
  627. id,
  628. res => {
  629. new Toast(res.message);
  630. resolve();
  631. }
  632. );
  633. });
  634. },
  635. removeExcludedPlaylist(id) {
  636. return new Promise(resolve => {
  637. this.socket.dispatch(
  638. "stations.removeExcludedPlaylist",
  639. this.station._id,
  640. id,
  641. res => {
  642. new Toast(res.message);
  643. resolve();
  644. }
  645. );
  646. });
  647. },
  648. isSelected(id) {
  649. let selected = false;
  650. this.partyPlaylists.forEach(playlist => {
  651. if (playlist._id === id) selected = true;
  652. });
  653. return selected;
  654. },
  655. isIncluded(id) {
  656. let included = false;
  657. this.includedPlaylists.forEach(playlist => {
  658. if (playlist._id === id) included = true;
  659. });
  660. return included;
  661. },
  662. isExcluded(id) {
  663. let selected = false;
  664. this.excludedPlaylists.forEach(playlist => {
  665. if (playlist._id === id) selected = true;
  666. });
  667. return selected;
  668. },
  669. searchForPlaylists(page) {
  670. if (
  671. this.search.page >= page ||
  672. this.search.searchedQuery !== this.search.query
  673. ) {
  674. this.search.results = [];
  675. this.search.page = 0;
  676. this.search.count = 0;
  677. this.search.resultsLeft = 0;
  678. this.search.pageSize = 0;
  679. }
  680. const { query } = this.search;
  681. const action =
  682. this.station.type === "official"
  683. ? "playlists.searchOfficial"
  684. : "playlists.searchCommunity";
  685. this.search.searchedQuery = this.search.query;
  686. this.socket.dispatch(action, query, page, res => {
  687. const { data } = res;
  688. const { count, pageSize, playlists } = data;
  689. if (res.status === "success") {
  690. this.search.results = [
  691. ...this.search.results,
  692. ...playlists
  693. ];
  694. this.search.page = page;
  695. this.search.count = count;
  696. this.search.resultsLeft =
  697. count - this.search.results.length;
  698. this.search.pageSize = pageSize;
  699. } else if (res.status === "error") {
  700. this.search.results = [];
  701. this.search.page = 0;
  702. this.search.count = 0;
  703. this.search.resultsLeft = 0;
  704. this.search.pageSize = 0;
  705. new Toast(res.message);
  706. }
  707. });
  708. },
  709. async blacklistPlaylist(id) {
  710. if (this.isIncluded(id)) await this.removeIncludedPlaylist(id);
  711. this.socket.dispatch(
  712. "stations.excludePlaylist",
  713. this.station._id,
  714. id,
  715. res => {
  716. new Toast(res.message);
  717. }
  718. );
  719. },
  720. addPartyPlaylistSongToQueue() {
  721. let isInQueue = false;
  722. if (
  723. this.station.type === "community" &&
  724. this.station.partyMode === true
  725. ) {
  726. this.songsList.forEach(queueSong => {
  727. if (queueSong.requestedBy === this.userId) isInQueue = true;
  728. });
  729. if (!isInQueue && this.partyPlaylists) {
  730. const selectedPlaylist = this.partyPlaylists[
  731. Math.floor(Math.random() * this.partyPlaylists.length)
  732. ];
  733. if (
  734. selectedPlaylist._id &&
  735. selectedPlaylist.songs.length > 0
  736. ) {
  737. const selectedSong =
  738. selectedPlaylist.songs[
  739. Math.floor(
  740. Math.random() *
  741. selectedPlaylist.songs.length
  742. )
  743. ];
  744. if (selectedSong.youtubeId) {
  745. this.socket.dispatch(
  746. "stations.addToQueue",
  747. this.station._id,
  748. selectedSong.youtubeId,
  749. data => {
  750. if (data.status !== "success")
  751. new Toast("Error auto queueing song");
  752. }
  753. );
  754. }
  755. }
  756. }
  757. }
  758. },
  759. ...mapActions("station", ["updatePartyPlaylists"]),
  760. ...mapActions("modalVisibility", ["openModal"]),
  761. ...mapActions("user/playlists", ["editPlaylist", "setPlaylists"])
  762. }
  763. };
  764. </script>
  765. <style lang="scss" scoped>
  766. .station-playlists {
  767. .tabs-container {
  768. .tab-selection {
  769. display: flex;
  770. overflow-x: auto;
  771. .button {
  772. border-radius: 0;
  773. border: 0;
  774. text-transform: uppercase;
  775. font-size: 14px;
  776. color: var(--dark-grey-3);
  777. background-color: var(--light-grey-2);
  778. flex-grow: 1;
  779. height: 32px;
  780. &:not(:first-of-type) {
  781. margin-left: 5px;
  782. }
  783. }
  784. .selected {
  785. background-color: var(--primary-color) !important;
  786. color: var(--white) !important;
  787. font-weight: 600;
  788. }
  789. }
  790. .tab {
  791. padding: 15px 0;
  792. border-radius: 0;
  793. .playlist-item:not(:last-of-type),
  794. .item.item-draggable:not(:last-of-type) {
  795. margin-bottom: 10px;
  796. }
  797. .load-more-button {
  798. width: 100%;
  799. margin-top: 10px;
  800. }
  801. }
  802. }
  803. }
  804. .draggable-list-transition-move {
  805. transition: transform 0.5s;
  806. }
  807. .draggable-list-ghost {
  808. opacity: 0.5;
  809. filter: brightness(95%);
  810. }
  811. </style>