App.vue 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342
  1. <template>
  2. <div class="upper-container">
  3. <banned v-if="banned" />
  4. <div v-else class="upper-container">
  5. <router-view
  6. :key="$route.fullPath"
  7. class="main-container"
  8. :class="{ 'main-container-modal-active': aModalIsOpen2 }"
  9. />
  10. <what-is-new v-show="modals.whatIsNew" />
  11. <login-modal v-if="modals.login" />
  12. <register-modal v-if="modals.register" />
  13. <create-playlist-modal v-if="modals.createPlaylist" />
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import { mapState, mapActions, mapGetters } from "vuex";
  19. import Toast from "toasters";
  20. import { defineAsyncComponent } from "vue";
  21. import ws from "./ws";
  22. import aw from "./aw";
  23. import keyboardShortcuts from "./keyboardShortcuts";
  24. export default {
  25. components: {
  26. WhatIsNew: defineAsyncComponent(() =>
  27. import("@/components/modals/WhatIsNew.vue")
  28. ),
  29. LoginModal: defineAsyncComponent(() =>
  30. import("@/components/modals/Login.vue")
  31. ),
  32. RegisterModal: defineAsyncComponent(() =>
  33. import("@/components/modals/Register.vue")
  34. ),
  35. CreatePlaylistModal: defineAsyncComponent(() =>
  36. import("@/components/modals/CreatePlaylist.vue")
  37. ),
  38. Banned: defineAsyncComponent(() => import("@/pages/Banned.vue"))
  39. },
  40. replace: false,
  41. data() {
  42. return {
  43. apiDomain: "",
  44. socketConnected: true,
  45. keyIsDown: false,
  46. scrollPosition: { y: 0, x: 0 },
  47. aModalIsOpen2: false
  48. };
  49. },
  50. computed: {
  51. ...mapState({
  52. loggedIn: state => state.user.auth.loggedIn,
  53. role: state => state.user.auth.role,
  54. username: state => state.user.auth.username,
  55. userId: state => state.user.auth.userId,
  56. banned: state => state.user.auth.banned,
  57. modals: state => state.modalVisibility.modals,
  58. currentlyActive: state => state.modalVisibility.currentlyActive,
  59. nightmode: state => state.user.preferences.nightmode,
  60. activityWatch: state => state.user.preferences.activityWatch
  61. }),
  62. ...mapGetters({
  63. socket: "websockets/getSocket"
  64. }),
  65. aModalIsOpen() {
  66. return Object.keys(this.currentlyActive).length > 0;
  67. }
  68. },
  69. watch: {
  70. socketConnected(connected) {
  71. if (!connected) this.disconnectedMessage.show();
  72. else this.disconnectedMessage.hide();
  73. },
  74. nightmode(nightmode) {
  75. if (nightmode) this.enableNightmode();
  76. else this.disableNightmode();
  77. },
  78. activityWatch(activityWatch) {
  79. if (activityWatch) aw.enable();
  80. else aw.disable();
  81. },
  82. aModalIsOpen(aModalIsOpen) {
  83. if (aModalIsOpen) {
  84. this.scrollPosition = {
  85. x: window.scrollX,
  86. y: window.scrollY
  87. };
  88. this.aModalIsOpen2 = true;
  89. } else {
  90. this.aModalIsOpen2 = false;
  91. setTimeout(() => {
  92. window.scrollTo(
  93. this.scrollPosition.x,
  94. this.scrollPosition.y
  95. );
  96. }, 10);
  97. }
  98. }
  99. },
  100. async mounted() {
  101. window
  102. .matchMedia("(prefers-color-scheme: dark)")
  103. .addEventListener("change", e => {
  104. if (e.matches === !this.nightmode) this.toggleNightMode();
  105. });
  106. document.onkeydown = ev => {
  107. const event = ev || window.event;
  108. const { keyCode } = event;
  109. const shift = event.shiftKey;
  110. const ctrl = event.ctrlKey;
  111. const alt = event.altKey;
  112. const identifier = `${keyCode}.${shift}.${ctrl}`;
  113. if (this.keyIsDown === identifier) return;
  114. this.keyIsDown = identifier;
  115. keyboardShortcuts.handleKeyDown(event, keyCode, shift, ctrl, alt);
  116. };
  117. document.onkeyup = () => {
  118. this.keyIsDown = "";
  119. };
  120. // ctrl + alt + n
  121. keyboardShortcuts.registerShortcut("nightmode", {
  122. keyCode: 78,
  123. ctrl: true,
  124. alt: true,
  125. handler: () => this.toggleNightMode()
  126. });
  127. keyboardShortcuts.registerShortcut("closeModal", {
  128. keyCode: 27,
  129. shift: false,
  130. ctrl: false,
  131. handler: () => {
  132. if (Object.keys(this.currentlyActive).length !== 0)
  133. this.closeCurrentModal();
  134. }
  135. });
  136. if (localStorage.getItem("github_redirect")) {
  137. setTimeout(
  138. () =>
  139. this.$router.push(localStorage.getItem("github_redirect")),
  140. 50
  141. );
  142. localStorage.removeItem("github_redirect");
  143. }
  144. this.disconnectedMessage = new Toast({
  145. content: "Could not connect to the server.",
  146. persistent: true,
  147. interactable: false
  148. });
  149. this.disconnectedMessage.hide();
  150. ws.onConnect(true, () => {
  151. this.socketConnected = true;
  152. });
  153. ws.onDisconnect(true, () => {
  154. this.socketConnected = false;
  155. });
  156. this.apiDomain = await lofig.get("apiDomain");
  157. this.$router.isReady().then(() => {
  158. if (this.$route.query.err) {
  159. let { err } = this.$route.query;
  160. err = err
  161. .replace(new RegExp("<", "g"), "&lt;")
  162. .replace(new RegExp(">", "g"), "&gt;");
  163. this.$router.push({ query: {} });
  164. new Toast({ content: err, timeout: 20000 });
  165. }
  166. if (this.$route.query.msg) {
  167. let { msg } = this.$route.query;
  168. msg = msg
  169. .replace(new RegExp("<", "g"), "&lt;")
  170. .replace(new RegExp(">", "g"), "&gt;");
  171. this.$router.push({ query: {} });
  172. new Toast({ content: msg, timeout: 20000 });
  173. }
  174. });
  175. if (localStorage.getItem("nightmode") === "true") {
  176. this.changeNightmode(true);
  177. this.enableNightmode();
  178. }
  179. this.socket.dispatch("users.getPreferences", res => {
  180. if (res.status === "success") {
  181. const { preferences } = res.data;
  182. this.changeAutoSkipDisliked(preferences.autoSkipDisliked);
  183. this.changeNightmode(preferences.nightmode);
  184. this.changeActivityLogPublic(preferences.activityLogPublic);
  185. this.changeAnonymousSongRequests(
  186. preferences.anonymousSongRequests
  187. );
  188. this.changeActivityWatch(preferences.activityWatch);
  189. if (this.nightmode) this.enableNightmode();
  190. else this.disableNightmode();
  191. }
  192. });
  193. this.socket.on("keep.event:user.session.deleted", () =>
  194. window.location.reload()
  195. );
  196. },
  197. methods: {
  198. toggleNightMode() {
  199. localStorage.setItem("nightmode", !this.nightmode);
  200. if (this.loggedIn) {
  201. this.socket.dispatch(
  202. "users.updatePreferences",
  203. { nightmode: !this.nightmode },
  204. res => {
  205. if (res.status !== "success") new Toast(res.message);
  206. }
  207. );
  208. }
  209. this.changeNightmode(!this.nightmode);
  210. },
  211. enableNightmode: () => {
  212. document
  213. .getElementsByTagName("body")[0]
  214. .classList.add("night-mode");
  215. },
  216. disableNightmode: () => {
  217. document
  218. .getElementsByTagName("body")[0]
  219. .classList.remove("night-mode");
  220. },
  221. ...mapActions("modalVisibility", ["closeCurrentModal"]),
  222. ...mapActions("user/preferences", [
  223. "changeNightmode",
  224. "changeAutoSkipDisliked",
  225. "changeActivityLogPublic",
  226. "changeAnonymousSongRequests",
  227. "changeActivityWatch"
  228. ])
  229. }
  230. };
  231. </script>
  232. <style lang="scss">
  233. @import "tippy.js/dist/tippy.css";
  234. @import "tippy.js/animations/scale.css";
  235. :root {
  236. --primary-color: var(--blue);
  237. --blue: rgb(2, 166, 242);
  238. --light-blue: rgb(163, 224, 255);
  239. --dark-blue: rgb(0, 102, 244);
  240. --teal: rgb(0, 209, 178);
  241. --purple: rgb(143, 40, 140);
  242. --light-purple: rgb(170, 141, 216);
  243. --yellow: rgb(241, 196, 15);
  244. --light-pink: rgb(228, 155, 166);
  245. --dark-pink: rgb(234, 72, 97);
  246. --orange: rgb(255, 94, 0);
  247. --dark-orange: rgb(250, 50, 0);
  248. --green: rgb(68, 189, 50);
  249. --red: rgb(231, 77, 60);
  250. --white: rgb(255, 255, 255);
  251. --black: rgb(0, 0, 0);
  252. --light-grey: rgb(245, 245, 245);
  253. --light-grey-2: rgb(221, 221, 221);
  254. --light-grey-3: rgb(195, 193, 195);
  255. --grey: rgb(107, 107, 107);
  256. --grey-2: rgb(113, 113, 113);
  257. --grey-3: rgb(126, 126, 126);
  258. --dark-grey: rgb(77, 77, 77);
  259. --dark-grey-2: rgb(51, 51, 51);
  260. --dark-grey-3: rgb(34, 34, 34);
  261. --dark-grey-4: rgb(26, 26, 26);
  262. --youtube: rgb(189, 46, 46);
  263. }
  264. .night-mode {
  265. div {
  266. // background-color: var(--black);
  267. color: var(--light-grey-2);
  268. }
  269. // #toasts-container .toast {
  270. // color: var(--dark-grey-2);
  271. // background-color: var(--light-grey-3) !important;
  272. .input,
  273. .textarea,
  274. .select select {
  275. background-color: var(--dark-grey);
  276. border-color: var(--grey-3);
  277. color: var(--white);
  278. &::placeholder {
  279. color: var(--light-grey-3);
  280. }
  281. }
  282. // &:last-of-type {
  283. // background-color: var(--light-grey) !important;
  284. // }
  285. // }
  286. h1,
  287. h2,
  288. h3,
  289. h4,
  290. h5,
  291. h6 {
  292. color: var(--white) !important;
  293. }
  294. p:not(.help),
  295. label,
  296. .label {
  297. color: var(--light-grey-2) !important;
  298. }
  299. .section,
  300. .content {
  301. background-color: var(--dark-grey-3) !important;
  302. }
  303. .content-box,
  304. .step:not(.selected) {
  305. background-color: var(--dark-grey-3) !important;
  306. }
  307. .tippy-box[data-theme~="songActions"] {
  308. background-color: var(--dark-grey);
  309. }
  310. }
  311. body.night-mode {
  312. background-color: var(--black) !important;
  313. }
  314. #toasts-container {
  315. z-index: 10000 !important;
  316. .toast {
  317. font-weight: 600;
  318. // background-color: var(--dark-grey) !important;
  319. // &:last-of-type {
  320. // background-color: var(--dark-grey-2) !important;
  321. // }
  322. }
  323. }
  324. html {
  325. overflow: auto !important;
  326. height: 100%;
  327. }
  328. body {
  329. background-color: var(--light-grey);
  330. color: var(--dark-grey);
  331. height: 100%;
  332. font-family: "Inter", Helvetica, Arial, sans-serif;
  333. }
  334. h1,
  335. h2,
  336. h3,
  337. h4,
  338. h5,
  339. h6,
  340. .sidebar-title {
  341. font-family: "Inter", Helvetica, Arial, sans-serif;
  342. }
  343. .modal-card-title {
  344. font-weight: 600;
  345. font-family: "Inter", Helvetica, Arial, sans-serif;
  346. }
  347. p,
  348. button,
  349. input,
  350. select,
  351. textarea {
  352. font-family: "Inter", Helvetica, Arial, sans-serif;
  353. }
  354. #page-title {
  355. margin-top: 0;
  356. font-size: 35px;
  357. text-align: center;
  358. }
  359. @media only screen and (min-width: 700px) {
  360. #page-title {
  361. margin: 0;
  362. margin-bottom: 30px;
  363. font-size: 40px;
  364. }
  365. }
  366. .upper-container {
  367. height: 100%;
  368. }
  369. .main-container {
  370. height: 100%;
  371. min-height: 100vh;
  372. display: flex;
  373. flex-direction: column;
  374. > .container {
  375. flex: 1 0 auto;
  376. }
  377. }
  378. .main-container.main-container-modal-active {
  379. height: 100% !important;
  380. overflow: hidden !important;
  381. }
  382. a {
  383. color: var(--primary-color);
  384. text-decoration: none;
  385. }
  386. .modal-card {
  387. margin: 0 !important;
  388. }
  389. .absolute-a {
  390. width: 100%;
  391. height: 100%;
  392. position: absolute;
  393. top: 0;
  394. left: 0;
  395. }
  396. .alert {
  397. padding: 20px;
  398. color: var(--white);
  399. background-color: var(--red);
  400. position: fixed;
  401. top: 50px;
  402. right: 50px;
  403. font-size: 2em;
  404. border-radius: 5px;
  405. z-index: 10000000;
  406. }
  407. .night-mode {
  408. .tippy-box {
  409. border: 1px solid var(--light-grey-3);
  410. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
  411. 0 10px 10px rgba(0, 0, 0, 0.22);
  412. background-color: var(--white);
  413. &:not([data-theme~="songActions"]) > .tippy-arrow::before {
  414. border-top-color: var(--white);
  415. }
  416. .tippy-content {
  417. color: var(--black);
  418. }
  419. &[data-theme~="songActions"],
  420. &[data-theme~="addToPlaylist"],
  421. &[data-theme~="stationSettings"] {
  422. background-color: var(--dark-grey-2);
  423. border: 0 !important;
  424. }
  425. &[data-theme~="songActions"] {
  426. background-color: var(--dark-grey-2);
  427. border: 0 !important;
  428. i,
  429. a {
  430. color: var(--white);
  431. }
  432. .youtube-icon {
  433. background-color: var(--white);
  434. }
  435. }
  436. &[data-theme~="addToPlaylist"] {
  437. background-color: var(--dark-grey-2);
  438. border: 0 !important;
  439. .nav-dropdown-items {
  440. .nav-item {
  441. background-color: var(--dark-grey);
  442. &:focus {
  443. outline-color: var(--dark-grey);
  444. }
  445. p {
  446. color: var(--white);
  447. }
  448. }
  449. }
  450. }
  451. }
  452. .tippy-box[data-placement^="top"] {
  453. &[data-theme~="songActions"],
  454. &[data-theme~="addToPlaylist"] {
  455. > .tippy-arrow::before {
  456. border-top-color: var(--dark-grey-2);
  457. }
  458. }
  459. }
  460. .tippy-box[data-placement^="bottom"] {
  461. &[data-theme~="songActions"],
  462. &[data-theme~="addToPlaylist"],
  463. &[data-theme~="stationSettings"] {
  464. > .tippy-arrow::before {
  465. border-bottom-color: var(--dark-grey-2);
  466. }
  467. }
  468. }
  469. .tippy-box[data-placement^="left"] {
  470. &[data-theme~="songActions"],
  471. &[data-theme~="addToPlaylist"] {
  472. > .tippy-arrow::before {
  473. border-left-color: var(--dark-grey-2);
  474. }
  475. }
  476. }
  477. .tippy-box[data-placement^="right"] {
  478. &[data-theme~="songActions"],
  479. &[data-theme~="addToPlaylist"] {
  480. > .tippy-arrow::before {
  481. border-right-color: var(--dark-grey-2);
  482. }
  483. }
  484. }
  485. }
  486. .tippy-box[data-theme~="info"] {
  487. font-size: 12px;
  488. letter-spacing: 1px;
  489. }
  490. .tippy-box[data-theme~="confirm"] {
  491. background-color: var(--red);
  492. border: 0;
  493. .tippy-content {
  494. padding: 0;
  495. }
  496. a {
  497. padding: 15px;
  498. line-height: 30px;
  499. color: var(--white);
  500. border-bottom: 0;
  501. font-size: 15px;
  502. font-weight: 600;
  503. &:hover,
  504. &:focus {
  505. filter: brightness(90%);
  506. }
  507. }
  508. }
  509. .tippy-box[data-theme~="songActions"] {
  510. font-size: 15px;
  511. padding: 5px 10px;
  512. border: 1px solid var(--light-grey-3);
  513. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  514. background-color: var(--white);
  515. .button {
  516. width: 146px;
  517. }
  518. i,
  519. a {
  520. display: inline-block;
  521. cursor: pointer;
  522. color: var(--dark-grey);
  523. vertical-align: middle;
  524. &:hover,
  525. &:focus {
  526. filter: brightness(90%);
  527. }
  528. &:not(:first) {
  529. margin-left: 5px;
  530. }
  531. }
  532. .play-icon {
  533. color: var(--green);
  534. }
  535. .edit-icon,
  536. .view-icon,
  537. .add-to-playlist-icon,
  538. .add-to-queue-icon {
  539. color: var(--primary-color);
  540. }
  541. .hide-icon {
  542. color: var(--light-grey-3);
  543. }
  544. .stop-icon,
  545. .delete-icon {
  546. color: var(--red);
  547. }
  548. .report-icon {
  549. color: var(--yellow);
  550. }
  551. }
  552. .tippy-box[data-placement^="top"] {
  553. &[data-theme~="songActions"],
  554. &[data-theme~="addToPlaylist"] {
  555. > .tippy-arrow::before {
  556. border-top-color: var(--white);
  557. }
  558. }
  559. &[data-theme~="confirm"] > .tippy-arrow::before {
  560. border-top-color: var(--red);
  561. }
  562. }
  563. .tippy-box[data-placement^="bottom"] {
  564. &[data-theme~="songActions"],
  565. &[data-theme~="addToPlaylist"],
  566. &[data-theme~="stationSettings"] {
  567. > .tippy-arrow::before {
  568. border-bottom-color: var(--white);
  569. }
  570. }
  571. &[data-theme~="confirm"] > .tippy-arrow::before {
  572. border-bottom-color: var(--red);
  573. }
  574. }
  575. .tippy-box[data-placement^="left"] {
  576. &[data-theme~="songActions"],
  577. &[data-theme~="addToPlaylist"] {
  578. > .tippy-arrow::before {
  579. border-left-color: var(--white);
  580. }
  581. }
  582. &[data-theme~="confirm"] > .tippy-arrow::before {
  583. border-left-color: var(--red);
  584. }
  585. }
  586. .tippy-box[data-placement^="right"] {
  587. &[data-theme~="songActions"],
  588. &[data-theme~="addToPlaylist"] {
  589. > .tippy-arrow::before {
  590. border-right-color: var(--white);
  591. }
  592. }
  593. &[data-theme~="confirm"] > .tippy-arrow::before {
  594. border-right-color: var(--red);
  595. }
  596. }
  597. .tippy-box[data-theme~="stationSettings"] {
  598. border: 1px solid var(--light-grey-3);
  599. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  600. background-color: var(--white);
  601. button:not(:last-of-type) {
  602. margin-bottom: 5px;
  603. }
  604. }
  605. .tippy-box[data-theme~="addToPlaylist"] {
  606. font-size: 15px;
  607. padding: 5px;
  608. border: 1px solid var(--light-grey-3);
  609. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  610. background-color: var(--white);
  611. color: var(--dark-grey);
  612. width: 100%;
  613. .nav-dropdown-items {
  614. .nav-item {
  615. width: 100%;
  616. justify-content: flex-start;
  617. border: 0;
  618. padding: 10px;
  619. font-size: 15.5px;
  620. min-height: 36px;
  621. background: var(--light-grey);
  622. border-radius: 5px;
  623. cursor: pointer;
  624. .checkbox-control {
  625. display: flex;
  626. flex-direction: row;
  627. align-items: center;
  628. overflow-wrap: anywhere;
  629. p {
  630. margin-left: 10px;
  631. }
  632. .switch {
  633. position: relative;
  634. display: inline-block;
  635. flex-shrink: 0;
  636. width: 40px;
  637. height: 24px;
  638. }
  639. .switch input {
  640. opacity: 0;
  641. width: 0;
  642. height: 0;
  643. }
  644. .slider {
  645. width: 100%;
  646. position: absolute;
  647. cursor: pointer;
  648. top: 0;
  649. left: 0;
  650. right: 0;
  651. bottom: 0;
  652. background-color: #ccc;
  653. transition: 0.2s;
  654. border-radius: 34px;
  655. }
  656. .slider:before {
  657. position: absolute;
  658. content: "";
  659. height: 16px;
  660. width: 16px;
  661. left: 4px;
  662. bottom: 4px;
  663. background-color: white;
  664. transition: 0.2s;
  665. border-radius: 50%;
  666. }
  667. input:checked + .slider {
  668. background-color: var(--primary-color);
  669. }
  670. input:focus + .slider {
  671. box-shadow: 0 0 1px var(--primary-color);
  672. }
  673. input:checked + .slider:before {
  674. transform: translateX(16px);
  675. }
  676. }
  677. &:focus {
  678. outline-color: var(--light-grey-3);
  679. }
  680. &:not(:last-of-type) {
  681. margin-bottom: 5px;
  682. }
  683. }
  684. }
  685. .tippy-content > span {
  686. display: flex;
  687. flex-direction: column;
  688. button {
  689. width: 100%;
  690. &:not(:last-of-type) {
  691. margin-bottom: 10px;
  692. }
  693. }
  694. }
  695. }
  696. .select {
  697. &:after {
  698. border-color: var(--primary-color);
  699. border-width: 1.5px;
  700. margin-top: -3px;
  701. }
  702. select {
  703. height: 36px;
  704. }
  705. }
  706. .button:focus,
  707. .button:active {
  708. border-color: var(--light-grey-2) !important;
  709. }
  710. .input:focus,
  711. .input:active,
  712. .textarea:focus,
  713. .textarea:active,
  714. .select select:focus,
  715. .select select:active {
  716. border-color: var(--primary-color) !important;
  717. }
  718. button.delete:focus {
  719. background-color: rgba(10, 10, 10, 0.3);
  720. }
  721. .tag {
  722. padding-right: 6px !important;
  723. }
  724. .button {
  725. &:hover,
  726. &:focus {
  727. filter: brightness(95%);
  728. }
  729. &.is-success {
  730. background-color: var(--green) !important;
  731. }
  732. &.is-primary {
  733. background-color: var(--primary-color) !important;
  734. }
  735. &.is-danger {
  736. background-color: var(--red) !important;
  737. }
  738. &.is-info {
  739. background-color: var(--primary-color) !important;
  740. }
  741. &.is-warning {
  742. background-color: var(--yellow) !important;
  743. }
  744. }
  745. .input,
  746. .button {
  747. height: 36px;
  748. }
  749. .fadein-helpbox-enter-active {
  750. transition-duration: 0.3s;
  751. transition-timing-function: ease-in;
  752. }
  753. .fadein-helpbox-leave-active {
  754. transition-duration: 0.3s;
  755. transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
  756. }
  757. .fadein-helpbox-enter-to,
  758. .fadein-helpbox-leave {
  759. max-height: 100px;
  760. overflow: hidden;
  761. }
  762. .fadein-helpbox-enter,
  763. .fadein-helpbox-leave-to {
  764. overflow: hidden;
  765. max-height: 0;
  766. }
  767. .control {
  768. margin-bottom: 5px !important;
  769. }
  770. .input-with-button {
  771. .control {
  772. margin-right: 0px !important;
  773. }
  774. input,
  775. select {
  776. width: 100%;
  777. height: 36px;
  778. border-radius: 3px 0 0 3px;
  779. border-right: 0;
  780. border-color: var(--light-grey-3);
  781. }
  782. .button {
  783. height: 36px;
  784. border-radius: 0 3px 3px 0;
  785. }
  786. }
  787. .page-title {
  788. margin: 0 0 50px 0;
  789. }
  790. .material-icons {
  791. user-select: none;
  792. -webkit-user-select: none;
  793. }
  794. .icon-with-button {
  795. margin-right: 3px;
  796. font-size: 18px;
  797. }
  798. .verified-song {
  799. font-size: 17px;
  800. color: var(--primary-color);
  801. }
  802. .section-title,
  803. h4.section-title {
  804. font-size: 26px;
  805. font-weight: 600;
  806. margin: 0px;
  807. }
  808. .section-description {
  809. font-size: 16px;
  810. font-weight: 400;
  811. margin-bottom: 10px !important;
  812. }
  813. .section-horizontal-rule {
  814. margin: 15px 0 30px 0;
  815. }
  816. .section-margin-bottom {
  817. height: 30px;
  818. }
  819. .margin-top-zero {
  820. margin-top: 0 !important;
  821. }
  822. .margin-bottom-zero {
  823. margin-bottom: 0 !important;
  824. }
  825. /** Universial items e.g. playlist items, queue items, activity items */
  826. .item-draggable {
  827. cursor: move;
  828. }
  829. .universal-item {
  830. display: flex;
  831. flex-direction: row;
  832. flex-grow: 1;
  833. align-items: center;
  834. justify-content: space-between;
  835. padding: 7.5px;
  836. border: 1px solid var(--light-grey-3);
  837. border-radius: 3px;
  838. overflow: hidden;
  839. .item-thumbnail {
  840. width: 65px;
  841. height: 65px;
  842. margin: -7.5px;
  843. border-radius: 3px 0 0 3px;
  844. }
  845. .item-title {
  846. font-size: 20px;
  847. overflow: hidden;
  848. text-overflow: ellipsis;
  849. white-space: nowrap;
  850. }
  851. .item-description {
  852. font-size: 14px;
  853. overflow: hidden;
  854. text-overflow: ellipsis;
  855. white-space: nowrap;
  856. }
  857. .universal-item-actions {
  858. display: flex;
  859. flex-direction: row;
  860. margin-left: 10px;
  861. justify-content: center;
  862. @media screen and (max-width: 800px) {
  863. flex-wrap: wrap;
  864. }
  865. .action-dropdown-icon {
  866. display: flex;
  867. color: var(--primary-color);
  868. }
  869. .icons-group {
  870. display: flex;
  871. align-items: center;
  872. a {
  873. padding: 0;
  874. }
  875. }
  876. .button {
  877. width: 146px;
  878. }
  879. i,
  880. span {
  881. cursor: pointer;
  882. // color: var(--dark-grey);
  883. &:not(:first-child) {
  884. margin-left: 5px;
  885. }
  886. }
  887. .play-icon {
  888. color: var(--green);
  889. }
  890. .edit-icon,
  891. .view-icon,
  892. .add-to-playlist-icon {
  893. color: var(--primary-color);
  894. }
  895. .hide-icon {
  896. color: var(--light-grey-3);
  897. }
  898. .stop-icon,
  899. .delete-icon {
  900. color: var(--red);
  901. }
  902. .report-icon {
  903. color: var(--yellow);
  904. }
  905. }
  906. }
  907. .save-button-mixin {
  908. min-width: 200px;
  909. &:disabled {
  910. background-color: var(--light-grey) !important;
  911. color: var(--black);
  912. }
  913. }
  914. .save-button-transition-enter-active {
  915. transition: all 0.1s ease;
  916. }
  917. .save-button-transition-enter {
  918. transform: translateX(20px);
  919. opacity: 0;
  920. }
  921. .youtube-icon {
  922. margin-right: 3px;
  923. height: 20px;
  924. width: 20px;
  925. -webkit-mask: url("/assets/social/youtube.svg") no-repeat center;
  926. mask: url("/assets/social/youtube.svg") no-repeat center;
  927. background-color: var(--youtube);
  928. }
  929. #forgot-password {
  930. display: flex;
  931. justify-content: flex-start;
  932. margin: 5px 0;
  933. }
  934. .steps-fade-enter-active,
  935. .steps-fade-leave-active {
  936. transition: all 0.3s ease;
  937. }
  938. .steps-fade-enter,
  939. .steps-fade-leave-to {
  940. opacity: 0;
  941. }
  942. .skip-step {
  943. background-color: var(--grey-3);
  944. color: var(--white);
  945. }
  946. #steps {
  947. display: flex;
  948. align-items: center;
  949. justify-content: center;
  950. height: 50px;
  951. margin-top: 36px;
  952. @media screen and (max-width: 300px) {
  953. display: none;
  954. }
  955. .step {
  956. display: flex;
  957. align-items: center;
  958. justify-content: center;
  959. border-radius: 100%;
  960. border: 1px solid var(--dark-grey);
  961. min-width: 50px;
  962. min-height: 50px;
  963. background-color: var(--white);
  964. font-size: 30px;
  965. cursor: pointer;
  966. &.selected {
  967. background-color: var(--primary-color);
  968. color: var(--white) !important;
  969. border: 0;
  970. }
  971. }
  972. .divider {
  973. display: flex;
  974. justify-content: center;
  975. width: 180px;
  976. height: 1px;
  977. background-color: var(--dark-grey);
  978. }
  979. }
  980. .content-box {
  981. margin-top: 90px;
  982. border-radius: 3px;
  983. background-color: var(--white);
  984. border: 1px solid var(--dark-grey);
  985. max-width: 580px;
  986. padding: 40px;
  987. @media screen and (max-width: 300px) {
  988. margin-top: 30px;
  989. padding: 30px 20px;
  990. }
  991. }
  992. .content-box-optional-helper {
  993. margin-top: 15px;
  994. color: var(--primary-color);
  995. text-decoration: underline;
  996. font-size: 16px;
  997. a {
  998. color: var(--primary-color);
  999. }
  1000. }
  1001. .content-box-title {
  1002. font-size: 25px;
  1003. color: var(--black);
  1004. }
  1005. .content-box-description {
  1006. font-size: 14px;
  1007. color: var(--dark-grey);
  1008. }
  1009. .content-box-inputs {
  1010. margin-top: 35px;
  1011. .input-with-button {
  1012. .button {
  1013. width: 105px;
  1014. }
  1015. @media screen and (max-width: 450px) {
  1016. flex-direction: column;
  1017. }
  1018. }
  1019. label {
  1020. font-size: 11px;
  1021. }
  1022. #change-password-button {
  1023. margin-top: 36px;
  1024. width: 175px;
  1025. }
  1026. }
  1027. #password-visibility-container {
  1028. display: flex;
  1029. align-items: center;
  1030. a {
  1031. width: 0;
  1032. margin-left: -30px;
  1033. z-index: 0;
  1034. top: 2px;
  1035. position: relative;
  1036. color: var(--light-grey-1);
  1037. }
  1038. }
  1039. .news-item {
  1040. font-family: "Karla";
  1041. border-radius: 5px;
  1042. padding: 20px;
  1043. border: unset !important;
  1044. box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
  1045. * {
  1046. font-family: Karla, Arial, sans-serif;
  1047. font-size: 16px;
  1048. }
  1049. h1 {
  1050. font-size: 40px;
  1051. &:first-of-type {
  1052. margin-top: 0;
  1053. }
  1054. }
  1055. h2 {
  1056. font-size: 30px;
  1057. }
  1058. h3 {
  1059. font-size: 25px;
  1060. }
  1061. h4,
  1062. h5,
  1063. h6 {
  1064. font-size: 20px;
  1065. }
  1066. h1,
  1067. h2,
  1068. h3,
  1069. h4,
  1070. h5,
  1071. h6 {
  1072. margin: 10px 0;
  1073. }
  1074. ul {
  1075. list-style: unset;
  1076. }
  1077. li {
  1078. margin-left: 30px;
  1079. }
  1080. blockquote {
  1081. padding: 0px 15px;
  1082. color: #6a737d;
  1083. border-left: 0.25em solid #dfe2e5;
  1084. }
  1085. code {
  1086. font-style: italic;
  1087. }
  1088. }
  1089. .checkbox-control {
  1090. display: flex;
  1091. flex-direction: row;
  1092. align-items: center;
  1093. p {
  1094. margin-left: 10px;
  1095. }
  1096. .switch {
  1097. position: relative;
  1098. display: inline-block;
  1099. flex-shrink: 0;
  1100. width: 40px;
  1101. height: 24px;
  1102. }
  1103. .switch input {
  1104. opacity: 0;
  1105. width: 0;
  1106. height: 0;
  1107. }
  1108. .slider {
  1109. position: absolute;
  1110. cursor: pointer;
  1111. top: 0;
  1112. left: 0;
  1113. right: 0;
  1114. bottom: 0;
  1115. background-color: #ccc;
  1116. transition: 0.2s;
  1117. border-radius: 34px;
  1118. }
  1119. .slider:before {
  1120. position: absolute;
  1121. content: "";
  1122. height: 16px;
  1123. width: 16px;
  1124. left: 4px;
  1125. bottom: 4px;
  1126. background-color: white;
  1127. transition: 0.2s;
  1128. border-radius: 50%;
  1129. }
  1130. input:checked + .slider {
  1131. background-color: var(--primary-color);
  1132. }
  1133. input:focus + .slider {
  1134. box-shadow: 0 0 1px var(--primary-color);
  1135. }
  1136. input:checked + .slider:before {
  1137. transform: translateX(16px);
  1138. }
  1139. }
  1140. </style>