App.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608
  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("backend.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. color: var(--light-grey-2);
  263. }
  264. .input,
  265. .textarea,
  266. .select select {
  267. background-color: var(--dark-grey);
  268. border-color: var(--grey-3);
  269. color: var(--white);
  270. &::placeholder {
  271. color: var(--light-grey-3);
  272. }
  273. }
  274. h1,
  275. h2,
  276. h3,
  277. h4,
  278. h5,
  279. h6 {
  280. color: var(--white) !important;
  281. }
  282. p:not(.help),
  283. label,
  284. .label {
  285. color: var(--light-grey-2) !important;
  286. }
  287. .section,
  288. .content {
  289. background-color: var(--dark-grey-3) !important;
  290. }
  291. .content-box,
  292. .step:not(.selected) {
  293. background-color: var(--dark-grey-3) !important;
  294. }
  295. .tippy-box[data-theme~="songActions"] {
  296. background-color: var(--dark-grey);
  297. }
  298. code {
  299. background-color: var(--dark-grey-2) !important;
  300. }
  301. }
  302. /* inter-regular - latin */
  303. @font-face {
  304. font-family: "Inter";
  305. font-style: normal;
  306. font-weight: 400;
  307. src: url("/fonts/inter-v3-latin-regular.eot"); /* IE9 Compat Modes */
  308. src: local(""),
  309. url("/fonts/inter-v3-latin-regular.eot?#iefix")
  310. format("embedded-opentype"),
  311. /* IE6-IE8 */ url("/fonts/inter-v3-latin-regular.woff2") format("woff2"),
  312. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-regular.woff")
  313. format("woff"),
  314. /* Modern Browsers */ url("/fonts/inter-v3-latin-regular.ttf")
  315. format("truetype"),
  316. /* Safari, Android, iOS */
  317. url("/fonts/inter-v3-latin-regular.svg#Inter") format("svg"); /* Legacy iOS */
  318. }
  319. /* inter-200 - latin */
  320. @font-face {
  321. font-family: "Inter";
  322. font-style: normal;
  323. font-weight: 200;
  324. src: url("/fonts/inter-v3-latin-200.eot"); /* IE9 Compat Modes */
  325. src: local(""),
  326. url("/fonts/inter-v3-latin-200.eot?#iefix") format("embedded-opentype"),
  327. /* IE6-IE8 */ url("/fonts/inter-v3-latin-200.woff2") format("woff2"),
  328. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-200.woff")
  329. format("woff"),
  330. /* Modern Browsers */ url("/fonts/inter-v3-latin-200.ttf")
  331. format("truetype"),
  332. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-200.svg#Inter")
  333. format("svg"); /* Legacy iOS */
  334. }
  335. /* inter-800 - latin */
  336. @font-face {
  337. font-family: "Inter";
  338. font-style: normal;
  339. font-weight: 800;
  340. src: url("/fonts/inter-v3-latin-800.eot"); /* IE9 Compat Modes */
  341. src: local(""),
  342. url("/fonts/inter-v3-latin-800.eot?#iefix") format("embedded-opentype"),
  343. /* IE6-IE8 */ url("/fonts/inter-v3-latin-800.woff2") format("woff2"),
  344. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-800.woff")
  345. format("woff"),
  346. /* Modern Browsers */ url("/fonts/inter-v3-latin-800.ttf")
  347. format("truetype"),
  348. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-800.svg#Inter")
  349. format("svg"); /* Legacy iOS */
  350. }
  351. /* inter-600 - latin */
  352. @font-face {
  353. font-family: "Inter";
  354. font-style: normal;
  355. font-weight: 600;
  356. src: url("/fonts/inter-v3-latin-600.eot"); /* IE9 Compat Modes */
  357. src: local(""),
  358. url("/fonts/inter-v3-latin-600.eot?#iefix") format("embedded-opentype"),
  359. /* IE6-IE8 */ url("/fonts/inter-v3-latin-600.woff2") format("woff2"),
  360. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-600.woff")
  361. format("woff"),
  362. /* Modern Browsers */ url("/fonts/inter-v3-latin-600.ttf")
  363. format("truetype"),
  364. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-600.svg#Inter")
  365. format("svg"); /* Legacy iOS */
  366. }
  367. /* pacifico-regular - latin */
  368. @font-face {
  369. font-family: "Pacifico";
  370. font-style: normal;
  371. font-weight: 400;
  372. src: url("/fonts/pacifico-v17-latin-regular.eot"); /* IE9 Compat Modes */
  373. src: local(""),
  374. url("/fonts/pacifico-v17-latin-regular.eot?#iefix")
  375. format("embedded-opentype"),
  376. /* IE6-IE8 */ url("/fonts/pacifico-v17-latin-regular.woff2")
  377. format("woff2"),
  378. /* Super Modern Browsers */
  379. url("/fonts/pacifico-v17-latin-regular.woff") format("woff"),
  380. /* Modern Browsers */ url("/fonts/pacifico-v17-latin-regular.ttf")
  381. format("truetype"),
  382. /* Safari, Android, iOS */
  383. url("/fonts/pacifico-v17-latin-regular.svg#Pacifico") format("svg"); /* Legacy iOS */
  384. }
  385. @font-face {
  386. font-family: "Material Icons";
  387. font-style: normal;
  388. font-weight: 400;
  389. src: url(/fonts/MaterialIcons-Regular.ttf); /* For IE6-8 */
  390. src: local("Material Icons"), local("MaterialIcons-Regular"),
  391. url(/fonts/MaterialIcons-Regular.ttf) format("truetype");
  392. }
  393. .material-icons {
  394. font-family: "Material Icons";
  395. font-weight: normal;
  396. font-style: normal;
  397. font-size: 24px; /* Preferred icon size */
  398. display: inline-block;
  399. line-height: 1;
  400. text-transform: none;
  401. letter-spacing: normal;
  402. word-wrap: normal;
  403. white-space: nowrap;
  404. direction: ltr;
  405. /* Support for all WebKit browsers. */
  406. -webkit-font-smoothing: antialiased;
  407. /* Support for Safari and Chrome. */
  408. text-rendering: optimizeLegibility;
  409. /* Support for Firefox. */
  410. -moz-osx-font-smoothing: grayscale;
  411. /* Support for IE. */
  412. font-feature-settings: "liga";
  413. }
  414. code {
  415. background-color: var(--light-grey) !important;
  416. color: var(--red) !important;
  417. }
  418. body.night-mode {
  419. background-color: var(--black) !important;
  420. }
  421. #toasts-container {
  422. z-index: 10000 !important;
  423. .toast {
  424. font-weight: 600;
  425. z-index: 10000 !important;
  426. }
  427. }
  428. html {
  429. overflow: auto !important;
  430. height: 100%;
  431. background-color: inherit;
  432. font-size: 14px;
  433. }
  434. body {
  435. background-color: var(--light-grey);
  436. color: var(--dark-grey);
  437. height: 100%;
  438. line-height: 1.428;
  439. font-size: 1rem;
  440. font-family: "Inter", Helvetica, Arial, sans-serif;
  441. }
  442. .app {
  443. min-height: 100vh;
  444. position: relative;
  445. }
  446. #root {
  447. height: 100%;
  448. }
  449. .content-wrapper {
  450. /* padding: 60px 0 calc(230px + 60px) 0; */
  451. padding-top: 60px;
  452. }
  453. .card {
  454. position: relative;
  455. background-color: var(--white);
  456. color: var(--dark-grey);
  457. .card-image,
  458. .card-image .image,
  459. .card-header {
  460. display: flex;
  461. position: relative;
  462. }
  463. .card-image .image {
  464. padding-top: 100%;
  465. }
  466. .card-content {
  467. padding: 20px;
  468. }
  469. }
  470. .column {
  471. display: flex;
  472. flex: 1 1 0;
  473. padding: 10px;
  474. }
  475. ul {
  476. list-style: none;
  477. margin: 0;
  478. display: block;
  479. }
  480. h1,
  481. h2,
  482. h3,
  483. h4,
  484. h5,
  485. h6 {
  486. font-family: "Inter", Helvetica, Arial, sans-serif;
  487. font-weight: 400;
  488. line-height: 1.1;
  489. a {
  490. font-weight: inherit;
  491. }
  492. }
  493. h1 {
  494. font-size: 4.2rem;
  495. line-height: 110%;
  496. margin: 2.1rem 0 1.68rem 0;
  497. }
  498. h2 {
  499. font-size: 3.56rem;
  500. line-height: 110%;
  501. margin: 1.78rem 0 1.424rem 0;
  502. }
  503. h3 {
  504. font-size: 2.92rem;
  505. line-height: 110%;
  506. margin: 1.46rem 0 1.168rem 0;
  507. }
  508. h4 {
  509. font-size: 2.28rem;
  510. line-height: 110%;
  511. margin: 1.14rem 0 0.912rem 0;
  512. }
  513. h5 {
  514. font-size: 1.64rem;
  515. line-height: 110%;
  516. margin: 0.82rem 0 0.656rem 0;
  517. }
  518. h6 {
  519. font-size: 1rem;
  520. line-height: 110%;
  521. margin: 0.5rem 0 0.4rem 0;
  522. }
  523. .thin {
  524. font-weight: 200;
  525. }
  526. .left {
  527. float: left !important;
  528. }
  529. .right {
  530. float: right !important;
  531. }
  532. .white {
  533. background-color: #ffffff !important;
  534. }
  535. .btn-search {
  536. font-size: 14px;
  537. }
  538. a.nav-item.is-tab {
  539. border-bottom: 1px solid transparent;
  540. border-top: 1px solid transparent;
  541. }
  542. .button.is-info {
  543. border-width: 0;
  544. color: #fff;
  545. }
  546. strong {
  547. color: inherit;
  548. }
  549. .modal-card-title {
  550. font-weight: 600;
  551. font-family: "Inter", Helvetica, Arial, sans-serif;
  552. }
  553. p,
  554. button,
  555. input,
  556. select,
  557. textarea {
  558. font-family: "Inter", Helvetica, Arial, sans-serif;
  559. }
  560. #page-title {
  561. margin-top: 0;
  562. font-size: 35px;
  563. text-align: center;
  564. }
  565. @media only screen and (min-width: 700px) {
  566. #page-title {
  567. margin: 0;
  568. margin-bottom: 30px;
  569. font-size: 40px;
  570. }
  571. }
  572. .upper-container {
  573. height: 100%;
  574. }
  575. .main-container {
  576. height: 100%;
  577. min-height: 100vh;
  578. display: flex;
  579. flex-direction: column;
  580. &.main-container-modal-active {
  581. height: 100% !important;
  582. overflow: hidden !important;
  583. }
  584. > .container {
  585. position: relative;
  586. flex: 1 0 auto;
  587. margin: 0 auto;
  588. max-width: 1200px;
  589. }
  590. }
  591. a {
  592. color: var(--primary-color);
  593. text-decoration: none;
  594. }
  595. .modal-card {
  596. margin: 0 !important;
  597. }
  598. .absolute-a {
  599. width: 100%;
  600. height: 100%;
  601. position: absolute;
  602. top: 0;
  603. left: 0;
  604. }
  605. .alert {
  606. padding: 20px;
  607. color: var(--white);
  608. background-color: var(--red);
  609. position: fixed;
  610. top: 50px;
  611. right: 50px;
  612. font-size: 2em;
  613. border-radius: 5px;
  614. z-index: 10000000;
  615. }
  616. .night-mode {
  617. .tippy-box {
  618. border: 1px solid var(--light-grey-3);
  619. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
  620. 0 10px 10px rgba(0, 0, 0, 0.22);
  621. background-color: var(--white);
  622. .tippy-content {
  623. color: var(--black);
  624. }
  625. &[data-theme~="songActions"],
  626. &[data-theme~="addToPlaylist"],
  627. &[data-theme~="stationSettings"] {
  628. background-color: var(--dark-grey-2);
  629. border: 0 !important;
  630. }
  631. &[data-theme~="songActions"] {
  632. background-color: var(--dark-grey-2);
  633. border: 0 !important;
  634. i,
  635. a {
  636. color: var(--white);
  637. }
  638. .youtube-icon {
  639. background-color: var(--white);
  640. }
  641. }
  642. &[data-theme~="addToPlaylist"] {
  643. background-color: var(--dark-grey-2);
  644. border: 0 !important;
  645. .nav-dropdown-items {
  646. .nav-item {
  647. background-color: var(--dark-grey);
  648. &:focus {
  649. outline-color: var(--dark-grey);
  650. }
  651. p {
  652. color: var(--white);
  653. }
  654. }
  655. }
  656. }
  657. }
  658. .tippy-box[data-placement^="top"] {
  659. &[data-theme~="songActions"],
  660. &[data-theme~="addToPlaylist"] {
  661. > .tippy-arrow::before {
  662. border-top-color: var(--dark-grey-2);
  663. }
  664. }
  665. }
  666. .tippy-box[data-placement^="bottom"] {
  667. &[data-theme~="songActions"],
  668. &[data-theme~="addToPlaylist"],
  669. &[data-theme~="stationSettings"] {
  670. > .tippy-arrow::before {
  671. border-bottom-color: var(--dark-grey-2);
  672. }
  673. }
  674. }
  675. .tippy-box[data-placement^="left"] {
  676. &[data-theme~="songActions"],
  677. &[data-theme~="addToPlaylist"] {
  678. > .tippy-arrow::before {
  679. border-left-color: var(--dark-grey-2);
  680. }
  681. }
  682. }
  683. .tippy-box[data-placement^="right"] {
  684. &[data-theme~="songActions"],
  685. &[data-theme~="addToPlaylist"] {
  686. > .tippy-arrow::before {
  687. border-right-color: var(--dark-grey-2);
  688. }
  689. }
  690. }
  691. }
  692. .tippy-box[data-theme~="info"] {
  693. font-size: 12px;
  694. letter-spacing: 1px;
  695. }
  696. .tippy-box[data-theme~="confirm"] {
  697. background-color: var(--red);
  698. border: 0;
  699. .tippy-content {
  700. padding: 0;
  701. }
  702. a {
  703. padding: 15px;
  704. line-height: 30px;
  705. color: var(--white);
  706. border-bottom: 0;
  707. font-size: 15px;
  708. font-weight: 600;
  709. &:hover,
  710. &:focus {
  711. filter: brightness(90%);
  712. }
  713. }
  714. }
  715. .tippy-box[data-theme~="songActions"] {
  716. font-size: 15px;
  717. padding: 5px 10px;
  718. border: 1px solid var(--light-grey-3);
  719. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  720. background-color: var(--white);
  721. .button {
  722. width: 146px;
  723. }
  724. i,
  725. a {
  726. display: inline-block;
  727. cursor: pointer;
  728. color: var(--dark-grey);
  729. vertical-align: middle;
  730. &:hover,
  731. &:focus {
  732. filter: brightness(90%);
  733. }
  734. &:not(:first) {
  735. margin-left: 5px;
  736. }
  737. }
  738. .play-icon,
  739. .added-to-playlist-icon {
  740. color: var(--green);
  741. }
  742. .edit-icon,
  743. .view-icon,
  744. .add-to-playlist-icon,
  745. .add-to-queue-icon {
  746. color: var(--primary-color);
  747. }
  748. .hide-icon {
  749. color: var(--light-grey-3);
  750. }
  751. .stop-icon,
  752. .delete-icon {
  753. color: var(--red);
  754. }
  755. .report-icon {
  756. color: var(--yellow);
  757. }
  758. }
  759. .tippy-box[data-placement^="top"] {
  760. &[data-theme~="songActions"],
  761. &[data-theme~="addToPlaylist"] {
  762. > .tippy-arrow::before {
  763. border-top-color: var(--white);
  764. }
  765. }
  766. &[data-theme~="confirm"] > .tippy-arrow::before {
  767. border-top-color: var(--red);
  768. }
  769. }
  770. .tippy-box[data-placement^="bottom"] {
  771. &[data-theme~="songActions"],
  772. &[data-theme~="addToPlaylist"],
  773. &[data-theme~="stationSettings"] {
  774. > .tippy-arrow::before {
  775. border-bottom-color: var(--white);
  776. }
  777. }
  778. &[data-theme~="confirm"] > .tippy-arrow::before {
  779. border-bottom-color: var(--red);
  780. }
  781. }
  782. .tippy-box[data-placement^="left"] {
  783. &[data-theme~="songActions"],
  784. &[data-theme~="addToPlaylist"] {
  785. > .tippy-arrow::before {
  786. border-left-color: var(--white);
  787. }
  788. }
  789. &[data-theme~="confirm"] > .tippy-arrow::before {
  790. border-left-color: var(--red);
  791. }
  792. }
  793. .tippy-box[data-placement^="right"] {
  794. &[data-theme~="songActions"],
  795. &[data-theme~="addToPlaylist"] {
  796. > .tippy-arrow::before {
  797. border-right-color: var(--white);
  798. }
  799. }
  800. &[data-theme~="confirm"] > .tippy-arrow::before {
  801. border-right-color: var(--red);
  802. }
  803. }
  804. .tippy-box[data-theme~="stationSettings"] {
  805. border: 1px solid var(--light-grey-3);
  806. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  807. background-color: var(--white);
  808. button:not(:last-of-type) {
  809. margin-bottom: 5px;
  810. }
  811. }
  812. .tippy-box[data-theme~="addToPlaylist"] {
  813. font-size: 15px;
  814. padding: 0;
  815. border: 1px solid var(--light-grey-3);
  816. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  817. background-color: var(--white);
  818. color: var(--dark-grey);
  819. width: 350px;
  820. .tippy-content {
  821. padding: 0;
  822. }
  823. .nav-dropdown-items {
  824. max-height: 220px;
  825. overflow-y: auto;
  826. padding: 10px 10px 0 10px;
  827. .nav-item {
  828. width: 100%;
  829. justify-content: flex-start;
  830. border: 0;
  831. padding: 8px 4px;
  832. font-size: 15.5px;
  833. min-height: 36px;
  834. background: var(--light-grey);
  835. border-radius: 5px;
  836. cursor: pointer;
  837. .checkbox-control {
  838. display: flex;
  839. flex-direction: row;
  840. align-items: center;
  841. overflow-wrap: anywhere;
  842. margin: 0 !important;
  843. p {
  844. margin-left: 10px;
  845. }
  846. .switch {
  847. position: relative;
  848. display: inline-block;
  849. flex-shrink: 0;
  850. width: 40px;
  851. height: 24px;
  852. }
  853. .switch input {
  854. opacity: 0;
  855. width: 0;
  856. height: 0;
  857. }
  858. .slider {
  859. width: 100%;
  860. position: absolute;
  861. cursor: pointer;
  862. top: 0;
  863. left: 0;
  864. right: 0;
  865. bottom: 0;
  866. background-color: #ccc;
  867. transition: 0.2s;
  868. border-radius: 34px;
  869. }
  870. .slider:before {
  871. position: absolute;
  872. content: "";
  873. height: 16px;
  874. width: 16px;
  875. left: 4px;
  876. bottom: 4px;
  877. background-color: white;
  878. transition: 0.2s;
  879. border-radius: 50%;
  880. }
  881. input:checked + .slider {
  882. background-color: var(--primary-color);
  883. }
  884. input:focus + .slider {
  885. box-shadow: 0 0 1px var(--primary-color);
  886. }
  887. input:checked + .slider:before {
  888. transform: translateX(16px);
  889. }
  890. }
  891. &:focus {
  892. outline-color: var(--light-grey-3);
  893. }
  894. &:not(:last-of-type) {
  895. margin-bottom: 5px;
  896. }
  897. }
  898. }
  899. .tippy-content > span {
  900. display: flex;
  901. flex-direction: column;
  902. button.nav-item {
  903. &:not(:last-of-type) {
  904. margin-bottom: 10px;
  905. }
  906. }
  907. }
  908. #create-playlist {
  909. margin: 10px 10px 10px 10px;
  910. width: unset;
  911. }
  912. }
  913. .select {
  914. &:after {
  915. border-color: var(--primary-color);
  916. border-width: 1.5px;
  917. margin-top: -3px;
  918. }
  919. select {
  920. height: 36px;
  921. }
  922. }
  923. .button:focus,
  924. .button:active {
  925. border-color: var(--light-grey-2) !important;
  926. }
  927. .input:focus,
  928. .input:active,
  929. .textarea:focus,
  930. .textarea:active,
  931. .select select:focus,
  932. .select select:active {
  933. border-color: var(--primary-color) !important;
  934. }
  935. button.delete:focus {
  936. background-color: rgba(10, 10, 10, 0.3);
  937. }
  938. .tag {
  939. padding-right: 6px !important;
  940. }
  941. .button {
  942. &:hover,
  943. &:focus {
  944. filter: brightness(95%);
  945. }
  946. &.is-success {
  947. background-color: var(--green) !important;
  948. }
  949. &.is-primary {
  950. background-color: var(--primary-color) !important;
  951. }
  952. &.is-danger {
  953. background-color: var(--red) !important;
  954. }
  955. &.is-info {
  956. background-color: var(--primary-color) !important;
  957. }
  958. &.is-warning {
  959. background-color: var(--yellow) !important;
  960. }
  961. }
  962. .input,
  963. .button {
  964. height: 36px;
  965. }
  966. .fadein-helpbox-enter-active {
  967. transition-duration: 0.3s;
  968. transition-timing-function: ease-in;
  969. }
  970. .fadein-helpbox-leave-active {
  971. transition-duration: 0.3s;
  972. transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
  973. }
  974. .fadein-helpbox-enter-to,
  975. .fadein-helpbox-leave {
  976. max-height: 100px;
  977. overflow: hidden;
  978. }
  979. .fadein-helpbox-enter,
  980. .fadein-helpbox-leave-to {
  981. overflow: hidden;
  982. max-height: 0;
  983. }
  984. .control {
  985. margin-bottom: 5px !important;
  986. }
  987. .input-with-button {
  988. .control {
  989. margin-right: 0px !important;
  990. }
  991. input,
  992. select {
  993. width: 100%;
  994. height: 36px;
  995. border-radius: 3px 0 0 3px;
  996. border-right: 0;
  997. border-color: var(--light-grey-3);
  998. }
  999. .button {
  1000. height: 36px;
  1001. border-radius: 0 3px 3px 0;
  1002. }
  1003. }
  1004. .page-title {
  1005. margin: 0 0 50px 0;
  1006. }
  1007. .material-icons {
  1008. user-select: none;
  1009. -webkit-user-select: none;
  1010. }
  1011. .icon-with-button {
  1012. margin-right: 3px;
  1013. font-size: 18px;
  1014. }
  1015. .verified-song {
  1016. font-size: 17px;
  1017. color: var(--primary-color);
  1018. }
  1019. .section-title,
  1020. h4.section-title {
  1021. font-size: 26px;
  1022. font-weight: 600;
  1023. margin: 0px;
  1024. }
  1025. .section-description {
  1026. font-size: 16px;
  1027. font-weight: 400;
  1028. margin-bottom: 10px !important;
  1029. }
  1030. .section-horizontal-rule {
  1031. margin: 15px 0 30px 0;
  1032. }
  1033. .section-margin-bottom {
  1034. height: 30px;
  1035. }
  1036. .margin-top-zero {
  1037. margin-top: 0 !important;
  1038. }
  1039. .margin-bottom-zero {
  1040. margin-bottom: 0 !important;
  1041. }
  1042. /** Universial items e.g. playlist items, queue items, activity items */
  1043. .item-draggable {
  1044. cursor: move;
  1045. }
  1046. .universal-item {
  1047. display: flex;
  1048. flex-direction: row;
  1049. flex-grow: 1;
  1050. align-items: center;
  1051. justify-content: space-between;
  1052. padding: 7.5px;
  1053. border: 1px solid var(--light-grey-3);
  1054. border-radius: 3px;
  1055. overflow: hidden;
  1056. .item-thumbnail {
  1057. width: 65px;
  1058. height: 65px;
  1059. margin: -7.5px;
  1060. border-radius: 3px 0 0 3px;
  1061. }
  1062. .item-title {
  1063. font-size: 20px;
  1064. overflow: hidden;
  1065. text-overflow: ellipsis;
  1066. white-space: nowrap;
  1067. }
  1068. .item-description {
  1069. font-size: 14px;
  1070. overflow: hidden;
  1071. text-overflow: ellipsis;
  1072. white-space: nowrap;
  1073. }
  1074. .universal-item-actions {
  1075. display: flex;
  1076. flex-direction: row;
  1077. margin-left: 10px;
  1078. justify-content: center;
  1079. @media screen and (max-width: 800px) {
  1080. flex-wrap: wrap;
  1081. }
  1082. .action-dropdown-icon {
  1083. display: flex;
  1084. color: var(--primary-color);
  1085. }
  1086. .icons-group {
  1087. display: flex;
  1088. align-items: center;
  1089. a {
  1090. padding: 0;
  1091. }
  1092. }
  1093. .button {
  1094. width: 146px;
  1095. }
  1096. i,
  1097. span {
  1098. cursor: pointer;
  1099. &:not(:first-child) {
  1100. margin-left: 5px;
  1101. }
  1102. }
  1103. .play-icon,
  1104. .added-to-playlist-icon {
  1105. color: var(--green);
  1106. }
  1107. .edit-icon,
  1108. .view-icon,
  1109. .add-to-playlist-icon,
  1110. .add-to-queue-icon {
  1111. color: var(--primary-color);
  1112. }
  1113. .hide-icon {
  1114. color: var(--light-grey-3);
  1115. }
  1116. .stop-icon,
  1117. .delete-icon {
  1118. color: var(--red);
  1119. }
  1120. .report-icon {
  1121. color: var(--yellow);
  1122. }
  1123. }
  1124. }
  1125. .save-button-mixin {
  1126. min-width: 200px;
  1127. &:disabled {
  1128. background-color: var(--light-grey) !important;
  1129. color: var(--black);
  1130. }
  1131. }
  1132. .save-button-transition-enter-active {
  1133. transition: all 0.1s ease;
  1134. }
  1135. .save-button-transition-enter {
  1136. transform: translateX(20px);
  1137. opacity: 0;
  1138. }
  1139. .youtube-icon {
  1140. margin-right: 3px;
  1141. height: 20px;
  1142. width: 20px;
  1143. -webkit-mask: url("/assets/social/youtube.svg") no-repeat center;
  1144. mask: url("/assets/social/youtube.svg") no-repeat center;
  1145. background-color: var(--youtube);
  1146. }
  1147. #forgot-password {
  1148. display: flex;
  1149. justify-content: flex-start;
  1150. margin: 5px 0;
  1151. }
  1152. .steps-fade-enter-active,
  1153. .steps-fade-leave-active {
  1154. transition: all 0.3s ease;
  1155. }
  1156. .steps-fade-enter-from,
  1157. .steps-fade-leave-to {
  1158. opacity: 0;
  1159. }
  1160. .skip-step {
  1161. background-color: var(--grey-3);
  1162. color: var(--white);
  1163. }
  1164. #steps {
  1165. display: flex;
  1166. align-items: center;
  1167. justify-content: center;
  1168. height: 50px;
  1169. margin-top: 36px;
  1170. @media screen and (max-width: 300px) {
  1171. display: none;
  1172. }
  1173. .step {
  1174. display: flex;
  1175. align-items: center;
  1176. justify-content: center;
  1177. border-radius: 100%;
  1178. border: 1px solid var(--dark-grey);
  1179. min-width: 50px;
  1180. min-height: 50px;
  1181. background-color: var(--white);
  1182. font-size: 30px;
  1183. user-select: none;
  1184. &.selected {
  1185. background-color: var(--primary-color);
  1186. color: var(--white) !important;
  1187. border: 0;
  1188. }
  1189. }
  1190. .divider {
  1191. display: flex;
  1192. justify-content: center;
  1193. width: 180px;
  1194. height: 1px;
  1195. background-color: var(--dark-grey);
  1196. }
  1197. }
  1198. /* This class is used for content-box in ResetPassword, but not in RemoveAccount. This is because ResetPassword uses transitions and RemoveAccount does not */
  1199. .content-box-wrapper {
  1200. position: relative;
  1201. width: 100%;
  1202. display: flex;
  1203. flex-direction: column;
  1204. align-items: center;
  1205. min-height: 200px;
  1206. .content-box {
  1207. position: absolute;
  1208. }
  1209. }
  1210. .content-box {
  1211. margin-top: 90px;
  1212. border-radius: 3px;
  1213. background-color: var(--white);
  1214. border: 1px solid var(--dark-grey);
  1215. max-width: 580px;
  1216. padding: 40px;
  1217. @media screen and (max-width: 300px) {
  1218. margin-top: 30px;
  1219. padding: 30px 20px;
  1220. }
  1221. }
  1222. .content-box-optional-helper {
  1223. margin-top: 15px;
  1224. color: var(--primary-color);
  1225. text-decoration: underline;
  1226. font-size: 16px;
  1227. a {
  1228. color: var(--primary-color);
  1229. }
  1230. }
  1231. .content-box-title {
  1232. font-size: 25px;
  1233. color: var(--black);
  1234. }
  1235. .content-box-description {
  1236. font-size: 14px;
  1237. color: var(--dark-grey);
  1238. }
  1239. .content-box-inputs {
  1240. margin-top: 35px;
  1241. .input-with-button {
  1242. .button {
  1243. width: 105px;
  1244. }
  1245. @media screen and (max-width: 450px) {
  1246. flex-direction: column;
  1247. }
  1248. }
  1249. label {
  1250. font-size: 11px;
  1251. }
  1252. #change-password-button {
  1253. margin-top: 36px;
  1254. width: 175px;
  1255. }
  1256. }
  1257. #password-visibility-container {
  1258. display: flex;
  1259. align-items: center;
  1260. a {
  1261. width: 0;
  1262. margin-left: -30px;
  1263. z-index: 0;
  1264. top: 2px;
  1265. position: relative;
  1266. color: var(--light-grey-1);
  1267. }
  1268. }
  1269. .news-item {
  1270. font-family: "Karla";
  1271. border-radius: 5px;
  1272. padding: 20px;
  1273. border: unset !important;
  1274. box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
  1275. * {
  1276. font-family: Karla, Arial, sans-serif;
  1277. font-size: 16px;
  1278. }
  1279. h1 {
  1280. font-size: 40px;
  1281. &:first-of-type {
  1282. margin-top: 0;
  1283. }
  1284. }
  1285. h2 {
  1286. font-size: 30px;
  1287. }
  1288. h3 {
  1289. font-size: 25px;
  1290. }
  1291. h4,
  1292. h5,
  1293. h6 {
  1294. font-size: 20px;
  1295. }
  1296. h1,
  1297. h2,
  1298. h3,
  1299. h4,
  1300. h5,
  1301. h6 {
  1302. margin: 10px 0;
  1303. }
  1304. ul {
  1305. list-style: unset;
  1306. }
  1307. li {
  1308. margin-left: 30px;
  1309. }
  1310. blockquote {
  1311. padding: 0px 15px;
  1312. color: #6a737d;
  1313. border-left: 0.25em solid #dfe2e5;
  1314. }
  1315. code {
  1316. font-style: italic;
  1317. }
  1318. }
  1319. .checkbox-control {
  1320. display: flex;
  1321. flex-direction: row;
  1322. align-items: center;
  1323. p {
  1324. margin-left: 10px;
  1325. }
  1326. .switch {
  1327. position: relative;
  1328. display: inline-block;
  1329. flex-shrink: 0;
  1330. width: 40px;
  1331. height: 24px;
  1332. }
  1333. .switch input {
  1334. opacity: 0;
  1335. width: 0;
  1336. height: 0;
  1337. }
  1338. .slider {
  1339. position: absolute;
  1340. cursor: pointer;
  1341. top: 0;
  1342. left: 0;
  1343. right: 0;
  1344. bottom: 0;
  1345. background-color: #ccc;
  1346. transition: 0.2s;
  1347. border-radius: 34px;
  1348. }
  1349. .slider:before {
  1350. position: absolute;
  1351. content: "";
  1352. height: 16px;
  1353. width: 16px;
  1354. left: 4px;
  1355. bottom: 4px;
  1356. background-color: white;
  1357. transition: 0.2s;
  1358. border-radius: 50%;
  1359. }
  1360. input:checked + .slider {
  1361. background-color: var(--primary-color);
  1362. }
  1363. input:focus + .slider {
  1364. box-shadow: 0 0 1px var(--primary-color);
  1365. }
  1366. input:checked + .slider:before {
  1367. transform: translateX(16px);
  1368. }
  1369. }
  1370. </style>