index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  1. <template>
  2. <modal
  3. :title="
  4. userId === playlist.createdBy ? 'Edit Playlist' : 'View Playlist'
  5. "
  6. class="edit-playlist-modal"
  7. >
  8. <div
  9. slot="body"
  10. :class="{
  11. 'view-only': !isEditable(),
  12. 'edit-playlist-modal-inner-container': true
  13. }"
  14. >
  15. <div id="first-column">
  16. <div id="playlist-info-section" class="section">
  17. <h3>{{ playlist.displayName }}</h3>
  18. <h5>Duration: {{ totalLength() }}</h5>
  19. </div>
  20. <div id="playlist-settings-section" class="section">
  21. <div v-if="isEditable()">
  22. <h4 class="section-title">Edit Details</h4>
  23. <p class="section-description">
  24. Change the display name and privacy of the playlist.
  25. </p>
  26. <hr class="section-horizontal-rule" />
  27. <label class="label"> Change display name </label>
  28. <div class="control is-grouped input-with-button">
  29. <p class="control is-expanded">
  30. <input
  31. v-model="playlist.displayName"
  32. class="input"
  33. type="text"
  34. placeholder="Playlist Display Name"
  35. @keyup.enter="renamePlaylist()"
  36. />
  37. </p>
  38. <p class="control">
  39. <a
  40. class="button is-info"
  41. @click.prevent="renamePlaylist()"
  42. href="#"
  43. >Rename</a
  44. >
  45. </p>
  46. </div>
  47. </div>
  48. <div v-if="userId === playlist.createdBy">
  49. <label class="label"> Change privacy </label>
  50. <div class="control is-grouped input-with-button">
  51. <div class="control is-expanded select">
  52. <select v-model="playlist.privacy">
  53. <option value="private">Private</option>
  54. <option value="public">Public</option>
  55. </select>
  56. </div>
  57. <p class="control">
  58. <a
  59. class="button is-info"
  60. @click.prevent="updatePrivacy()"
  61. href="#"
  62. >Update Privacy</a
  63. >
  64. </p>
  65. </div>
  66. </div>
  67. </div>
  68. <div
  69. id="import-from-youtube-section"
  70. class="section"
  71. v-if="isEditable()"
  72. >
  73. <h4 class="section-title">Import from YouTube</h4>
  74. <p class="section-description">
  75. Import a playlist or song by searching or using a link
  76. from YouTube.
  77. </p>
  78. <hr class="section-horizontal-rule" />
  79. <label class="label">
  80. Search for a playlist from YouTube
  81. </label>
  82. <div class="control is-grouped input-with-button">
  83. <p class="control is-expanded">
  84. <input
  85. class="input"
  86. type="text"
  87. placeholder="Enter YouTube Playlist URL here..."
  88. v-model="search.playlist.query"
  89. @keyup.enter="importPlaylist()"
  90. />
  91. </p>
  92. <p class="control has-addons">
  93. <span class="select" id="playlist-import-type">
  94. <select
  95. v-model="
  96. search.playlist.isImportingOnlyMusic
  97. "
  98. >
  99. <option :value="false">Import all</option>
  100. <option :value="true">
  101. Import only music
  102. </option>
  103. </select>
  104. </span>
  105. <a
  106. class="button is-info"
  107. @click.prevent="importPlaylist()"
  108. href="#"
  109. ><i class="material-icons icon-with-button"
  110. >publish</i
  111. >Import</a
  112. >
  113. </p>
  114. </div>
  115. <label class="label">
  116. Search for a song from YouTube
  117. </label>
  118. <div class="control is-grouped input-with-button">
  119. <p class="control is-expanded">
  120. <input
  121. class="input"
  122. type="text"
  123. placeholder="Enter your YouTube query here..."
  124. v-model="search.songs.query"
  125. autofocus
  126. @keyup.enter="searchForSongs()"
  127. />
  128. </p>
  129. <p class="control">
  130. <a
  131. class="button is-info"
  132. @click.prevent="searchForSongs()"
  133. href="#"
  134. ><i class="material-icons icon-with-button"
  135. >search</i
  136. >Search</a
  137. >
  138. </p>
  139. </div>
  140. <div
  141. v-if="search.songs.results.length > 0"
  142. id="song-query-results"
  143. >
  144. <search-query-item
  145. v-for="(result, index) in search.songs.results"
  146. :key="index"
  147. :result="result"
  148. >
  149. <div slot="actions">
  150. <transition
  151. name="search-query-actions"
  152. mode="out-in"
  153. >
  154. <a
  155. class="button is-success"
  156. v-if="result.isAddedToQueue"
  157. href="#"
  158. key="added-to-playlist"
  159. >
  160. <i
  161. class="material-icons icon-with-button"
  162. >done</i
  163. >
  164. Added to playlist
  165. </a>
  166. <a
  167. class="button is-dark"
  168. v-else
  169. @click.prevent="
  170. addSongToPlaylist(result.id, index)
  171. "
  172. href="#"
  173. key="add-to-playlist"
  174. >
  175. <i
  176. class="material-icons icon-with-button"
  177. >add</i
  178. >
  179. Add to playlist
  180. </a>
  181. </transition>
  182. </div>
  183. </search-query-item>
  184. <a
  185. class="button is-default load-more-button"
  186. @click.prevent="loadMoreSongs()"
  187. href="#"
  188. >
  189. Load more...
  190. </a>
  191. </div>
  192. </div>
  193. </div>
  194. <div id="second-column">
  195. <div id="rearrange-songs-section" class="section">
  196. <div v-if="isEditable()">
  197. <h4 class="section-title">Rearrange Songs</h4>
  198. <p class="section-description">
  199. Drag and drop songs to change their order
  200. </p>
  201. <hr class="section-horizontal-rule" />
  202. </div>
  203. <aside class="menu">
  204. <draggable
  205. class="menu-list scrollable-list"
  206. tag="ul"
  207. v-if="playlist.songs.length > 0"
  208. v-model="playlist.songs"
  209. v-bind="dragOptions"
  210. @start="drag = true"
  211. @end="drag = false"
  212. @change="updateSongPositioning"
  213. >
  214. <transition-group
  215. type="transition"
  216. :name="
  217. !drag ? 'draggable-list-transition' : null
  218. "
  219. >
  220. <li
  221. v-for="(song, index) in playlist.songs"
  222. :key="'key-' + index"
  223. >
  224. <playlist-song-item
  225. :song="song"
  226. :class="{
  227. 'item-draggable': isEditable()
  228. }"
  229. >
  230. <div slot="actions">
  231. <i
  232. class="material-icons"
  233. v-if="isEditable() && index > 0"
  234. @click="moveSongToTop(index)"
  235. >vertical_align_top</i
  236. >
  237. <i
  238. v-else
  239. class="material-icons"
  240. style="opacity: 0"
  241. >error</i
  242. >
  243. <i
  244. v-if="
  245. isEditable() &&
  246. playlist.songs.length -
  247. 1 !==
  248. index
  249. "
  250. @click="moveSongToBottom(index)"
  251. class="material-icons"
  252. >vertical_align_bottom</i
  253. >
  254. <i
  255. v-else
  256. class="material-icons"
  257. style="opacity: 0"
  258. >error</i
  259. >
  260. <i
  261. v-if="
  262. !song.simpleSong &&
  263. userRole === 'admin'
  264. "
  265. class="material-icons report-icon"
  266. @click="
  267. reportSongInPlaylist(song)
  268. "
  269. >
  270. flag
  271. </i>
  272. <i
  273. v-if="
  274. !song.simpleSong &&
  275. userRole === 'admin'
  276. "
  277. class="material-icons edit-icon"
  278. @click="
  279. editSongInPlaylist(song)
  280. "
  281. >
  282. edit
  283. </i>
  284. <i
  285. v-if="
  286. userId ===
  287. playlist.createdBy
  288. "
  289. @click="
  290. removeSongFromPlaylist(
  291. song.songId
  292. )
  293. "
  294. class="material-icons delete-icon"
  295. >delete</i
  296. >
  297. </div>
  298. </playlist-song-item>
  299. </li>
  300. </transition-group>
  301. </draggable>
  302. <p v-else class="nothing-here-text">
  303. This playlist doesn't have any songs.
  304. </p>
  305. </aside>
  306. </div>
  307. </div>
  308. <!--
  309. <button
  310. class="button is-info"
  311. @click="shuffle()"
  312. v-if="playlist.isUserModifiable"
  313. >
  314. Shuffle
  315. </button>
  316. <h5>Edit playlist details:</h5>
  317. -->
  318. </div>
  319. <div slot="footer">
  320. <a
  321. class="button is-default"
  322. v-if="
  323. this.userId === this.playlist.createdBy ||
  324. this.playlist.privacy === 'public'
  325. "
  326. @click="downloadPlaylist()"
  327. href="#"
  328. >
  329. Download Playlist
  330. </a>
  331. <a
  332. class="button is-danger"
  333. @click="removePlaylist()"
  334. href="#"
  335. v-if="isEditable()"
  336. >
  337. Remove Playlist
  338. </a>
  339. </div>
  340. </modal>
  341. </template>
  342. <script>
  343. import { mapState, mapGetters, mapActions } from "vuex";
  344. import draggable from "vuedraggable";
  345. import Toast from "toasters";
  346. import SearchYoutube from "../../../mixins/SearchYoutube.vue";
  347. import Modal from "../../Modal.vue";
  348. import SearchQueryItem from "../../ui/SearchQueryItem.vue";
  349. import PlaylistSongItem from "./components/PlaylistSongItem.vue";
  350. import validation from "../../../validation";
  351. import utils from "../../../../js/utils";
  352. export default {
  353. components: { Modal, draggable, SearchQueryItem, PlaylistSongItem },
  354. mixins: [SearchYoutube],
  355. data() {
  356. return {
  357. utils,
  358. drag: false,
  359. apiDomain: "",
  360. playlist: { songs: [] }
  361. };
  362. },
  363. computed: {
  364. ...mapState("user/playlists", {
  365. editing: state => state.editing
  366. }),
  367. ...mapState({
  368. userId: state => state.user.auth.userId,
  369. userRole: state => state.user.auth.role
  370. }),
  371. dragOptions() {
  372. return {
  373. animation: 200,
  374. group: "description",
  375. disabled: !this.isEditable(),
  376. ghostClass: "draggable-list-ghost"
  377. };
  378. },
  379. ...mapGetters({
  380. socket: "websockets/getSocket"
  381. })
  382. },
  383. watch: {
  384. "search.songs.results": function checkIfSongInPlaylist(songs) {
  385. songs.forEach((searchItem, index) =>
  386. this.playlist.songs.find(song => {
  387. if (song.songId === searchItem.id)
  388. this.search.songs.results[index].isAddedToQueue = true;
  389. return song.songId === searchItem.id;
  390. })
  391. );
  392. }
  393. },
  394. mounted() {
  395. this.socket.dispatch("playlists.getPlaylist", this.editing, res => {
  396. if (res.status === "success") {
  397. this.playlist = res.data;
  398. this.playlist.songs.sort((a, b) => a.position - b.position);
  399. this.playlist.oldId = res.data._id;
  400. } else
  401. new Toast({
  402. content: res.message,
  403. timeout: 4000
  404. });
  405. });
  406. this.socket.on("event:playlist.addSong", data => {
  407. if (this.playlist._id === data.playlistId)
  408. this.playlist.songs.push(data.song);
  409. });
  410. this.socket.on("event:playlist.removeSong", data => {
  411. if (this.playlist._id === data.playlistId) {
  412. // remove song from array of playlists
  413. this.playlist.songs.forEach((song, index) => {
  414. if (song.songId === data.songId)
  415. this.playlist.songs.splice(index, 1);
  416. });
  417. // if this song is in search results, mark it available to add to the playlist again
  418. this.search.songs.results.forEach((searchItem, index) => {
  419. if (data.songId === searchItem.id) {
  420. this.search.songs.results[index].isAddedToQueue = false;
  421. }
  422. });
  423. }
  424. });
  425. this.socket.on("event:playlist.updateDisplayName", data => {
  426. if (this.playlist._id === data.playlistId)
  427. this.playlist.displayName = data.displayName;
  428. });
  429. this.socket.on("event:playlist.repositionSongs", data => {
  430. if (this.playlist._id === data.playlistId) {
  431. // for each song that has a new position
  432. data.songsBeingChanged.forEach(changedSong => {
  433. this.playlist.songs.forEach((song, index) => {
  434. // find song locally
  435. if (song.songId === changedSong.songId) {
  436. // change song position attribute
  437. this.playlist.songs[index].position =
  438. changedSong.position;
  439. // reposition in array if needed
  440. if (index !== changedSong.position - 1)
  441. this.playlist.songs.splice(
  442. changedSong.position - 1,
  443. 0,
  444. this.playlist.songs.splice(index, 1)[0]
  445. );
  446. }
  447. });
  448. });
  449. }
  450. });
  451. },
  452. methods: {
  453. editSongInPlaylist(song) {
  454. this.$parent.editingSongId = song._id;
  455. this.openModal({ sector: "admin", modal: "editSong" });
  456. },
  457. reportSongInPlaylist(song) {
  458. this.reportSong(song);
  459. this.openModal({ sector: "station", modal: "report" });
  460. },
  461. importPlaylist() {
  462. let isImportingPlaylist = true;
  463. // import query is blank
  464. if (!this.search.playlist.query)
  465. return new Toast({
  466. content: "Please enter a YouTube playlist URL.",
  467. timeout: 4000
  468. });
  469. // don't give starting import message instantly in case of instant error
  470. setTimeout(() => {
  471. if (isImportingPlaylist) {
  472. new Toast({
  473. content:
  474. "Starting to import your playlist. This can take some time to do.",
  475. timeout: 4000
  476. });
  477. }
  478. }, 750);
  479. return this.socket.dispatch(
  480. "playlists.addSetToPlaylist",
  481. this.search.playlist.query,
  482. this.playlist._id,
  483. this.search.playlist.isImportingOnlyMusic,
  484. res => {
  485. new Toast({ content: res.message, timeout: 20000 });
  486. if (res.status === "success") {
  487. isImportingPlaylist = false;
  488. if (this.search.playlist.isImportingOnlyMusic) {
  489. new Toast({
  490. content: `${res.stats.songsInPlaylistTotal} of the ${res.stats.videosInPlaylistTotal} videos in the playlist were songs.`,
  491. timeout: 20000
  492. });
  493. }
  494. }
  495. }
  496. );
  497. },
  498. isEditable() {
  499. return (
  500. this.playlist.isUserModifiable &&
  501. this.userId === this.playlist.createdBy
  502. );
  503. },
  504. updateSongPositioning({ moved }) {
  505. if (!moved) return; // we only need to update when song is moved
  506. const songsBeingChanged = [];
  507. this.playlist.songs.forEach((song, index) => {
  508. if (song.position !== index + 1)
  509. songsBeingChanged.push({
  510. songId: song.songId,
  511. position: index + 1
  512. });
  513. });
  514. this.socket.dispatch(
  515. "playlists.repositionSongs",
  516. this.playlist._id,
  517. songsBeingChanged,
  518. res => {
  519. new Toast({ content: res.message, timeout: 4000 });
  520. }
  521. );
  522. },
  523. totalLength() {
  524. let length = 0;
  525. this.playlist.songs.forEach(song => {
  526. length += song.duration;
  527. });
  528. return this.utils.formatTimeLong(length);
  529. },
  530. shuffle() {
  531. this.socket.dispatch(
  532. "playlists.shuffle",
  533. this.playlist._id,
  534. res => {
  535. new Toast({ content: res.message, timeout: 4000 });
  536. if (res.status === "success") {
  537. this.playlist.songs = res.data.songs.sort(
  538. (a, b) => a.position - b.position
  539. );
  540. }
  541. }
  542. );
  543. },
  544. addSongToPlaylist(id, index) {
  545. this.socket.dispatch(
  546. "playlists.addSongToPlaylist",
  547. false,
  548. id,
  549. this.playlist._id,
  550. res => {
  551. new Toast({ content: res.message, timeout: 4000 });
  552. if (res.status === "success")
  553. this.search.songs.results[index].isAddedToQueue = true;
  554. }
  555. );
  556. },
  557. removeSongFromPlaylist(id) {
  558. if (this.playlist.displayName === "Liked Songs") {
  559. this.socket.dispatch("songs.unlike", id, res => {
  560. new Toast({ content: res.message, timeout: 4000 });
  561. });
  562. }
  563. if (this.playlist.displayName === "Disliked Songs") {
  564. this.socket.dispatch("songs.undislike", id, res => {
  565. new Toast({ content: res.message, timeout: 4000 });
  566. });
  567. } else {
  568. this.socket.dispatch(
  569. "playlists.removeSongFromPlaylist",
  570. id,
  571. this.playlist._id,
  572. res => {
  573. new Toast({ content: res.message, timeout: 4000 });
  574. }
  575. );
  576. }
  577. },
  578. renamePlaylist() {
  579. const { displayName } = this.playlist;
  580. if (!validation.isLength(displayName, 2, 32))
  581. return new Toast({
  582. content:
  583. "Display name must have between 2 and 32 characters.",
  584. timeout: 8000
  585. });
  586. if (!validation.regex.ascii.test(displayName))
  587. return new Toast({
  588. content:
  589. "Invalid display name format. Only ASCII characters are allowed.",
  590. timeout: 8000
  591. });
  592. return this.socket.dispatch(
  593. "playlists.updateDisplayName",
  594. this.playlist._id,
  595. this.playlist.displayName,
  596. res => {
  597. new Toast({ content: res.message, timeout: 4000 });
  598. }
  599. );
  600. },
  601. removePlaylist() {
  602. this.socket.dispatch("playlists.remove", this.playlist._id, res => {
  603. new Toast({ content: res.message, timeout: 3000 });
  604. if (res.status === "success") {
  605. this.closeModal({
  606. sector: "station",
  607. modal: "editPlaylist"
  608. });
  609. }
  610. });
  611. },
  612. async downloadPlaylist() {
  613. if (this.apiDomain === "")
  614. this.apiDomain = await lofig.get("apiDomain");
  615. fetch(
  616. `${this.apiDomain}/export/privatePlaylist/${this.playlist._id}`,
  617. { credentials: "include" }
  618. )
  619. .then(res => res.blob())
  620. .then(blob => {
  621. const url = window.URL.createObjectURL(blob);
  622. const a = document.createElement("a");
  623. a.style.display = "none";
  624. a.href = url;
  625. a.download = `musare-privateplaylist-${
  626. this.playlist._id
  627. }-${new Date().toISOString()}.json`;
  628. document.body.appendChild(a);
  629. a.click();
  630. window.URL.revokeObjectURL(url);
  631. new Toast({
  632. content: "Successfully downloaded playlist.",
  633. timeout: 3000
  634. });
  635. })
  636. .catch(
  637. () =>
  638. new Toast({
  639. content: "Failed to export and download playlist.",
  640. timeout: 3000
  641. })
  642. );
  643. },
  644. moveSongToTop(index) {
  645. this.playlist.songs.splice(
  646. 0,
  647. 0,
  648. this.playlist.songs.splice(index, 1)[0]
  649. );
  650. this.updateSongPositioning({ moved: {} });
  651. },
  652. moveSongToBottom(index) {
  653. this.playlist.songs.splice(
  654. this.playlist.songs.length,
  655. 0,
  656. this.playlist.songs.splice(index, 1)[0]
  657. );
  658. this.updateSongPositioning({ moved: {} });
  659. },
  660. updatePrivacy() {
  661. const { privacy } = this.playlist;
  662. if (privacy === "public" || privacy === "private") {
  663. this.socket.dispatch(
  664. "playlists.updatePrivacy",
  665. this.playlist._id,
  666. privacy,
  667. res => {
  668. new Toast({ content: res.message, timeout: 4000 });
  669. }
  670. );
  671. }
  672. },
  673. ...mapActions("modals/report", ["reportSong"]),
  674. ...mapActions("modalVisibility", ["openModal", "closeModal"])
  675. }
  676. };
  677. </script>
  678. <style lang="scss">
  679. .edit-playlist-modal {
  680. .modal-card {
  681. width: 1300px;
  682. .modal-card-body {
  683. padding: 16px;
  684. }
  685. }
  686. .modal-card-foot {
  687. justify-content: flex-end;
  688. }
  689. }
  690. </style>
  691. <style lang="scss" scoped>
  692. .night-mode {
  693. .section {
  694. background-color: var(--dark-grey-3) !important;
  695. }
  696. .label,
  697. p,
  698. strong {
  699. color: var(--light-grey-2);
  700. }
  701. }
  702. .menu-list li {
  703. display: flex;
  704. justify-content: space-between;
  705. &:not(:last-of-type) {
  706. margin-bottom: 10px;
  707. }
  708. a {
  709. display: flex;
  710. }
  711. }
  712. .controls {
  713. display: flex;
  714. a {
  715. display: flex;
  716. align-items: center;
  717. }
  718. }
  719. @media screen and (max-width: 1300px) {
  720. .edit-playlist-modal .edit-playlist-modal-inner-container {
  721. height: auto !important;
  722. #import-from-youtube-section #song-query-results,
  723. .section {
  724. max-width: 100% !important;
  725. }
  726. }
  727. }
  728. .edit-playlist-modal {
  729. .edit-playlist-modal-inner-container {
  730. display: flex;
  731. flex-wrap: wrap;
  732. height: 100%;
  733. &.view-only {
  734. height: auto !important;
  735. #first-column {
  736. break-after: always;
  737. }
  738. .section {
  739. max-width: 100% !important;
  740. }
  741. }
  742. }
  743. .nothing-here-text {
  744. display: flex;
  745. align-items: center;
  746. justify-content: center;
  747. }
  748. .section {
  749. padding: 15px !important;
  750. margin: 0 10px;
  751. max-width: 600px;
  752. display: flex;
  753. flex-direction: column;
  754. flex-grow: 1;
  755. }
  756. .label {
  757. font-size: 1rem;
  758. font-weight: normal;
  759. }
  760. .input-with-button .button {
  761. width: 150px;
  762. }
  763. #first-column {
  764. max-width: 100%;
  765. height: 100%;
  766. overflow-y: auto;
  767. flex-grow: 1;
  768. .section {
  769. width: auto;
  770. }
  771. #playlist-info-section {
  772. border: 1px solid var(--light-grey-3);
  773. border-radius: 3px;
  774. padding: 15px !important;
  775. h3 {
  776. font-weight: 600;
  777. font-size: 30px;
  778. }
  779. h5 {
  780. font-size: 18px;
  781. }
  782. h3,
  783. h5 {
  784. margin: 0;
  785. }
  786. }
  787. #import-from-youtube-section {
  788. #playlist-import-type select {
  789. border-radius: 0;
  790. }
  791. #song-query-results {
  792. padding: 10px;
  793. margin-top: 10px;
  794. border: 1px solid var(--light-grey-3);
  795. border-radius: 3px;
  796. max-width: 565px;
  797. .search-query-item:not(:last-of-type) {
  798. margin-bottom: 10px;
  799. }
  800. }
  801. .load-more-button {
  802. width: 100%;
  803. margin-top: 10px;
  804. }
  805. }
  806. }
  807. #second-column {
  808. max-width: 100%;
  809. height: 100%;
  810. overflow-y: auto;
  811. flex-grow: 1;
  812. }
  813. }
  814. </style>