EditSong.vue 20 KB

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