ImportAlbum.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941
  1. <template>
  2. <div>
  3. <modal title="Import Album" class="import-album-modal">
  4. <template #body>
  5. <div class="search-discogs-album">
  6. <p class="control is-expanded">
  7. <label class="label">Search query</label>
  8. <input
  9. class="input"
  10. type="text"
  11. ref="discogs-input"
  12. v-model="discogsQuery"
  13. @keyup.enter="searchDiscogsForPage(1)"
  14. @change="onDiscogsQueryChange"
  15. v-focus
  16. />
  17. </p>
  18. <button
  19. class="button is-fullwidth is-info"
  20. @click="searchDiscogsForPage(1)"
  21. >
  22. Search
  23. </button>
  24. <button
  25. class="button is-fullwidth is-danger"
  26. @click="clearDiscogsResults()"
  27. >
  28. Clear
  29. </button>
  30. <label class="label" v-if="discogs.apiResults.length > 0"
  31. >API results</label
  32. >
  33. <div
  34. class="api-results-container"
  35. v-if="discogs.apiResults.length > 0"
  36. >
  37. <div
  38. class="api-result"
  39. v-for="(result, index) in discogs.apiResults"
  40. :key="result.album.id"
  41. tabindex="0"
  42. @keydown.space.prevent
  43. @keyup.enter="toggleAPIResult(index)"
  44. >
  45. <div class="top-container">
  46. <img :src="result.album.albumArt" />
  47. <div class="right-container">
  48. <p class="album-title">
  49. {{ result.album.title }}
  50. </p>
  51. <div class="bottom-row">
  52. <img
  53. src="/assets/arrow_up.svg"
  54. v-if="result.expanded"
  55. @click="toggleAPIResult(index)"
  56. />
  57. <img
  58. src="/assets/arrow_down.svg"
  59. v-if="!result.expanded"
  60. @click="toggleAPIResult(index)"
  61. />
  62. <p class="type-year">
  63. <span>{{ result.album.type }}</span>
  64. <span>{{ result.album.year }}</span>
  65. </p>
  66. </div>
  67. </div>
  68. </div>
  69. <div
  70. class="bottom-container"
  71. v-if="result.expanded"
  72. >
  73. <p class="bottom-container-field">
  74. Artists:
  75. <span>{{
  76. result.album.artists.join(", ")
  77. }}</span>
  78. </p>
  79. <p class="bottom-container-field">
  80. Genres:
  81. <span>{{
  82. result.album.genres.join(", ")
  83. }}</span>
  84. </p>
  85. <p class="bottom-container-field">
  86. Data quality:
  87. <span>{{ result.dataQuality }}</span>
  88. </p>
  89. <button
  90. class="button is-primary"
  91. @click="selectAlbum(result)"
  92. >
  93. Import album
  94. </button>
  95. <div class="tracks">
  96. <div
  97. class="track"
  98. v-for="track in result.tracks"
  99. :key="`${track.position}-${track.title}`"
  100. >
  101. <span>{{ track.position }}.</span>
  102. <p>{{ track.title }}</p>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. <button
  109. v-if="
  110. discogs.apiResults.length > 0 &&
  111. !discogs.disableLoadMore &&
  112. discogs.page < discogs.pages
  113. "
  114. class="button is-fullwidth is-info discogs-load-more"
  115. @click="loadNextDiscogsPage()"
  116. >
  117. Load more...
  118. </button>
  119. </div>
  120. <div
  121. class="discogs-album"
  122. v-if="discogsAlbum && discogsAlbum.album"
  123. >
  124. <div class="top-container">
  125. <img :src="discogsAlbum.album.albumArt" />
  126. <div class="right-container">
  127. <p class="album-title">
  128. {{ discogsAlbum.album.title }}
  129. </p>
  130. <div class="bottom-row">
  131. <img
  132. src="/assets/arrow_up.svg"
  133. v-if="discogsAlbum.expanded"
  134. @click="toggleDiscogsAlbum()"
  135. />
  136. <img
  137. src="/assets/arrow_down.svg"
  138. v-if="!discogsAlbum.expanded"
  139. @click="toggleDiscogsAlbum()"
  140. />
  141. <p class="type-year">
  142. <span>{{ discogsAlbum.album.type }}</span>
  143. <span>{{ discogsAlbum.album.year }}</span>
  144. </p>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="bottom-container" v-if="discogsAlbum.expanded">
  149. <p class="bottom-container-field">
  150. Artists:
  151. <span>{{
  152. discogsAlbum.album.artists.join(", ")
  153. }}</span>
  154. </p>
  155. <p class="bottom-container-field">
  156. Genres:
  157. <span>{{
  158. discogsAlbum.album.genres.join(", ")
  159. }}</span>
  160. </p>
  161. <p class="bottom-container-field">
  162. Data quality:
  163. <span>{{ discogsAlbum.dataQuality }}</span>
  164. </p>
  165. <div class="tracks">
  166. <div
  167. class="track"
  168. tabindex="0"
  169. v-for="track in discogsAlbum.tracks"
  170. :key="`${track.position}-${track.title}`"
  171. >
  172. <span>{{ track.position }}.</span>
  173. <p>{{ track.title }}</p>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. <div class="break"></div>
  179. <div
  180. class="import-youtube-playlist"
  181. v-if="discogsAlbum && discogsAlbum.album"
  182. >
  183. <p class="control is-expanded">
  184. <input
  185. class="input"
  186. type="text"
  187. placeholder="Enter YouTube Playlist URL here..."
  188. v-model="search.playlist.query"
  189. @keyup.enter="importPlaylist()"
  190. />
  191. </p>
  192. <button
  193. class="button is-fullwidth is-info"
  194. @click="importPlaylist()"
  195. >
  196. <i class="material-icons icon-with-button">publish</i
  197. >Import
  198. </button>
  199. <button
  200. class="button is-fullwidth is-danger"
  201. @click="resetTrackSongs()"
  202. >
  203. Reset
  204. </button>
  205. <draggable
  206. v-if="playlistSongs.length > 0"
  207. group="songs"
  208. v-model="playlistSongs"
  209. item-key="_id"
  210. @start="drag = true"
  211. @end="drag = false"
  212. @change="log"
  213. >
  214. <template #item="{ element }">
  215. <song-item
  216. :key="`playlist-song-${element._id}`"
  217. :song="element"
  218. >
  219. </song-item>
  220. </template>
  221. </draggable>
  222. </div>
  223. <div
  224. class="track-boxes"
  225. v-if="discogsAlbum && discogsAlbum.album"
  226. >
  227. <div
  228. class="track-box"
  229. v-for="(track, index) in discogsAlbum.tracks"
  230. :key="`${track.position}-${track.title}`"
  231. >
  232. <div class="track-position-title">
  233. <span>{{ track.position }}.</span>
  234. <p>{{ track.title }}</p>
  235. </div>
  236. <draggable
  237. class="track-box-songs-drag-area"
  238. group="songs"
  239. v-model="trackSongs[index]"
  240. item-key="_id"
  241. @start="drag = true"
  242. @end="drag = false"
  243. @change="log"
  244. >
  245. <template #item="{ element }">
  246. <song-item
  247. :key="`track-song-${element._id}`"
  248. :song="element"
  249. >
  250. </song-item>
  251. </template>
  252. </draggable>
  253. </div>
  254. </div>
  255. </template>
  256. <template #footer>
  257. <button class="button is-primary" @click="tryToAutoMove()">
  258. Try to auto move
  259. </button>
  260. <button class="button is-primary" @click="editSongs()">
  261. Edit songs
  262. </button>
  263. </template>
  264. </modal>
  265. </div>
  266. </template>
  267. <script>
  268. import { mapState, mapGetters, mapActions } from "vuex";
  269. import draggable from "vuedraggable";
  270. import Toast from "toasters";
  271. import Modal from "../Modal.vue";
  272. import SongItem from "../SongItem.vue";
  273. export default {
  274. components: { Modal, SongItem, draggable },
  275. props: {
  276. sector: { type: String, default: "admin" }
  277. },
  278. data() {
  279. return {
  280. stuff: false,
  281. isImportingPlaylist: false,
  282. trackSongs: [],
  283. songsToEdit: [],
  284. currentEditSongIndex: 0,
  285. search: {
  286. playlist: {
  287. query: ""
  288. }
  289. },
  290. discogsQuery: "",
  291. discogs: {
  292. apiResults: [],
  293. page: 1,
  294. pages: 1,
  295. disableLoadMore: false
  296. }
  297. };
  298. },
  299. computed: {
  300. playlistSongs: {
  301. get() {
  302. return this.$store.state.modals.importAlbum.playlistSongs;
  303. },
  304. set(playlistSongs) {
  305. this.$store.commit(
  306. "modals/importAlbum/updatePlaylistSongs",
  307. playlistSongs
  308. );
  309. }
  310. },
  311. ...mapState("modals/importAlbum", {
  312. discogsAlbum: state => state.discogsAlbum,
  313. editingSongs: state => state.editingSongs
  314. }),
  315. ...mapState("modalVisibility", {
  316. modals: state => state.modals
  317. }),
  318. ...mapGetters({
  319. socket: "websockets/getSocket"
  320. })
  321. },
  322. watch: {
  323. /* eslint-disable */
  324. "modals.editSong": function (value) {
  325. if (!value) this.editNextSong();
  326. }
  327. /* eslint-enable */
  328. },
  329. beforeUnmount() {
  330. this.selectDiscogsAlbum({});
  331. this.setPlaylistSongs([]);
  332. },
  333. methods: {
  334. editSongs() {
  335. this.updateEditingSongs(true);
  336. this.songsToEdit = [];
  337. this.trackSongs.forEach((songs, index) => {
  338. songs.forEach(song => {
  339. const discogsAlbum = JSON.parse(
  340. JSON.stringify(this.discogsAlbum)
  341. );
  342. discogsAlbum.track = discogsAlbum.tracks[index];
  343. delete discogsAlbum.tracks;
  344. delete discogsAlbum.expanded;
  345. delete discogsAlbum.gotMoreInfo;
  346. this.songsToEdit.push({
  347. songId: song._id,
  348. discogs: discogsAlbum
  349. });
  350. });
  351. });
  352. this.editNextSong();
  353. },
  354. editNextSong() {
  355. if (this.editingSongs) {
  356. this.editSong({
  357. _id: this.songsToEdit[this.currentEditSongIndex].songId,
  358. discogs: this.songsToEdit[this.currentEditSongIndex].discogs
  359. });
  360. this.currentEditSongIndex += 1;
  361. this.openModal("editSong");
  362. }
  363. },
  364. log(evt) {
  365. window.console.log(evt);
  366. },
  367. importPlaylist() {
  368. if (this.isImportingPlaylist)
  369. return new Toast("A playlist is already importing.");
  370. this.isImportingPlaylist = true;
  371. // import query is blank
  372. if (!this.search.playlist.query)
  373. return new Toast("Please enter a YouTube playlist URL.");
  374. const regex = new RegExp(`[\\?&]list=([^&#]*)`);
  375. const splitQuery = regex.exec(this.search.playlist.query);
  376. if (!splitQuery) {
  377. return new Toast({
  378. content: "Please enter a valid YouTube playlist URL.",
  379. timeout: 4000
  380. });
  381. }
  382. // don't give starting import message instantly in case of instant error
  383. setTimeout(() => {
  384. if (this.isImportingPlaylist) {
  385. new Toast(
  386. "Starting to import your playlist. This can take some time to do."
  387. );
  388. }
  389. }, 750);
  390. return this.socket.dispatch(
  391. "songs.requestSet",
  392. this.search.playlist.query,
  393. false,
  394. true,
  395. res => {
  396. this.isImportingPlaylist = false;
  397. const songs = res.songs.filter(
  398. song => song.status !== "verified"
  399. );
  400. const songsAlreadyVerified =
  401. res.songs.length - songs.length;
  402. this.setPlaylistSongs(songs);
  403. this.trackSongs = this.discogsAlbum.tracks.map(() => []);
  404. this.tryToAutoMove();
  405. if (songsAlreadyVerified > 0)
  406. new Toast(
  407. `${songsAlreadyVerified} songs were already verified, skipping those.`
  408. );
  409. return new Toast({ content: res.message, timeout: 20000 });
  410. }
  411. );
  412. },
  413. tryToAutoMove() {
  414. const { tracks } = this.discogsAlbum;
  415. const { trackSongs } = this;
  416. const playlistSongs = JSON.parse(
  417. JSON.stringify(this.playlistSongs)
  418. );
  419. tracks.forEach((track, index) => {
  420. playlistSongs.forEach(playlistSong => {
  421. if (
  422. playlistSong.title
  423. .toLowerCase()
  424. .trim()
  425. .indexOf(track.title.toLowerCase().trim()) !== -1
  426. ) {
  427. playlistSongs.splice(
  428. playlistSongs.indexOf(playlistSong),
  429. 1
  430. );
  431. trackSongs[index].push(playlistSong);
  432. }
  433. });
  434. });
  435. this.updatePlaylistSongs(playlistSongs);
  436. },
  437. resetTrackSongs() {
  438. this.resetPlaylistSongs();
  439. this.trackSongs = this.discogsAlbum.tracks.map(() => []);
  440. },
  441. selectAlbum(result) {
  442. this.selectDiscogsAlbum(result);
  443. this.clearDiscogsResults();
  444. },
  445. toggleAPIResult(index) {
  446. const apiResult = this.discogs.apiResults[index];
  447. if (apiResult.expanded === true) apiResult.expanded = false;
  448. else if (apiResult.gotMoreInfo === true) apiResult.expanded = true;
  449. else {
  450. fetch(apiResult.album.resourceUrl)
  451. .then(response => response.json())
  452. .then(data => {
  453. apiResult.album.artists = [];
  454. apiResult.album.artistIds = [];
  455. const artistRegex = new RegExp(" \\([0-9]+\\)$");
  456. apiResult.dataQuality = data.data_quality;
  457. data.artists.forEach(artist => {
  458. apiResult.album.artists.push(
  459. artist.name.replace(artistRegex, "")
  460. );
  461. apiResult.album.artistIds.push(artist.id);
  462. });
  463. apiResult.tracks = data.tracklist.map(track => ({
  464. position: track.position,
  465. title: track.title
  466. }));
  467. apiResult.expanded = true;
  468. apiResult.gotMoreInfo = true;
  469. });
  470. }
  471. },
  472. clearDiscogsResults() {
  473. this.discogs.apiResults = [];
  474. this.discogs.page = 1;
  475. this.discogs.pages = 1;
  476. this.discogs.disableLoadMore = false;
  477. },
  478. searchDiscogsForPage(page) {
  479. const query = this.discogsQuery;
  480. this.socket.dispatch("apis.searchDiscogs", query, page, res => {
  481. if (res.status === "success") {
  482. if (page === 1)
  483. new Toast(
  484. `Successfully searched. Got ${res.data.results.length} results.`
  485. );
  486. else
  487. new Toast(
  488. `Successfully got ${res.data.results.length} more results.`
  489. );
  490. if (page === 1) {
  491. this.discogs.apiResults = [];
  492. }
  493. this.discogs.pages = res.data.pages;
  494. this.discogs.apiResults = this.discogs.apiResults.concat(
  495. res.data.results.map(result => {
  496. const type =
  497. result.type.charAt(0).toUpperCase() +
  498. result.type.slice(1);
  499. return {
  500. expanded: false,
  501. gotMoreInfo: false,
  502. album: {
  503. id: result.id,
  504. title: result.title,
  505. type,
  506. year: result.year,
  507. genres: result.genre,
  508. albumArt: result.cover_image,
  509. resourceUrl: result.resource_url
  510. }
  511. };
  512. })
  513. );
  514. this.discogs.page = page;
  515. this.discogs.disableLoadMore = false;
  516. } else new Toast(res.message);
  517. });
  518. },
  519. loadNextDiscogsPage() {
  520. this.discogs.disableLoadMore = true;
  521. this.searchDiscogsForPage(this.discogs.page + 1);
  522. },
  523. onDiscogsQueryChange() {
  524. this.discogs.page = 1;
  525. this.discogs.pages = 1;
  526. this.discogs.apiResults = [];
  527. this.discogs.disableLoadMore = false;
  528. },
  529. ...mapActions("modals/importAlbum", [
  530. "toggleDiscogsAlbum",
  531. "setPlaylistSongs",
  532. "updatePlaylistSongs",
  533. "selectDiscogsAlbum",
  534. "updateEditingSongs",
  535. "resetPlaylistSongs"
  536. ]),
  537. ...mapActions("modals/editSong", ["editSong"]),
  538. ...mapActions("modalVisibility", ["closeModal", "openModal"])
  539. }
  540. };
  541. </script>
  542. <style lang="scss">
  543. .night-mode {
  544. .search-discogs-album,
  545. .discogs-album,
  546. .import-youtube-playlist,
  547. .track-boxes {
  548. background-color: var(--dark-grey-3) !important;
  549. }
  550. .api-result {
  551. background-color: var(--dark-grey-3) !important;
  552. }
  553. .api-result .tracks .track:hover,
  554. .api-result .tracks .track:focus,
  555. .discogs-album .tracks .track:hover,
  556. .discogs-album .tracks .track:focus {
  557. background-color: var(--dark-grey-2) !important;
  558. }
  559. .label,
  560. p,
  561. strong {
  562. color: var(--light-grey-2);
  563. }
  564. }
  565. .import-album-modal {
  566. .modal-card-title {
  567. text-align: center;
  568. margin-left: 24px;
  569. }
  570. .modal-card {
  571. width: 100%;
  572. height: 100%;
  573. .modal-card-body {
  574. padding: 16px;
  575. display: flex;
  576. flex-direction: row;
  577. flex-wrap: wrap;
  578. justify-content: space-evenly;
  579. }
  580. .modal-card-foot {
  581. .button {
  582. margin: 0;
  583. }
  584. div div {
  585. margin-right: 5px;
  586. }
  587. .right {
  588. display: flex;
  589. margin-left: auto;
  590. margin-right: 0;
  591. }
  592. }
  593. }
  594. }
  595. </style>
  596. <style lang="scss" scoped>
  597. .break {
  598. flex-basis: 100%;
  599. height: 0;
  600. border: 1px solid var(--dark-grey);
  601. margin-top: 16px;
  602. margin-bottom: 16px;
  603. }
  604. .search-discogs-album {
  605. width: 376px;
  606. background-color: var(--light-grey);
  607. border: 1px rgba(163, 224, 255, 0.75) solid;
  608. border-radius: 5px;
  609. padding: 16px;
  610. overflow: auto;
  611. height: 100%;
  612. > label {
  613. margin-top: 12px;
  614. }
  615. .top-container {
  616. display: flex;
  617. img {
  618. height: 85px;
  619. width: 85px;
  620. }
  621. .right-container {
  622. padding: 8px;
  623. display: flex;
  624. flex-direction: column;
  625. flex: 1;
  626. .album-title {
  627. flex: 1;
  628. font-weight: 600;
  629. }
  630. .bottom-row {
  631. display: flex;
  632. flex-flow: row;
  633. line-height: 15px;
  634. img {
  635. height: 15px;
  636. align-self: end;
  637. flex: 1;
  638. user-select: none;
  639. -moz-user-select: none;
  640. -ms-user-select: none;
  641. -webkit-user-select: none;
  642. cursor: pointer;
  643. }
  644. p {
  645. text-align: right;
  646. }
  647. .type-year {
  648. font-size: 13px;
  649. align-self: end;
  650. }
  651. }
  652. }
  653. }
  654. .bottom-container {
  655. padding: 12px;
  656. .bottom-container-field {
  657. line-height: 16px;
  658. margin-bottom: 8px;
  659. font-weight: 600;
  660. span {
  661. font-weight: 400;
  662. }
  663. }
  664. .bottom-container-field:last-of-type {
  665. margin-bottom: 8px;
  666. }
  667. }
  668. .api-result {
  669. background-color: var(--white);
  670. border: 0.5px solid var(--primary-color);
  671. border-radius: 5px;
  672. margin-bottom: 16px;
  673. }
  674. button {
  675. &:focus,
  676. &:hover {
  677. filter: contrast(0.75);
  678. }
  679. }
  680. .tracks {
  681. margin-top: 12px;
  682. .track:first-child {
  683. margin-top: 0;
  684. border-radius: 3px 3px 0 0;
  685. }
  686. .track:last-child {
  687. border-radius: 0 0 3px 3px;
  688. }
  689. .track {
  690. border: 0.5px solid var(--black);
  691. margin-top: -1px;
  692. line-height: 16px;
  693. display: flex;
  694. span {
  695. font-weight: 600;
  696. display: inline-block;
  697. margin-top: 7px;
  698. margin-bottom: 7px;
  699. margin-left: 7px;
  700. }
  701. p {
  702. display: inline-block;
  703. margin: 7px;
  704. flex: 1;
  705. }
  706. }
  707. }
  708. .discogs-load-more {
  709. margin-bottom: 8px;
  710. }
  711. }
  712. .discogs-album {
  713. width: 376px;
  714. background-color: var(--light-grey);
  715. border: 1px rgba(163, 224, 255, 0.75) solid;
  716. border-radius: 5px;
  717. padding: 16px;
  718. overflow: auto;
  719. height: 100%;
  720. .top-container {
  721. display: flex;
  722. img {
  723. height: 85px;
  724. width: 85px;
  725. }
  726. .right-container {
  727. padding: 8px;
  728. display: flex;
  729. flex-direction: column;
  730. flex: 1;
  731. .album-title {
  732. flex: 1;
  733. font-weight: 600;
  734. }
  735. .bottom-row {
  736. display: flex;
  737. flex-flow: row;
  738. line-height: 15px;
  739. img {
  740. height: 15px;
  741. align-self: end;
  742. flex: 1;
  743. user-select: none;
  744. -moz-user-select: none;
  745. -ms-user-select: none;
  746. -webkit-user-select: none;
  747. cursor: pointer;
  748. }
  749. p {
  750. text-align: right;
  751. }
  752. .type-year {
  753. font-size: 13px;
  754. align-self: end;
  755. }
  756. }
  757. }
  758. }
  759. .bottom-container {
  760. padding: 12px;
  761. .bottom-container-field {
  762. line-height: 16px;
  763. margin-bottom: 8px;
  764. font-weight: 600;
  765. span {
  766. font-weight: 400;
  767. }
  768. }
  769. .bottom-container-field:last-of-type {
  770. margin-bottom: 0;
  771. }
  772. .tracks {
  773. margin-top: 12px;
  774. .track:first-child {
  775. margin-top: 0;
  776. border-radius: 3px 3px 0 0;
  777. }
  778. .track:last-child {
  779. border-radius: 0 0 3px 3px;
  780. }
  781. .track {
  782. border: 0.5px solid var(--black);
  783. margin-top: -1px;
  784. line-height: 16px;
  785. display: flex;
  786. span {
  787. font-weight: 600;
  788. display: inline-block;
  789. margin-top: 7px;
  790. margin-bottom: 7px;
  791. margin-left: 7px;
  792. }
  793. p {
  794. display: inline-block;
  795. margin: 7px;
  796. flex: 1;
  797. }
  798. }
  799. .track:hover,
  800. .track:focus {
  801. background-color: var(--light-grey);
  802. }
  803. }
  804. }
  805. }
  806. .import-youtube-playlist {
  807. width: 376px;
  808. background-color: var(--light-grey);
  809. border: 1px rgba(163, 224, 255, 0.75) solid;
  810. border-radius: 5px;
  811. padding: 16px;
  812. overflow: auto;
  813. height: 100%;
  814. }
  815. .track-boxes {
  816. width: 376px;
  817. background-color: var(--light-grey);
  818. border: 1px rgba(163, 224, 255, 0.75) solid;
  819. border-radius: 5px;
  820. padding: 16px;
  821. overflow: auto;
  822. height: 100%;
  823. .track-box:first-child {
  824. margin-top: 0;
  825. border-radius: 3px 3px 0 0;
  826. }
  827. .track-box:last-child {
  828. border-radius: 0 0 3px 3px;
  829. }
  830. .track-box {
  831. border: 0.5px solid var(--black);
  832. margin-top: -1px;
  833. line-height: 16px;
  834. display: flex;
  835. flex-flow: column;
  836. .track-position-title {
  837. display: flex;
  838. span {
  839. font-weight: 600;
  840. display: inline-block;
  841. margin-top: 7px;
  842. margin-bottom: 7px;
  843. margin-left: 7px;
  844. }
  845. p {
  846. display: inline-block;
  847. margin: 7px;
  848. flex: 1;
  849. }
  850. }
  851. .track-box-songs-drag-area {
  852. flex: 1;
  853. min-height: 100px;
  854. }
  855. }
  856. }
  857. </style>