EditSong.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  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(song, close) {
  315. const _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. error = "Artist must have between 1 and 32 characters.";
  357. return error;
  358. }
  359. if (!validation.regex.ascii.test(artist)) {
  360. error =
  361. "Invalid artist format. Only ascii characters are allowed.";
  362. return error;
  363. }
  364. if (artist === "NONE") {
  365. error =
  366. 'Invalid artist format. Artists are not allowed to be named "NONE".';
  367. return error;
  368. }
  369. return false;
  370. });
  371. if (error) return Toast.methods.addToast(error, 8000);
  372. // Genres
  373. error = undefined;
  374. song.genres.forEach(genre => {
  375. if (!validation.isLength(genre, 1, 16)) {
  376. error = "Genre must have between 1 and 16 characters.";
  377. return error;
  378. }
  379. if (!validation.regex.az09_.test(genre)) {
  380. error =
  381. "Invalid genre format. Only ascii characters are allowed.";
  382. return error;
  383. }
  384. return false;
  385. });
  386. if (error) return Toast.methods.addToast(error, 8000);
  387. // Thumbnail
  388. if (!validation.isLength(song.thumbnail, 8, 256))
  389. return Toast.methods.addToast(
  390. "Thumbnail must have between 8 and 256 characters.",
  391. 8000
  392. );
  393. if (this.useHTTPS && song.thumbnail.indexOf("https://") !== 0) {
  394. return Toast.methods.addToast(
  395. 'Thumbnail must start with "https://".',
  396. 8000
  397. );
  398. }
  399. if (!this.useHTTPS && song.thumbnail.indexOf("http://") !== 0) {
  400. return Toast.methods.addToast(
  401. 'Thumbnail must start with "http://".',
  402. 8000
  403. );
  404. }
  405. return this.socket.emit(
  406. `${_this.editing.type}.update`,
  407. song._id,
  408. song,
  409. res => {
  410. Toast.methods.addToast(res.message, 4000);
  411. if (res.status === "success") {
  412. _this.$parent.songs.forEach(originalSong => {
  413. const updatedSong = song;
  414. if (originalSong._id === updatedSong._id) {
  415. Object.keys(originalSong).forEach(n => {
  416. updatedSong[n] = originalSong[n];
  417. return originalSong[n];
  418. });
  419. }
  420. });
  421. }
  422. if (close)
  423. _this.closeModal({
  424. sector: "admin",
  425. modal: "editSong"
  426. });
  427. }
  428. );
  429. },
  430. settings(type) {
  431. const _this = this;
  432. switch (type) {
  433. default:
  434. break;
  435. case "stop":
  436. _this.stopVideo();
  437. _this.pauseVideo(true);
  438. break;
  439. case "pause":
  440. _this.pauseVideo(true);
  441. break;
  442. case "play":
  443. _this.pauseVideo(false);
  444. break;
  445. case "skipToLast10Secs":
  446. _this.video.player.seekTo(
  447. _this.editing.song.duration -
  448. 10 +
  449. _this.editing.song.skipDuration
  450. );
  451. break;
  452. }
  453. },
  454. changeVolume() {
  455. const local = this;
  456. const volume = document.getElementById("volumeSlider").value;
  457. localStorage.setItem("volume", volume);
  458. local.video.player.setVolume(volume);
  459. if (volume > 0) local.video.player.unMute();
  460. },
  461. addTag(type) {
  462. if (type === "genres") {
  463. const genre = document
  464. .getElementById("new-genre")
  465. .value.toLowerCase()
  466. .trim();
  467. if (this.editing.song.genres.indexOf(genre) !== -1)
  468. return Toast.methods.addToast("Genre already exists", 3000);
  469. if (genre) {
  470. this.editing.song.genres.push(genre);
  471. document.getElementById("new-genre").value = "";
  472. return false;
  473. }
  474. return Toast.methods.addToast("Genre cannot be empty", 3000);
  475. }
  476. if (type === "artists") {
  477. const artist = document.getElementById("new-artist").value;
  478. if (this.editing.song.artists.indexOf(artist) !== -1)
  479. return Toast.methods.addToast(
  480. "Artist already exists",
  481. 3000
  482. );
  483. if (document.getElementById("new-artist").value !== "") {
  484. this.editing.song.artists.push(artist);
  485. document.getElementById("new-artist").value = "";
  486. return false;
  487. }
  488. return Toast.methods.addToast("Artist cannot be empty", 3000);
  489. }
  490. return false;
  491. },
  492. removeTag(type, index) {
  493. if (type === "genres") this.editing.song.genres.splice(index, 1);
  494. else if (type === "artists")
  495. this.editing.song.artists.splice(index, 1);
  496. },
  497. getSpotifySongs() {
  498. this.socket.emit(
  499. "apis.getSpotifySongs",
  500. this.spotify.title,
  501. this.spotify.artist,
  502. res => {
  503. if (res.status === "success") {
  504. Toast.methods.addToast(
  505. `Succesfully got ${res.songs.length} song${
  506. res.songs.length !== 1 ? "s" : ""
  507. }.`,
  508. 3000
  509. );
  510. this.spotify.songs = res.songs;
  511. } else
  512. Toast.methods.addToast(
  513. `Failed to get songs. ${res.message}`,
  514. 3000
  515. );
  516. }
  517. );
  518. },
  519. initCanvas() {
  520. const canvasElement = document.getElementById("durationCanvas");
  521. const ctx = canvasElement.getContext("2d");
  522. const skipDurationColor = "#ef4a1c";
  523. const durationColor = "#1dc146";
  524. const afterDurationColor = "#ef731a";
  525. ctx.font = "16px Arial";
  526. ctx.fillStyle = skipDurationColor;
  527. ctx.fillRect(0, 25, 20, 15);
  528. ctx.fillStyle = "#000000";
  529. ctx.fillText("Skip duration", 25, 38);
  530. ctx.fillStyle = durationColor;
  531. ctx.fillRect(130, 25, 20, 15);
  532. ctx.fillStyle = "#000000";
  533. ctx.fillText("Duration", 155, 38);
  534. ctx.fillStyle = afterDurationColor;
  535. ctx.fillRect(230, 25, 20, 15);
  536. ctx.fillStyle = "#000000";
  537. ctx.fillText("After duration", 255, 38);
  538. },
  539. drawCanvas() {
  540. const canvasElement = document.getElementById("durationCanvas");
  541. const ctx = canvasElement.getContext("2d");
  542. const videoDuration = Number(this.youtubeVideoDuration);
  543. const skipDuration = Number(this.editing.song.skipDuration);
  544. const duration = Number(this.editing.song.duration);
  545. const afterDuration = videoDuration - (skipDuration + duration);
  546. const width = 560;
  547. const currentTime = this.video.player.getCurrentTime();
  548. const widthSkipDuration = (skipDuration / videoDuration) * width;
  549. const widthDuration = (duration / videoDuration) * width;
  550. const widthAfterDuration = (afterDuration / videoDuration) * width;
  551. const widthCurrentTime = (currentTime / videoDuration) * width;
  552. const skipDurationColor = "#ef4a1c";
  553. const durationColor = "#1dc146";
  554. const afterDurationColor = "#ef731a";
  555. const currentDurationColor = "#3b25e8";
  556. ctx.fillStyle = skipDurationColor;
  557. ctx.fillRect(0, 0, widthSkipDuration, 20);
  558. ctx.fillStyle = durationColor;
  559. ctx.fillRect(widthSkipDuration, 0, widthDuration, 20);
  560. ctx.fillStyle = afterDurationColor;
  561. ctx.fillRect(
  562. widthSkipDuration + widthDuration,
  563. 0,
  564. widthAfterDuration,
  565. 20
  566. );
  567. ctx.fillStyle = currentDurationColor;
  568. ctx.fillRect(widthCurrentTime, 0, 1, 20);
  569. },
  570. ...mapActions("admin/songs", [
  571. "stopVideo",
  572. "loadVideoById",
  573. "pauseVideo",
  574. "getCurrentTime",
  575. "editSong"
  576. ]),
  577. ...mapActions("modals", ["closeModal"])
  578. },
  579. mounted() {
  580. const _this = this;
  581. // if (this.modals.editSong = false) this.video.player.stopVideo();
  582. // this.loadVideoById(
  583. // this.editing.song.songId,
  584. // this.editing.song.skipDuration
  585. // );
  586. this.initCanvas();
  587. lofig.get("cookie.secure", res => {
  588. _this.useHTTPS = res;
  589. });
  590. io.getSocket(socket => {
  591. this.socket = socket;
  592. if (this.editing.type === "songs") {
  593. socket.emit(
  594. "reports.getReportsForSong",
  595. this.editing.song.songId,
  596. res => {
  597. this.reports = res.data;
  598. }
  599. );
  600. }
  601. });
  602. setInterval(() => {
  603. if (
  604. _this.video.paused === false &&
  605. _this.playerReady &&
  606. _this.video.player.getCurrentTime() -
  607. _this.editing.song.skipDuration >
  608. _this.editing.song.duration
  609. ) {
  610. _this.video.paused = false;
  611. _this.video.player.stopVideo();
  612. }
  613. if (this.playerReady) {
  614. _this.getCurrentTime(3).then(time => {
  615. this.youtubeVideoCurrentTime = time;
  616. return time;
  617. });
  618. }
  619. if (_this.video.paused === false) _this.drawCanvas();
  620. }, 200);
  621. this.video.player = new window.YT.Player("player", {
  622. height: 315,
  623. width: 560,
  624. videoId: this.editing.song.songId,
  625. playerVars: {
  626. controls: 0,
  627. iv_load_policy: 3,
  628. rel: 0,
  629. showinfo: 0,
  630. autoplay: 1
  631. },
  632. startSeconds: _this.editing.song.skipDuration,
  633. events: {
  634. onReady: () => {
  635. let volume = parseInt(localStorage.getItem("volume"));
  636. volume = typeof volume === "number" ? volume : 20;
  637. console.log(`Seekto: ${_this.editing.song.skipDuration}`);
  638. _this.video.player.seekTo(_this.editing.song.skipDuration);
  639. _this.video.player.setVolume(volume);
  640. if (volume > 0) _this.video.player.unMute();
  641. this.youtubeVideoDuration = _this.video.player.getDuration();
  642. this.youtubeVideoNote = "(~)";
  643. _this.playerReady = true;
  644. _this.drawCanvas();
  645. },
  646. onStateChange: event => {
  647. if (event.data === 1) {
  648. if (!_this.video.autoPlayed) {
  649. _this.video.autoPlayed = true;
  650. return _this.video.player.stopVideo();
  651. }
  652. _this.video.paused = false;
  653. let youtubeDuration = _this.video.player.getDuration();
  654. this.youtubeVideoDuration = youtubeDuration;
  655. this.youtubeVideoNote = "";
  656. youtubeDuration -= _this.editing.song.skipDuration;
  657. if (_this.editing.song.duration > youtubeDuration + 1) {
  658. this.video.player.stopVideo();
  659. _this.video.paused = true;
  660. return Toast.methods.addToast(
  661. "Video can't play. Specified duration is bigger than the YouTube song duration.",
  662. 4000
  663. );
  664. }
  665. if (_this.editing.song.duration <= 0) {
  666. this.video.player.stopVideo();
  667. _this.video.paused = true;
  668. return Toast.methods.addToast(
  669. "Video can't play. Specified duration has to be more than 0 seconds.",
  670. 4000
  671. );
  672. }
  673. if (
  674. _this.video.player.getCurrentTime() <
  675. _this.editing.song.skipDuration
  676. ) {
  677. return _this.video.player.seekTo(
  678. _this.editing.song.skipDuration
  679. );
  680. }
  681. } else if (event.data === 2) {
  682. this.video.paused = true;
  683. }
  684. return false;
  685. }
  686. }
  687. });
  688. let volume = parseInt(localStorage.getItem("volume"));
  689. document.getElementById("volumeSlider").value = volume =
  690. typeof volume === "number" ? volume : 20;
  691. }
  692. };
  693. </script>
  694. <style lang="scss" scoped>
  695. input[type="range"] {
  696. -webkit-appearance: none;
  697. width: 100%;
  698. margin: 7.3px 0;
  699. }
  700. input[type="range"]:focus {
  701. outline: none;
  702. }
  703. input[type="range"]::-webkit-slider-runnable-track {
  704. width: 100%;
  705. height: 5.2px;
  706. cursor: pointer;
  707. box-shadow: 0;
  708. background: #c2c0c2;
  709. border-radius: 0;
  710. border: 0;
  711. }
  712. input[type="range"]::-webkit-slider-thumb {
  713. box-shadow: 0;
  714. border: 0;
  715. height: 19px;
  716. width: 19px;
  717. border-radius: 15px;
  718. background: #03a9f4;
  719. cursor: pointer;
  720. -webkit-appearance: none;
  721. margin-top: -6.5px;
  722. }
  723. input[type="range"]::-moz-range-track {
  724. width: 100%;
  725. height: 5.2px;
  726. cursor: pointer;
  727. box-shadow: 0;
  728. background: #c2c0c2;
  729. border-radius: 0;
  730. border: 0;
  731. }
  732. input[type="range"]::-moz-range-thumb {
  733. box-shadow: 0;
  734. border: 0;
  735. height: 19px;
  736. width: 19px;
  737. border-radius: 15px;
  738. background: #03a9f4;
  739. cursor: pointer;
  740. -webkit-appearance: none;
  741. margin-top: -6.5px;
  742. }
  743. input[type="range"]::-ms-track {
  744. width: 100%;
  745. height: 5.2px;
  746. cursor: pointer;
  747. box-shadow: 0;
  748. background: #c2c0c2;
  749. border-radius: 1.3px;
  750. }
  751. input[type="range"]::-ms-fill-lower {
  752. background: #c2c0c2;
  753. border: 0;
  754. border-radius: 0;
  755. box-shadow: 0;
  756. }
  757. input[type="range"]::-ms-fill-upper {
  758. background: #c2c0c2;
  759. border: 0;
  760. border-radius: 0;
  761. box-shadow: 0;
  762. }
  763. input[type="range"]::-ms-thumb {
  764. box-shadow: 0;
  765. border: 0;
  766. height: 15px;
  767. width: 15px;
  768. border-radius: 15px;
  769. background: #03a9f4;
  770. cursor: pointer;
  771. -webkit-appearance: none;
  772. margin-top: 1.5px;
  773. }
  774. .controls {
  775. display: flex;
  776. flex-direction: column;
  777. align-items: center;
  778. }
  779. .artist-genres {
  780. display: flex;
  781. justify-content: space-between;
  782. }
  783. #volumeSlider {
  784. margin-bottom: 15px;
  785. }
  786. .has-text-centered {
  787. padding: 10px;
  788. }
  789. .thumbnail-preview {
  790. display: flex;
  791. margin: 0 auto 25px auto;
  792. max-width: 200px;
  793. width: 100%;
  794. }
  795. .modal-card-body,
  796. .modal-card-foot {
  797. border-top: 0;
  798. }
  799. .label,
  800. .checkbox,
  801. h5 {
  802. font-weight: normal;
  803. }
  804. .video-container {
  805. display: flex;
  806. flex-direction: column;
  807. align-items: center;
  808. padding: 10px;
  809. iframe {
  810. pointer-events: none;
  811. }
  812. }
  813. .save-changes {
  814. color: #fff;
  815. }
  816. .tag:not(:last-child) {
  817. margin-right: 5px;
  818. }
  819. .reports-length {
  820. color: #ff4545;
  821. font-weight: bold;
  822. display: flex;
  823. justify-content: center;
  824. }
  825. .report-link {
  826. color: #000;
  827. }
  828. </style>