EditSong.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  1. <template>
  2. <div>
  3. <modal title="Edit Song">
  4. <div slot="body">
  5. <h5 class="has-text-centered">Video Preview</h5>
  6. <div class="video-container">
  7. <div id="player"></div>
  8. <canvas
  9. id="durationCanvas"
  10. height="40"
  11. width="560"
  12. ></canvas>
  13. <div class="controls">
  14. <form action="#">
  15. <p style="margin-top: 0; position: relative;">
  16. <input
  17. type="range"
  18. id="volumeSlider"
  19. min="0"
  20. max="100"
  21. class="active"
  22. v-on:change="changeVolume()"
  23. v-on:input="changeVolume()"
  24. />
  25. </p>
  26. </form>
  27. <p class="control has-addons">
  28. <button
  29. class="button"
  30. v-on:click="settings('pause')"
  31. v-if="!video.paused"
  32. >
  33. <i class="material-icons">pause</i>
  34. </button>
  35. <button
  36. class="button"
  37. v-on:click="settings('play')"
  38. v-if="video.paused"
  39. >
  40. <i class="material-icons">play_arrow</i>
  41. </button>
  42. <button
  43. class="button"
  44. v-on:click="settings('stop')"
  45. >
  46. <i class="material-icons">stop</i>
  47. </button>
  48. <button
  49. class="button"
  50. v-on:click="settings('skipToLast10Secs')"
  51. >
  52. <i class="material-icons">fast_forward</i>
  53. </button>
  54. </p>
  55. <p>
  56. YouTube:
  57. <span>{{ youtubeVideoCurrentTime }}</span> /
  58. <span>{{ youtubeVideoDuration }}</span>
  59. {{ youtubeVideoNote }}
  60. </p>
  61. </div>
  62. </div>
  63. <h5 class="has-text-centered">Thumbnail Preview</h5>
  64. <img
  65. class="thumbnail-preview"
  66. :src="editing.song.thumbnail"
  67. onerror="this.src='/assets/notes-transparent.png'"
  68. />
  69. <div class="control is-horizontal">
  70. <div class="control-label">
  71. <label class="label">Thumbnail URL</label>
  72. </div>
  73. <div class="control">
  74. <input
  75. class="input"
  76. type="text"
  77. v-model="editing.song.thumbnail"
  78. />
  79. </div>
  80. </div>
  81. <h5 class="has-text-centered">Edit Information</h5>
  82. <p class="control">
  83. <label class="checkbox">
  84. <input
  85. type="checkbox"
  86. v-model="editing.song.explicit"
  87. />
  88. Explicit
  89. </label>
  90. </p>
  91. <label class="label">Song ID & Title</label>
  92. <div class="control is-horizontal">
  93. <div class="control is-grouped">
  94. <p class="control is-expanded">
  95. <input
  96. class="input"
  97. type="text"
  98. v-model="editing.song.songId"
  99. />
  100. </p>
  101. <p class="control is-expanded">
  102. <input
  103. class="input"
  104. type="text"
  105. v-model="editing.song.title"
  106. autofocus
  107. />
  108. </p>
  109. </div>
  110. </div>
  111. <label class="label">Artists & Genres</label>
  112. <div class="control is-horizontal">
  113. <div class="control is-grouped artist-genres">
  114. <div>
  115. <p class="control has-addons">
  116. <input
  117. class="input"
  118. id="new-artist"
  119. type="text"
  120. placeholder="Artist"
  121. />
  122. <button
  123. class="button is-info"
  124. v-on:click="addTag('artists')"
  125. >
  126. Add Artist
  127. </button>
  128. </p>
  129. <span
  130. class="tag is-info"
  131. v-for="(artist, index) in editing.song.artists"
  132. :key="index"
  133. >
  134. {{ artist }}
  135. <button
  136. class="delete is-info"
  137. v-on:click="removeTag('artists', index)"
  138. ></button>
  139. </span>
  140. </div>
  141. <div>
  142. <p class="control has-addons">
  143. <input
  144. class="input"
  145. id="new-genre"
  146. type="text"
  147. placeholder="Genre"
  148. />
  149. <button
  150. class="button is-info"
  151. v-on:click="addTag('genres')"
  152. >
  153. Add Genre
  154. </button>
  155. </p>
  156. <span
  157. class="tag is-info"
  158. v-for="(genre, index) in editing.song.genres"
  159. :key="index"
  160. >
  161. {{ genre }}
  162. <button
  163. class="delete is-info"
  164. v-on:click="removeTag('genres', index)"
  165. ></button>
  166. </span>
  167. </div>
  168. </div>
  169. </div>
  170. <label class="label">Song Duration</label>
  171. <p class="control">
  172. <input
  173. class="input"
  174. type="text"
  175. v-model="editing.song.duration"
  176. />
  177. </p>
  178. <label class="label">Skip Duration</label>
  179. <p class="control">
  180. <input
  181. class="input"
  182. type="text"
  183. v-model="editing.song.skipDuration"
  184. />
  185. </p>
  186. <hr />
  187. <h5 class="has-text-centered">Spotify Information</h5>
  188. <label class="label">Song title</label>
  189. <p class="control">
  190. <input class="input" type="text" v-model="spotify.title" />
  191. </p>
  192. <label class="label">Song artist (1 artist full name)</label>
  193. <p class="control">
  194. <input class="input" type="text" v-model="spotify.artist" />
  195. </p>
  196. <button
  197. class="button is-success"
  198. v-on:click="getSpotifySongs()"
  199. >
  200. Get Spotify songs
  201. </button>
  202. <hr />
  203. <article
  204. class="media"
  205. v-for="(song, index) in spotify.songs"
  206. :key="index"
  207. >
  208. <figure class="media-left">
  209. <p class="image is-64x64">
  210. <img
  211. :src="song.thumbnail"
  212. onerror="this.src='/assets/notes-transparent.png'"
  213. />
  214. </p>
  215. </figure>
  216. <div class="media-content">
  217. <div class="content">
  218. <p>
  219. <strong>{{ song.title }}</strong>
  220. <br />
  221. <small>Artists: {{ song.artists }}</small
  222. >, <small>Duration: {{ song.duration }}</small
  223. >,
  224. <small>Explicit: {{ song.explicit }}</small>
  225. <br />
  226. <small>Thumbnail: {{ song.thumbnail }}</small>
  227. </p>
  228. </div>
  229. </div>
  230. </article>
  231. </div>
  232. <div slot="footer">
  233. <button
  234. class="button is-success"
  235. v-on:click="save(editing.song, false)"
  236. >
  237. <i class="material-icons save-changes">done</i>
  238. <span>&nbsp;Save</span>
  239. </button>
  240. <button
  241. class="button is-success"
  242. v-on:click="save(editing.song, true)"
  243. >
  244. <i class="material-icons save-changes">done</i>
  245. <span>&nbsp;Save and close</span>
  246. </button>
  247. <button
  248. class="button is-danger"
  249. v-on:click="
  250. closeModal({ sector: 'admin', modal: 'editSong' })
  251. "
  252. >
  253. <span>&nbsp;Close</span>
  254. </button>
  255. </div>
  256. </modal>
  257. </div>
  258. </template>
  259. <script>
  260. import { mapState, mapActions } from "vuex";
  261. import { Toast } from "vue-roaster";
  262. import io from "../../io";
  263. import validation from "../../validation";
  264. import Modal from "./Modal.vue";
  265. export default {
  266. components: { Modal },
  267. data() {
  268. return {
  269. spotify: {
  270. title: "",
  271. artist: "",
  272. songs: []
  273. },
  274. youtubeVideoDuration: 0.0,
  275. youtubeVideoCurrentTime: 0.0,
  276. youtubeVideoNote: "",
  277. useHTTPS: false
  278. };
  279. },
  280. computed: {
  281. ...mapState("admin/songs", {
  282. video: state => state.video,
  283. editing: state => state.editing,
  284. songs: state => state.songs
  285. }),
  286. ...mapState("modals", {
  287. modals: state => state.modals.admin
  288. })
  289. },
  290. methods: {
  291. save(song, close) {
  292. if (!song.title)
  293. return Toast.methods.addToast(
  294. "Please fill in all fields",
  295. 8000
  296. );
  297. if (!song.thumbnail)
  298. return Toast.methods.addToast(
  299. "Please fill in all fields",
  300. 8000
  301. );
  302. // Duration
  303. if (
  304. Number(song.skipDuration) + Number(song.duration) >
  305. this.youtubeVideoDuration
  306. ) {
  307. return Toast.methods.addToast(
  308. "Duration can't be higher than the length of the video",
  309. 8000
  310. );
  311. }
  312. // Title
  313. if (!validation.isLength(song.title, 1, 100))
  314. return Toast.methods.addToast(
  315. "Title must have between 1 and 100 characters.",
  316. 8000
  317. );
  318. /* if (!validation.regex.ascii.test(song.title))
  319. return Toast.methods.addToast(
  320. "Invalid title format. Only ascii characters are allowed.",
  321. 8000
  322. ); */
  323. // Artists
  324. if (song.artists.length < 1 || song.artists.length > 10)
  325. return Toast.methods.addToast(
  326. "Invalid artists. You must have at least 1 artist and a maximum of 10 artists.",
  327. 8000
  328. );
  329. let error;
  330. song.artists.forEach(artist => {
  331. if (!validation.isLength(artist, 1, 32)) {
  332. error = "Artist must have between 1 and 32 characters.";
  333. return error;
  334. }
  335. if (!validation.regex.ascii.test(artist)) {
  336. error =
  337. "Invalid artist format. Only ascii characters are allowed.";
  338. return error;
  339. }
  340. if (artist === "NONE") {
  341. error =
  342. 'Invalid artist format. Artists are not allowed to be named "NONE".';
  343. return error;
  344. }
  345. return false;
  346. });
  347. if (error) return Toast.methods.addToast(error, 8000);
  348. // Genres
  349. error = undefined;
  350. song.genres.forEach(genre => {
  351. if (!validation.isLength(genre, 1, 16)) {
  352. error = "Genre must have between 1 and 16 characters.";
  353. return error;
  354. }
  355. if (!validation.regex.az09_.test(genre)) {
  356. error =
  357. "Invalid genre format. Only ascii characters are allowed.";
  358. return error;
  359. }
  360. return false;
  361. });
  362. if (error) return Toast.methods.addToast(error, 8000);
  363. // Thumbnail
  364. if (!validation.isLength(song.thumbnail, 8, 256))
  365. return Toast.methods.addToast(
  366. "Thumbnail must have between 8 and 256 characters.",
  367. 8000
  368. );
  369. if (this.useHTTPS && song.thumbnail.indexOf("https://") !== 0) {
  370. return Toast.methods.addToast(
  371. 'Thumbnail must start with "https://".',
  372. 8000
  373. );
  374. }
  375. if (!this.useHTTPS && song.thumbnail.indexOf("http://") !== 0) {
  376. return Toast.methods.addToast(
  377. 'Thumbnail must start with "http://".',
  378. 8000
  379. );
  380. }
  381. return this.socket.emit(
  382. `${this.editing.type}.update`,
  383. song._id,
  384. song,
  385. res => {
  386. Toast.methods.addToast(res.message, 4000);
  387. if (res.status === "success") {
  388. this.songs.forEach(originalSong => {
  389. const updatedSong = song;
  390. if (originalSong._id === updatedSong._id) {
  391. Object.keys(originalSong).forEach(n => {
  392. updatedSong[n] = originalSong[n];
  393. return originalSong[n];
  394. });
  395. }
  396. });
  397. }
  398. if (close)
  399. this.closeModal({
  400. sector: "admin",
  401. modal: "editSong"
  402. });
  403. }
  404. );
  405. },
  406. settings(type) {
  407. switch (type) {
  408. default:
  409. break;
  410. case "stop":
  411. this.stopVideo();
  412. this.pauseVideo(true);
  413. break;
  414. case "pause":
  415. this.pauseVideo(true);
  416. break;
  417. case "play":
  418. this.pauseVideo(false);
  419. break;
  420. case "skipToLast10Secs":
  421. this.video.player.seekTo(
  422. this.editing.song.duration -
  423. 10 +
  424. this.editing.song.skipDuration
  425. );
  426. break;
  427. }
  428. },
  429. changeVolume() {
  430. const volume = document.getElementById("volumeSlider").value;
  431. localStorage.setItem("volume", volume);
  432. this.video.player.setVolume(volume);
  433. if (volume > 0) this.video.player.unMute();
  434. },
  435. addTag(type) {
  436. if (type === "genres") {
  437. const genre = document
  438. .getElementById("new-genre")
  439. .value.toLowerCase()
  440. .trim();
  441. if (this.editing.song.genres.indexOf(genre) !== -1)
  442. return Toast.methods.addToast("Genre already exists", 3000);
  443. if (genre) {
  444. this.editing.song.genres.push(genre);
  445. document.getElementById("new-genre").value = "";
  446. return false;
  447. }
  448. return Toast.methods.addToast("Genre cannot be empty", 3000);
  449. }
  450. if (type === "artists") {
  451. const artist = document.getElementById("new-artist").value;
  452. if (this.editing.song.artists.indexOf(artist) !== -1)
  453. return Toast.methods.addToast(
  454. "Artist already exists",
  455. 3000
  456. );
  457. if (document.getElementById("new-artist").value !== "") {
  458. this.editing.song.artists.push(artist);
  459. document.getElementById("new-artist").value = "";
  460. return false;
  461. }
  462. return Toast.methods.addToast("Artist cannot be empty", 3000);
  463. }
  464. return false;
  465. },
  466. removeTag(type, index) {
  467. if (type === "genres") this.editing.song.genres.splice(index, 1);
  468. else if (type === "artists")
  469. this.editing.song.artists.splice(index, 1);
  470. },
  471. getSpotifySongs() {
  472. this.socket.emit(
  473. "apis.getSpotifySongs",
  474. this.spotify.title,
  475. this.spotify.artist,
  476. res => {
  477. if (res.status === "success") {
  478. Toast.methods.addToast(
  479. `Succesfully got ${res.songs.length} song${
  480. res.songs.length !== 1 ? "s" : ""
  481. }.`,
  482. 3000
  483. );
  484. this.spotify.songs = res.songs;
  485. } else
  486. Toast.methods.addToast(
  487. `Failed to get songs. ${res.message}`,
  488. 3000
  489. );
  490. }
  491. );
  492. },
  493. initCanvas() {
  494. const canvasElement = document.getElementById("durationCanvas");
  495. const ctx = canvasElement.getContext("2d");
  496. const skipDurationColor = "#ef4a1c";
  497. const durationColor = "#1dc146";
  498. const afterDurationColor = "#ef731a";
  499. ctx.font = "16px Arial";
  500. ctx.fillStyle = skipDurationColor;
  501. ctx.fillRect(0, 25, 20, 15);
  502. ctx.fillStyle = "#000000";
  503. ctx.fillText("Skip duration", 25, 38);
  504. ctx.fillStyle = durationColor;
  505. ctx.fillRect(130, 25, 20, 15);
  506. ctx.fillStyle = "#000000";
  507. ctx.fillText("Duration", 155, 38);
  508. ctx.fillStyle = afterDurationColor;
  509. ctx.fillRect(230, 25, 20, 15);
  510. ctx.fillStyle = "#000000";
  511. ctx.fillText("After duration", 255, 38);
  512. },
  513. drawCanvas() {
  514. const canvasElement = document.getElementById("durationCanvas");
  515. const ctx = canvasElement.getContext("2d");
  516. const videoDuration = Number(this.youtubeVideoDuration);
  517. const skipDuration = Number(this.editing.song.skipDuration);
  518. const duration = Number(this.editing.song.duration);
  519. const afterDuration = videoDuration - (skipDuration + duration);
  520. const width = 560;
  521. const currentTime = this.video.player.getCurrentTime();
  522. const widthSkipDuration = (skipDuration / videoDuration) * width;
  523. const widthDuration = (duration / videoDuration) * width;
  524. const widthAfterDuration = (afterDuration / videoDuration) * width;
  525. const widthCurrentTime = (currentTime / videoDuration) * width;
  526. const skipDurationColor = "#ef4a1c";
  527. const durationColor = "#1dc146";
  528. const afterDurationColor = "#ef731a";
  529. const currentDurationColor = "#3b25e8";
  530. ctx.fillStyle = skipDurationColor;
  531. ctx.fillRect(0, 0, widthSkipDuration, 20);
  532. ctx.fillStyle = durationColor;
  533. ctx.fillRect(widthSkipDuration, 0, widthDuration, 20);
  534. ctx.fillStyle = afterDurationColor;
  535. ctx.fillRect(
  536. widthSkipDuration + widthDuration,
  537. 0,
  538. widthAfterDuration,
  539. 20
  540. );
  541. ctx.fillStyle = currentDurationColor;
  542. ctx.fillRect(widthCurrentTime, 0, 1, 20);
  543. },
  544. ...mapActions("admin/songs", [
  545. "stopVideo",
  546. "loadVideoById",
  547. "pauseVideo",
  548. "getCurrentTime",
  549. "editSong"
  550. ]),
  551. ...mapActions("modals", ["closeModal"])
  552. },
  553. mounted() {
  554. // if (this.modals.editSong = false) this.video.player.stopVideo();
  555. // this.loadVideoById(
  556. // this.editing.song.songId,
  557. // this.editing.song.skipDuration
  558. // );
  559. this.initCanvas();
  560. lofig.get("cookie.secure", res => {
  561. this.useHTTPS = res;
  562. });
  563. io.getSocket(socket => {
  564. this.socket = socket;
  565. });
  566. setInterval(() => {
  567. if (
  568. this.video.paused === false &&
  569. this.playerReady &&
  570. this.video.player.getCurrentTime() -
  571. this.editing.song.skipDuration >
  572. this.editing.song.duration
  573. ) {
  574. this.video.paused = false;
  575. this.video.player.stopVideo();
  576. }
  577. if (this.playerReady) {
  578. this.getCurrentTime(3).then(time => {
  579. this.youtubeVideoCurrentTime = time;
  580. return time;
  581. });
  582. }
  583. if (this.video.paused === false) this.drawCanvas();
  584. }, 200);
  585. this.video.player = new window.YT.Player("player", {
  586. height: 315,
  587. width: 560,
  588. videoId: this.editing.song.songId,
  589. playerVars: {
  590. controls: 0,
  591. iv_load_policy: 3,
  592. rel: 0,
  593. showinfo: 0,
  594. autoplay: 1
  595. },
  596. startSeconds: this.editing.song.skipDuration,
  597. events: {
  598. onReady: () => {
  599. let volume = parseInt(localStorage.getItem("volume"));
  600. volume = typeof volume === "number" ? volume : 20;
  601. console.log(`Seekto: ${this.editing.song.skipDuration}`);
  602. this.video.player.seekTo(this.editing.song.skipDuration);
  603. this.video.player.setVolume(volume);
  604. if (volume > 0) this.video.player.unMute();
  605. this.youtubeVideoDuration = this.video.player.getDuration();
  606. this.youtubeVideoNote = "(~)";
  607. this.playerReady = true;
  608. this.drawCanvas();
  609. },
  610. onStateChange: event => {
  611. if (event.data === 1) {
  612. if (!this.video.autoPlayed) {
  613. this.video.autoPlayed = true;
  614. return this.video.player.stopVideo();
  615. }
  616. this.video.paused = false;
  617. let youtubeDuration = this.video.player.getDuration();
  618. this.youtubeVideoDuration = youtubeDuration;
  619. this.youtubeVideoNote = "";
  620. youtubeDuration -= this.editing.song.skipDuration;
  621. if (this.editing.song.duration > youtubeDuration + 1) {
  622. this.video.player.stopVideo();
  623. this.video.paused = true;
  624. return Toast.methods.addToast(
  625. "Video can't play. Specified duration is bigger than the YouTube song duration.",
  626. 4000
  627. );
  628. }
  629. if (this.editing.song.duration <= 0) {
  630. this.video.player.stopVideo();
  631. this.video.paused = true;
  632. return Toast.methods.addToast(
  633. "Video can't play. Specified duration has to be more than 0 seconds.",
  634. 4000
  635. );
  636. }
  637. if (
  638. this.video.player.getCurrentTime() <
  639. this.editing.song.skipDuration
  640. ) {
  641. return this.video.player.seekTo(
  642. this.editing.song.skipDuration
  643. );
  644. }
  645. } else if (event.data === 2) {
  646. this.video.paused = true;
  647. }
  648. return false;
  649. }
  650. }
  651. });
  652. let volume = parseInt(localStorage.getItem("volume"));
  653. document.getElementById("volumeSlider").value = volume =
  654. typeof volume === "number" ? volume : 20;
  655. }
  656. };
  657. </script>
  658. <style lang="scss" scoped>
  659. @import "styles/global.scss";
  660. input[type="range"] {
  661. -webkit-appearance: none;
  662. width: 100%;
  663. margin: 7.3px 0;
  664. }
  665. input[type="range"]:focus {
  666. outline: none;
  667. }
  668. input[type="range"]::-webkit-slider-runnable-track {
  669. width: 100%;
  670. height: 5.2px;
  671. cursor: pointer;
  672. box-shadow: 0;
  673. background: $light-grey-2;
  674. border-radius: 0;
  675. border: 0;
  676. }
  677. input[type="range"]::-webkit-slider-thumb {
  678. box-shadow: 0;
  679. border: 0;
  680. height: 19px;
  681. width: 19px;
  682. border-radius: 15px;
  683. background: $primary-color;
  684. cursor: pointer;
  685. -webkit-appearance: none;
  686. margin-top: -6.5px;
  687. }
  688. input[type="range"]::-moz-range-track {
  689. width: 100%;
  690. height: 5.2px;
  691. cursor: pointer;
  692. box-shadow: 0;
  693. background: $light-grey-2;
  694. border-radius: 0;
  695. border: 0;
  696. }
  697. input[type="range"]::-moz-range-thumb {
  698. box-shadow: 0;
  699. border: 0;
  700. height: 19px;
  701. width: 19px;
  702. border-radius: 15px;
  703. background: $primary-color;
  704. cursor: pointer;
  705. -webkit-appearance: none;
  706. margin-top: -6.5px;
  707. }
  708. input[type="range"]::-ms-track {
  709. width: 100%;
  710. height: 5.2px;
  711. cursor: pointer;
  712. box-shadow: 0;
  713. background: $light-grey-2;
  714. border-radius: 1.3px;
  715. }
  716. input[type="range"]::-ms-fill-lower {
  717. background: $light-grey-2;
  718. border: 0;
  719. border-radius: 0;
  720. box-shadow: 0;
  721. }
  722. input[type="range"]::-ms-fill-upper {
  723. background: $light-grey-2;
  724. border: 0;
  725. border-radius: 0;
  726. box-shadow: 0;
  727. }
  728. input[type="range"]::-ms-thumb {
  729. box-shadow: 0;
  730. border: 0;
  731. height: 15px;
  732. width: 15px;
  733. border-radius: 15px;
  734. background: $primary-color;
  735. cursor: pointer;
  736. -webkit-appearance: none;
  737. margin-top: 1.5px;
  738. }
  739. .controls {
  740. display: flex;
  741. flex-direction: column;
  742. align-items: center;
  743. }
  744. .artist-genres {
  745. display: flex;
  746. justify-content: space-between;
  747. }
  748. #volumeSlider {
  749. margin-bottom: 15px;
  750. }
  751. .has-text-centered {
  752. padding: 10px;
  753. }
  754. .thumbnail-preview {
  755. display: flex;
  756. margin: 0 auto 25px auto;
  757. max-width: 200px;
  758. width: 100%;
  759. }
  760. .modal-card-body,
  761. .modal-card-foot {
  762. border-top: 0;
  763. }
  764. .label,
  765. .checkbox,
  766. h5 {
  767. font-weight: normal;
  768. }
  769. .video-container {
  770. display: flex;
  771. flex-direction: column;
  772. align-items: center;
  773. padding: 10px;
  774. iframe {
  775. pointer-events: none;
  776. }
  777. }
  778. .save-changes {
  779. color: $white;
  780. }
  781. .tag:not(:last-child) {
  782. margin-right: 5px;
  783. }
  784. </style>