App.vue 23 KB

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