EditSong.vue 20 KB

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