index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  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="!song.simpleSong"
  262. class="material-icons report-icon"
  263. @click="
  264. reportSongInPlaylist(song)
  265. "
  266. >
  267. flag
  268. </i>
  269. <i
  270. v-if="!song.simpleSong"
  271. class="material-icons edit-icon"
  272. @click="
  273. editSongInPlaylist(song)
  274. "
  275. >
  276. edit
  277. </i>
  278. <i
  279. v-if="
  280. userId ===
  281. playlist.createdBy
  282. "
  283. @click="
  284. removeSongFromPlaylist(
  285. song.songId
  286. )
  287. "
  288. class="material-icons delete-icon"
  289. >delete</i
  290. >
  291. </div>
  292. </playlist-song-item>
  293. </li>
  294. </transition-group>
  295. </draggable>
  296. <p v-else class="nothing-here-text">
  297. This playlist doesn't have any songs.
  298. </p>
  299. </aside>
  300. </div>
  301. </div>
  302. <!--
  303. <button
  304. class="button is-info"
  305. @click="shuffle()"
  306. v-if="playlist.isUserModifiable"
  307. >
  308. Shuffle
  309. </button>
  310. <h5>Edit playlist details:</h5>
  311. -->
  312. </div>
  313. <div slot="footer">
  314. <a
  315. class="button is-default"
  316. v-if="
  317. this.userId === this.playlist.createdBy ||
  318. this.playlist.privacy === 'public'
  319. "
  320. @click="downloadPlaylist()"
  321. href="#"
  322. >
  323. Download Playlist
  324. </a>
  325. <a
  326. class="button is-danger"
  327. @click="removePlaylist()"
  328. href="#"
  329. v-if="isEditable()"
  330. >
  331. Remove Playlist
  332. </a>
  333. </div>
  334. </modal>
  335. </template>
  336. <script>
  337. import { mapState, mapActions } from "vuex";
  338. import draggable from "vuedraggable";
  339. import Toast from "toasters";
  340. import SearchYoutube from "../../../mixins/SearchYoutube.vue";
  341. import Modal from "../../Modal.vue";
  342. import SearchQueryItem from "../../ui/SearchQueryItem.vue";
  343. import PlaylistSongItem from "./components/PlaylistSongItem.vue";
  344. import io from "../../../io";
  345. import validation from "../../../validation";
  346. import utils from "../../../../js/utils";
  347. export default {
  348. components: { Modal, draggable, SearchQueryItem, PlaylistSongItem },
  349. mixins: [SearchYoutube],
  350. data() {
  351. return {
  352. utils,
  353. drag: false,
  354. serverDomain: "",
  355. playlist: { songs: [] }
  356. };
  357. },
  358. computed: {
  359. ...mapState("user/playlists", {
  360. editing: state => state.editing
  361. }),
  362. ...mapState({ userId: state => state.user.auth.userId }),
  363. dragOptions() {
  364. return {
  365. animation: 200,
  366. group: "description",
  367. disabled: !this.isEditable(),
  368. ghostClass: "draggable-list-ghost"
  369. };
  370. }
  371. },
  372. watch: {
  373. "search.songs.results": function checkIfSongInPlaylist(songs) {
  374. songs.forEach((searchItem, index) =>
  375. this.playlist.songs.find(song => {
  376. if (song.songId === searchItem.id)
  377. this.search.songs.results[index].isAddedToQueue = true;
  378. return song.songId === searchItem.id;
  379. })
  380. );
  381. }
  382. },
  383. mounted() {
  384. io.getSocket(socket => {
  385. this.socket = socket;
  386. this.socket.emit("playlists.getPlaylist", this.editing, res => {
  387. if (res.status === "success") {
  388. this.playlist = res.data;
  389. this.playlist.songs.sort((a, b) => a.position - b.position);
  390. }
  391. this.playlist.oldId = res.data._id;
  392. });
  393. this.socket.on("event:playlist.addSong", data => {
  394. if (this.playlist._id === data.playlistId)
  395. this.playlist.songs.push(data.song);
  396. });
  397. this.socket.on("event:playlist.removeSong", data => {
  398. if (this.playlist._id === data.playlistId) {
  399. // remove song from array of playlists
  400. this.playlist.songs.forEach((song, index) => {
  401. if (song.songId === data.songId)
  402. this.playlist.songs.splice(index, 1);
  403. });
  404. // if this song is in search results, mark it available to add to the playlist again
  405. this.search.songs.results.forEach((searchItem, index) => {
  406. if (data.songId === searchItem.id) {
  407. this.search.songs.results[
  408. index
  409. ].isAddedToQueue = false;
  410. }
  411. });
  412. }
  413. });
  414. this.socket.on("event:playlist.updateDisplayName", data => {
  415. if (this.playlist._id === data.playlistId)
  416. this.playlist.displayName = data.displayName;
  417. });
  418. this.socket.on("event:playlist.repositionSongs", data => {
  419. if (this.playlist._id === data.playlistId) {
  420. // for each song that has a new position
  421. data.songsBeingChanged.forEach(changedSong => {
  422. this.playlist.songs.forEach((song, index) => {
  423. // find song locally
  424. if (song.songId === changedSong.songId) {
  425. // change song position attribute
  426. this.playlist.songs[index].position =
  427. changedSong.position;
  428. // reposition in array if needed
  429. if (index !== changedSong.position - 1)
  430. this.playlist.songs.splice(
  431. changedSong.position - 1,
  432. 0,
  433. this.playlist.songs.splice(index, 1)[0]
  434. );
  435. }
  436. });
  437. });
  438. }
  439. });
  440. });
  441. },
  442. methods: {
  443. editSongInPlaylist(song) {
  444. this.$parent.editingSongId = song._id;
  445. this.openModal({ sector: "station", modal: "editSong" });
  446. },
  447. reportSongInPlaylist(song) {
  448. this.reportSong(song);
  449. this.openModal({ sector: "station", modal: "report" });
  450. },
  451. importPlaylist() {
  452. let isImportingPlaylist = true;
  453. // import query is blank
  454. if (!this.search.playlist.query)
  455. return new Toast({
  456. content: "Please enter a YouTube playlist URL.",
  457. timeout: 4000
  458. });
  459. // don't give starting import message instantly in case of instant error
  460. setTimeout(() => {
  461. if (isImportingPlaylist) {
  462. new Toast({
  463. content:
  464. "Starting to import your playlist. This can take some time to do.",
  465. timeout: 4000
  466. });
  467. }
  468. }, 750);
  469. return this.socket.emit(
  470. "playlists.addSetToPlaylist",
  471. this.search.playlist.query,
  472. this.playlist._id,
  473. this.search.playlist.isImportingOnlyMusic,
  474. res => {
  475. new Toast({ content: res.message, timeout: 20000 });
  476. if (res.status === "success") {
  477. isImportingPlaylist = false;
  478. if (this.search.playlist.isImportingOnlyMusic) {
  479. new Toast({
  480. content: `${res.stats.songsInPlaylistTotal} of the ${res.stats.videosInPlaylistTotal} videos in the playlist were songs.`,
  481. timeout: 20000
  482. });
  483. }
  484. }
  485. }
  486. );
  487. },
  488. isEditable() {
  489. return (
  490. this.playlist.isUserModifiable &&
  491. this.userId === this.playlist.createdBy
  492. );
  493. },
  494. updateSongPositioning({ moved }) {
  495. if (!moved) return; // we only need to update when song is moved
  496. const songsBeingChanged = [];
  497. this.playlist.songs.forEach((song, index) => {
  498. if (song.position !== index + 1)
  499. songsBeingChanged.push({
  500. songId: song.songId,
  501. position: index + 1
  502. });
  503. });
  504. this.socket.emit(
  505. "playlists.repositionSongs",
  506. this.playlist._id,
  507. songsBeingChanged,
  508. res => {
  509. new Toast({ content: res.message, timeout: 4000 });
  510. }
  511. );
  512. },
  513. totalLength() {
  514. let length = 0;
  515. this.playlist.songs.forEach(song => {
  516. length += song.duration;
  517. });
  518. return this.utils.formatTimeLong(length);
  519. },
  520. shuffle() {
  521. this.socket.emit("playlists.shuffle", this.playlist._id, res => {
  522. new Toast({ content: res.message, timeout: 4000 });
  523. if (res.status === "success") {
  524. this.playlist.songs = res.data.songs.sort(
  525. (a, b) => a.position - b.position
  526. );
  527. }
  528. });
  529. },
  530. addSongToPlaylist(id, index) {
  531. this.socket.emit(
  532. "playlists.addSongToPlaylist",
  533. false,
  534. id,
  535. this.playlist._id,
  536. res => {
  537. new Toast({ content: res.message, timeout: 4000 });
  538. if (res.status === "success")
  539. this.search.songs.results[index].isAddedToQueue = true;
  540. }
  541. );
  542. },
  543. removeSongFromPlaylist(id) {
  544. if (this.playlist.displayName === "Liked Songs") {
  545. this.socket.emit("songs.unlike", id, res => {
  546. new Toast({ content: res.message, timeout: 4000 });
  547. });
  548. }
  549. if (this.playlist.displayName === "Disliked Songs") {
  550. this.socket.emit("songs.undislike", id, res => {
  551. new Toast({ content: res.message, timeout: 4000 });
  552. });
  553. } else {
  554. this.socket.emit(
  555. "playlists.removeSongFromPlaylist",
  556. id,
  557. this.playlist._id,
  558. res => {
  559. new Toast({ content: res.message, timeout: 4000 });
  560. }
  561. );
  562. }
  563. },
  564. renamePlaylist() {
  565. const { displayName } = this.playlist;
  566. if (!validation.isLength(displayName, 2, 32))
  567. return new Toast({
  568. content:
  569. "Display name must have between 2 and 32 characters.",
  570. timeout: 8000
  571. });
  572. if (!validation.regex.ascii.test(displayName))
  573. return new Toast({
  574. content:
  575. "Invalid display name format. Only ASCII characters are allowed.",
  576. timeout: 8000
  577. });
  578. return this.socket.emit(
  579. "playlists.updateDisplayName",
  580. this.playlist._id,
  581. this.playlist.displayName,
  582. res => {
  583. new Toast({ content: res.message, timeout: 4000 });
  584. }
  585. );
  586. },
  587. removePlaylist() {
  588. this.socket.emit("playlists.remove", this.playlist._id, res => {
  589. new Toast({ content: res.message, timeout: 3000 });
  590. if (res.status === "success") {
  591. this.closeModal({
  592. sector: "station",
  593. modal: "editPlaylist"
  594. });
  595. }
  596. });
  597. },
  598. async downloadPlaylist() {
  599. if (this.serverDomain === "")
  600. this.serverDomain = await lofig.get("serverDomain");
  601. fetch(
  602. `${this.serverDomain}/export/privatePlaylist/${this.playlist._id}`,
  603. { credentials: "include" }
  604. )
  605. .then(res => res.blob())
  606. .then(blob => {
  607. const url = window.URL.createObjectURL(blob);
  608. const a = document.createElement("a");
  609. a.style.display = "none";
  610. a.href = url;
  611. a.download = `musare-privateplaylist-${
  612. this.playlist._id
  613. }-${new Date().toISOString()}.json`;
  614. document.body.appendChild(a);
  615. a.click();
  616. window.URL.revokeObjectURL(url);
  617. new Toast({
  618. content: "Successfully downloaded playlist.",
  619. timeout: 3000
  620. });
  621. })
  622. .catch(
  623. () =>
  624. new Toast({
  625. content: "Failed to export and download playlist.",
  626. timeout: 3000
  627. })
  628. );
  629. },
  630. moveSongToTop(index) {
  631. this.playlist.songs.splice(
  632. 0,
  633. 0,
  634. this.playlist.songs.splice(index, 1)[0]
  635. );
  636. this.updateSongPositioning({ moved: {} });
  637. },
  638. moveSongToBottom(index) {
  639. this.playlist.songs.splice(
  640. this.playlist.songs.length,
  641. 0,
  642. this.playlist.songs.splice(index, 1)[0]
  643. );
  644. this.updateSongPositioning({ moved: {} });
  645. },
  646. updatePrivacy() {
  647. const { privacy } = this.playlist;
  648. if (privacy === "public" || privacy === "private") {
  649. this.socket.emit(
  650. "playlists.updatePrivacy",
  651. this.playlist._id,
  652. privacy,
  653. res => {
  654. new Toast({ content: res.message, timeout: 4000 });
  655. }
  656. );
  657. }
  658. },
  659. ...mapActions("modals/report", ["reportSong"]),
  660. ...mapActions("modalVisibility", ["openModal", "closeModal"])
  661. }
  662. };
  663. </script>
  664. <style lang="scss">
  665. .edit-playlist-modal {
  666. .modal-card {
  667. width: 1300px;
  668. .modal-card-body {
  669. padding: 16px;
  670. }
  671. }
  672. .modal-card-foot {
  673. justify-content: flex-end;
  674. }
  675. }
  676. </style>
  677. <style lang="scss" scoped>
  678. .night-mode {
  679. .section {
  680. background-color: var(--dark-grey-3) !important;
  681. }
  682. .label,
  683. p,
  684. strong {
  685. color: var(--light-grey-2);
  686. }
  687. }
  688. .menu-list li {
  689. display: flex;
  690. justify-content: space-between;
  691. &:not(:last-of-type) {
  692. margin-bottom: 10px;
  693. }
  694. a {
  695. display: flex;
  696. }
  697. }
  698. .controls {
  699. display: flex;
  700. a {
  701. display: flex;
  702. align-items: center;
  703. }
  704. }
  705. @media screen and (max-width: 1300px) {
  706. .edit-playlist-modal .edit-playlist-modal-inner-container {
  707. height: auto !important;
  708. #import-from-youtube-section #song-query-results,
  709. .section {
  710. max-width: 100% !important;
  711. }
  712. }
  713. }
  714. .edit-playlist-modal {
  715. .edit-playlist-modal-inner-container {
  716. display: flex;
  717. flex-wrap: wrap;
  718. height: 100%;
  719. &.view-only {
  720. height: auto !important;
  721. #first-column {
  722. break-after: always;
  723. }
  724. .section {
  725. max-width: 100% !important;
  726. }
  727. }
  728. }
  729. .nothing-here-text {
  730. display: flex;
  731. align-items: center;
  732. justify-content: center;
  733. }
  734. .section {
  735. padding: 15px !important;
  736. margin: 0 10px;
  737. max-width: 600px;
  738. display: flex;
  739. flex-direction: column;
  740. flex-grow: 1;
  741. }
  742. .label {
  743. font-size: 1rem;
  744. font-weight: normal;
  745. }
  746. .input-with-button .button {
  747. width: 150px;
  748. }
  749. #first-column {
  750. max-width: 100%;
  751. height: 100%;
  752. overflow-y: auto;
  753. flex-grow: 1;
  754. .section {
  755. width: auto;
  756. }
  757. #playlist-info-section {
  758. border: 1px solid var(--light-grey-3);
  759. border-radius: 3px;
  760. padding: 15px !important;
  761. h3 {
  762. font-weight: 600;
  763. font-size: 30px;
  764. }
  765. h5 {
  766. font-size: 18px;
  767. }
  768. h3,
  769. h5 {
  770. margin: 0;
  771. }
  772. }
  773. #import-from-youtube-section {
  774. #playlist-import-type select {
  775. border-radius: 0;
  776. }
  777. #song-query-results {
  778. padding: 10px;
  779. margin-top: 10px;
  780. border: 1px solid var(--light-grey-3);
  781. border-radius: 3px;
  782. max-width: 565px;
  783. .search-query-item:not(:last-of-type) {
  784. margin-bottom: 10px;
  785. }
  786. }
  787. .load-more-button {
  788. width: 100%;
  789. margin-top: 10px;
  790. }
  791. }
  792. }
  793. #second-column {
  794. max-width: 100%;
  795. height: 100%;
  796. overflow-y: auto;
  797. flex-grow: 1;
  798. }
  799. }
  800. </style>