App.vue 23 KB

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