App.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112
  1. <script setup lang="ts">
  2. import { useStore } from "vuex";
  3. import { useRoute, useRouter } from "vue-router";
  4. import { defineAsyncComponent, ref, computed, watch, onMounted } from "vue";
  5. import Toast from "toasters";
  6. import ws from "@/ws";
  7. import aw from "@/aw";
  8. import keyboardShortcuts from "@/keyboardShortcuts";
  9. const ModalManager = defineAsyncComponent(
  10. () => import("@/components/ModalManager.vue")
  11. );
  12. const LongJobs = defineAsyncComponent(
  13. () => import("@/components/LongJobs.vue")
  14. );
  15. const BannedPage = defineAsyncComponent(() => import("@/pages/Banned.vue"));
  16. const FallingSnow = defineAsyncComponent(
  17. () => import("@/components/FallingSnow.vue")
  18. );
  19. const store = useStore();
  20. const route = useRoute();
  21. const router = useRouter();
  22. const loggedIn = computed(() => store.state.user.auth.loggedIn);
  23. const banned = computed(() => store.state.user.auth.banned);
  24. const modals = computed(() => store.state.modalVisibility.modals);
  25. const activeModals = computed(() => store.state.modalVisibility.activeModals);
  26. const nightmode = computed(() => store.state.user.preferences.nightmode);
  27. const activityWatch = computed(
  28. () => store.state.user.preferences.activityWatch
  29. );
  30. const { socket } = store.state.websockets;
  31. const apiDomain = ref("");
  32. const socketConnected = ref(true);
  33. const keyIsDown = ref(false);
  34. const scrollPosition = ref({ y: 0, x: 0 });
  35. const aModalIsOpen2 = ref(false);
  36. const broadcastChannel = ref();
  37. const christmas = ref(false);
  38. const disconnectedMessage = ref();
  39. const aModalIsOpen = computed(() => Object.keys(activeModals.value).length > 0);
  40. const openModal = payload =>
  41. store.dispatch("modalVisibility/openModal", payload);
  42. const closeCurrentModal = () =>
  43. store.dispatch("modalVisibility/closeCurrentModal");
  44. const changeNightmode = payload =>
  45. store.dispatch("user/preferences/changeNightmode", payload);
  46. const changeAutoSkipDisliked = payload =>
  47. store.dispatch("user/preferences/changeAutoSkipDisliked", payload);
  48. const changeActivityLogPublic = payload =>
  49. store.dispatch("user/preferences/changeActivityLogPublic", payload);
  50. const changeAnonymousSongRequests = payload =>
  51. store.dispatch("user/preferences/changeAnonymousSongRequests", payload);
  52. const changeActivityWatch = payload =>
  53. store.dispatch("user/preferences/changeActivityWatch", payload);
  54. const toggleNightMode = () => {
  55. localStorage.setItem("nightmode", !nightmode.value);
  56. if (loggedIn.value) {
  57. socket.dispatch(
  58. "users.updatePreferences",
  59. { nightmode: !nightmode.value },
  60. res => {
  61. if (res.status !== "success") new Toast(res.message);
  62. }
  63. );
  64. }
  65. changeNightmode(!nightmode.value);
  66. };
  67. const enableNightmode = () => {
  68. document.getElementsByTagName("html")[0].classList.add("night-mode");
  69. };
  70. const disableNightmode = () => {
  71. document.getElementsByTagName("html")[0].classList.remove("night-mode");
  72. };
  73. const enableChristmasMode = () => {
  74. document.getElementsByTagName("html")[0].classList.add("christmas-mode");
  75. };
  76. watch(socketConnected, connected => {
  77. if (!connected) disconnectedMessage.value.show();
  78. else disconnectedMessage.value.hide();
  79. });
  80. watch(nightmode, enabled => {
  81. if (enabled) enableNightmode();
  82. else disableNightmode();
  83. });
  84. watch(activityWatch, enabled => {
  85. if (enabled) aw.enable();
  86. else aw.disable();
  87. });
  88. watch(aModalIsOpen, isOpen => {
  89. if (isOpen) {
  90. scrollPosition.value = {
  91. x: window.scrollX,
  92. y: window.scrollY
  93. };
  94. aModalIsOpen2.value = true;
  95. } else {
  96. aModalIsOpen2.value = false;
  97. setTimeout(() => {
  98. window.scrollTo(scrollPosition.value.x, scrollPosition.value.y);
  99. }, 10);
  100. }
  101. });
  102. onMounted(async () => {
  103. window
  104. .matchMedia("(prefers-color-scheme: dark)")
  105. .addEventListener("change", e => {
  106. if (e.matches === !nightmode.value) toggleNightMode();
  107. });
  108. if (!loggedIn.value) {
  109. lofig.get("cookie.SIDname").then(sid => {
  110. broadcastChannel.value = new BroadcastChannel(`${sid}.user_login`);
  111. broadcastChannel.value.onmessage = data => {
  112. if (data) {
  113. broadcastChannel.value.close();
  114. window.location.reload();
  115. }
  116. };
  117. });
  118. }
  119. document.onkeydown = ev => {
  120. const event = ev || window.event;
  121. const { keyCode } = event;
  122. const shift = event.shiftKey;
  123. const ctrl = event.ctrlKey;
  124. const alt = event.altKey;
  125. const identifier = `${keyCode}.${shift}.${ctrl}`;
  126. if (keyIsDown.value === identifier) return;
  127. keyIsDown.value = identifier;
  128. keyboardShortcuts.handleKeyDown(event, keyCode, shift, ctrl, alt);
  129. };
  130. document.onkeyup = () => {
  131. keyIsDown.value = "";
  132. };
  133. // ctrl + alt + n
  134. keyboardShortcuts.registerShortcut("nightmode", {
  135. keyCode: 78,
  136. ctrl: true,
  137. alt: true,
  138. handler: () => toggleNightMode()
  139. });
  140. keyboardShortcuts.registerShortcut("closeModal", {
  141. keyCode: 27,
  142. shift: false,
  143. ctrl: false,
  144. handler: () => {
  145. if (
  146. Object.keys(activeModals.value).length !== 0 &&
  147. modals.value[
  148. activeModals.value[activeModals.value.length - 1]
  149. ] !== "editSong" &&
  150. modals.value[
  151. activeModals.value[activeModals.value.length - 1]
  152. ] !== "editSongs"
  153. )
  154. closeCurrentModal();
  155. }
  156. });
  157. disconnectedMessage.value = new Toast({
  158. content: "Could not connect to the server.",
  159. persistent: true,
  160. interactable: false
  161. });
  162. disconnectedMessage.value.hide();
  163. ws.onConnect(() => {
  164. socketConnected.value = true;
  165. socket.dispatch("users.getPreferences", res => {
  166. if (res.status === "success") {
  167. const { preferences } = res.data;
  168. changeAutoSkipDisliked(preferences.autoSkipDisliked);
  169. changeNightmode(preferences.nightmode);
  170. changeActivityLogPublic(preferences.activityLogPublic);
  171. changeAnonymousSongRequests(preferences.anonymousSongRequests);
  172. changeActivityWatch(preferences.activityWatch);
  173. if (nightmode.value) enableNightmode();
  174. else disableNightmode();
  175. }
  176. });
  177. socket.on("keep.event:user.session.deleted", () =>
  178. window.location.reload()
  179. );
  180. const newUser = !localStorage.getItem("firstVisited");
  181. socket.dispatch("news.newest", newUser, res => {
  182. if (res.status !== "success") return;
  183. const { news } = res.data;
  184. if (news) {
  185. if (newUser) {
  186. openModal({ modal: "whatIsNew", data: { news } });
  187. } else if (localStorage.getItem("whatIsNew")) {
  188. if (
  189. parseInt(localStorage.getItem("whatIsNew")) <
  190. news.createdAt
  191. ) {
  192. openModal({
  193. modal: "whatIsNew",
  194. data: { news }
  195. });
  196. localStorage.setItem("whatIsNew", news.createdAt);
  197. }
  198. } else {
  199. if (
  200. parseInt(localStorage.getItem("firstVisited")) <
  201. news.createdAt
  202. )
  203. openModal({
  204. modal: "whatIsNew",
  205. data: { news }
  206. });
  207. localStorage.setItem("whatIsNew", news.createdAt);
  208. }
  209. }
  210. if (!localStorage.getItem("firstVisited"))
  211. localStorage.setItem("firstVisited", Date.now());
  212. });
  213. });
  214. ws.onDisconnect(true, () => {
  215. socketConnected.value = false;
  216. });
  217. apiDomain.value = await lofig.get("backend.apiDomain");
  218. router.isReady().then(() => {
  219. if (route.query.err) {
  220. let { err } = route.query;
  221. err = err.replace(/</g, "&lt;").replace(/>/g, "&gt;");
  222. router.push({ query: {} });
  223. new Toast({ content: err, timeout: 20000 });
  224. }
  225. if (route.query.msg) {
  226. let { msg } = route.query;
  227. msg = msg.replace(/</g, "&lt;").replace(/>/g, "&gt;");
  228. router.push({ query: {} });
  229. new Toast({ content: msg, timeout: 20000 });
  230. }
  231. lofig.get("siteSettings.githubAuthentication").then(enabled => {
  232. if (enabled && localStorage.getItem("github_redirect")) {
  233. router.push(localStorage.getItem("github_redirect"));
  234. localStorage.removeItem("github_redirect");
  235. }
  236. });
  237. });
  238. if (localStorage.getItem("nightmode") === "true") {
  239. changeNightmode(true);
  240. enableNightmode();
  241. }
  242. lofig.get("siteSettings.christmas").then(enabled => {
  243. if (enabled) {
  244. christmas.value = true;
  245. enableChristmasMode();
  246. }
  247. });
  248. });
  249. </script>
  250. <template>
  251. <div class="upper-container">
  252. <banned-page v-if="banned" />
  253. <div v-else class="upper-container">
  254. <router-view
  255. :key="$route.fullPath"
  256. class="main-container"
  257. :class="{ 'main-container-modal-active': aModalIsOpen2 }"
  258. />
  259. </div>
  260. <falling-snow v-if="christmas" />
  261. <modal-manager />
  262. <long-jobs />
  263. </div>
  264. </template>
  265. <style lang="less">
  266. @import "normalize.css/normalize.css";
  267. @import "tippy.js/dist/tippy.css";
  268. @import "tippy.js/animations/scale.css";
  269. :root {
  270. --primary-color: var(--blue);
  271. --blue: rgb(2, 166, 242);
  272. --light-blue: rgb(163, 224, 255);
  273. --dark-blue: rgb(0, 102, 244);
  274. --teal: rgb(0, 209, 178);
  275. --purple: rgb(143, 40, 140);
  276. --light-purple: rgb(170, 141, 216);
  277. --yellow: rgb(241, 196, 15);
  278. --light-pink: rgb(228, 155, 166);
  279. --dark-pink: rgb(234, 72, 97);
  280. --orange: rgb(255, 94, 0);
  281. --dark-orange: rgb(250, 50, 0);
  282. --green: rgb(68, 189, 50);
  283. --red: rgb(231, 77, 60);
  284. --dark-red: rgb(235, 41, 19);
  285. --white: rgb(255, 255, 255);
  286. --black: rgb(0, 0, 0);
  287. --light-grey: rgb(245, 245, 245);
  288. --light-grey-2: rgb(221, 221, 221);
  289. --light-grey-3: rgb(195, 193, 195);
  290. --grey: rgb(107, 107, 107);
  291. --grey-2: rgb(113, 113, 113);
  292. --grey-3: rgb(126, 126, 126);
  293. --dark-grey: rgb(77, 77, 77);
  294. --dark-grey-2: rgb(51, 51, 51);
  295. --dark-grey-3: rgb(34, 34, 34);
  296. --dark-grey-4: rgb(26, 26, 26);
  297. --youtube: rgb(189, 46, 46);
  298. }
  299. .night-mode {
  300. body {
  301. background-color: var(--black) !important;
  302. }
  303. div {
  304. color: var(--light-grey-2);
  305. }
  306. .input,
  307. .textarea,
  308. .select select {
  309. background-color: var(--dark-grey);
  310. border-color: var(--grey-3);
  311. color: var(--white);
  312. &::placeholder {
  313. color: var(--light-grey-3);
  314. }
  315. }
  316. .control.has-addons .button {
  317. background-color: var(--dark-grey-2);
  318. border: 0;
  319. i {
  320. color: var(--white);
  321. }
  322. }
  323. h1,
  324. h2,
  325. h3,
  326. h4,
  327. h5,
  328. h6 {
  329. color: var(--white) !important;
  330. }
  331. p:not(.help),
  332. label,
  333. .label {
  334. color: var(--light-grey-2) !important;
  335. }
  336. .section,
  337. .content {
  338. background-color: var(--dark-grey-3) !important;
  339. }
  340. .content-box,
  341. .step:not(.selected) {
  342. background-color: var(--dark-grey-3) !important;
  343. }
  344. .tippy-box[data-theme~="songActions"] {
  345. background-color: var(--dark-grey);
  346. }
  347. code {
  348. background-color: var(--dark-grey-2) !important;
  349. }
  350. .button.is-dark {
  351. background-color: var(--light-grey) !important;
  352. color: var(--dark-grey-2) !important;
  353. }
  354. .checkbox input[type="checkbox"] {
  355. background-color: var(--dark-grey);
  356. border-color: transparent;
  357. &:checked:before,
  358. &:checked:after {
  359. background-color: var(--white);
  360. }
  361. }
  362. .pill {
  363. background-color: var(--dark-grey);
  364. color: var(--primary-color);
  365. }
  366. }
  367. .christmas-mode {
  368. --primary-color: var(--red);
  369. }
  370. /* inter-regular - latin */
  371. @font-face {
  372. font-family: "Inter";
  373. font-style: normal;
  374. font-weight: 400;
  375. src: url("/fonts/inter-v3-latin-regular.eot"); /* IE9 Compat Modes */
  376. src: local(""),
  377. url("/fonts/inter-v3-latin-regular.eot?#iefix")
  378. format("embedded-opentype"),
  379. /* IE6-IE8 */ url("/fonts/inter-v3-latin-regular.woff2") format("woff2"),
  380. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-regular.woff")
  381. format("woff"),
  382. /* Modern Browsers */ url("/fonts/inter-v3-latin-regular.ttf")
  383. format("truetype"),
  384. /* Safari, Android, iOS */
  385. url("/fonts/inter-v3-latin-regular.svg#Inter") format("svg"); /* Legacy iOS */
  386. }
  387. /* inter-200 - latin */
  388. @font-face {
  389. font-family: "Inter";
  390. font-style: normal;
  391. font-weight: 200;
  392. src: url("/fonts/inter-v3-latin-200.eot"); /* IE9 Compat Modes */
  393. src: local(""),
  394. url("/fonts/inter-v3-latin-200.eot?#iefix") format("embedded-opentype"),
  395. /* IE6-IE8 */ url("/fonts/inter-v3-latin-200.woff2") format("woff2"),
  396. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-200.woff")
  397. format("woff"),
  398. /* Modern Browsers */ url("/fonts/inter-v3-latin-200.ttf")
  399. format("truetype"),
  400. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-200.svg#Inter")
  401. format("svg"); /* Legacy iOS */
  402. }
  403. /* inter-800 - latin */
  404. @font-face {
  405. font-family: "Inter";
  406. font-style: normal;
  407. font-weight: 800;
  408. src: url("/fonts/inter-v3-latin-800.eot"); /* IE9 Compat Modes */
  409. src: local(""),
  410. url("/fonts/inter-v3-latin-800.eot?#iefix") format("embedded-opentype"),
  411. /* IE6-IE8 */ url("/fonts/inter-v3-latin-800.woff2") format("woff2"),
  412. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-800.woff")
  413. format("woff"),
  414. /* Modern Browsers */ url("/fonts/inter-v3-latin-800.ttf")
  415. format("truetype"),
  416. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-800.svg#Inter")
  417. format("svg"); /* Legacy iOS */
  418. }
  419. /* inter-600 - latin */
  420. @font-face {
  421. font-family: "Inter";
  422. font-style: normal;
  423. font-weight: 600;
  424. src: url("/fonts/inter-v3-latin-600.eot"); /* IE9 Compat Modes */
  425. src: local(""),
  426. url("/fonts/inter-v3-latin-600.eot?#iefix") format("embedded-opentype"),
  427. /* IE6-IE8 */ url("/fonts/inter-v3-latin-600.woff2") format("woff2"),
  428. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-600.woff")
  429. format("woff"),
  430. /* Modern Browsers */ url("/fonts/inter-v3-latin-600.ttf")
  431. format("truetype"),
  432. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-600.svg#Inter")
  433. format("svg"); /* Legacy iOS */
  434. }
  435. /* pacifico-regular - latin */
  436. @font-face {
  437. font-family: "Pacifico";
  438. font-style: normal;
  439. font-weight: 400;
  440. src: url("/fonts/pacifico-v17-latin-regular.eot"); /* IE9 Compat Modes */
  441. src: local(""),
  442. url("/fonts/pacifico-v17-latin-regular.eot?#iefix")
  443. format("embedded-opentype"),
  444. /* IE6-IE8 */ url("/fonts/pacifico-v17-latin-regular.woff2")
  445. format("woff2"),
  446. /* Super Modern Browsers */
  447. url("/fonts/pacifico-v17-latin-regular.woff") format("woff"),
  448. /* Modern Browsers */ url("/fonts/pacifico-v17-latin-regular.ttf")
  449. format("truetype"),
  450. /* Safari, Android, iOS */
  451. url("/fonts/pacifico-v17-latin-regular.svg#Pacifico") format("svg"); /* Legacy iOS */
  452. }
  453. @font-face {
  454. font-family: "Material Icons";
  455. font-style: normal;
  456. font-weight: 400;
  457. src: url(/fonts/MaterialIcons-Regular.ttf); /* For IE6-8 */
  458. src: local("Material Icons"), local("MaterialIcons-Regular"),
  459. url(/fonts/MaterialIcons-Regular.ttf) format("truetype");
  460. }
  461. .material-icons {
  462. font-family: "Material Icons";
  463. font-weight: normal;
  464. font-style: normal;
  465. font-size: 24px; /* Preferred icon size */
  466. display: inline-block;
  467. line-height: 1;
  468. text-transform: none;
  469. letter-spacing: normal;
  470. word-wrap: normal;
  471. white-space: nowrap;
  472. direction: ltr;
  473. /* Support for all WebKit browsers. */
  474. -webkit-font-smoothing: antialiased;
  475. /* Support for Safari and Chrome. */
  476. text-rendering: optimizeLegibility;
  477. /* Support for Firefox. */
  478. -moz-osx-font-smoothing: grayscale;
  479. /* Support for IE. */
  480. font-feature-settings: "liga";
  481. }
  482. code {
  483. background-color: var(--light-grey) !important;
  484. color: var(--dark-red) !important;
  485. }
  486. #toasts-container {
  487. z-index: 10000 !important;
  488. .toast {
  489. font-weight: 600;
  490. z-index: 10000 !important;
  491. }
  492. }
  493. html {
  494. overflow: auto !important;
  495. height: 100%;
  496. background-color: inherit;
  497. font-size: 14px;
  498. }
  499. body {
  500. background-color: var(--light-grey);
  501. color: var(--dark-grey);
  502. height: 100%;
  503. line-height: 1.4285714;
  504. font-size: 1rem;
  505. font-family: "Inter", Helvetica, Arial, sans-serif;
  506. }
  507. .app {
  508. min-height: 100vh;
  509. position: relative;
  510. }
  511. #root {
  512. height: 100%;
  513. }
  514. .content-wrapper {
  515. /* padding: 60px 0 calc(230px + 60px) 0; */
  516. padding-top: 60px;
  517. }
  518. .column {
  519. display: flex;
  520. flex: 1 1 0;
  521. flex-direction: column;
  522. padding: 10px;
  523. }
  524. ul {
  525. list-style: none;
  526. margin: 0;
  527. display: block;
  528. }
  529. h1,
  530. h2,
  531. h3,
  532. h4,
  533. h5,
  534. h6 {
  535. font-family: "Inter", Helvetica, Arial, sans-serif;
  536. font-weight: 400;
  537. line-height: 1.1;
  538. a {
  539. font-weight: inherit;
  540. }
  541. }
  542. h1 {
  543. font-size: 4.2rem;
  544. line-height: 110%;
  545. margin: 2.1rem 0 1.68rem 0;
  546. }
  547. h2 {
  548. font-size: 3.56rem;
  549. line-height: 110%;
  550. margin: 1.78rem 0 1.424rem 0;
  551. }
  552. h3 {
  553. font-size: 2.92rem;
  554. line-height: 110%;
  555. margin: 1.46rem 0 1.168rem 0;
  556. }
  557. h4 {
  558. font-size: 2.28rem;
  559. line-height: 110%;
  560. margin: 1.14rem 0 0.912rem 0;
  561. }
  562. h5 {
  563. font-size: 1.64rem;
  564. line-height: 110%;
  565. margin: 0.82rem 0 0.656rem 0;
  566. }
  567. h6 {
  568. font-size: 1rem;
  569. line-height: 110%;
  570. margin: 0.5rem 0 0.4rem 0;
  571. }
  572. .content {
  573. h4 {
  574. line-height: 1.125;
  575. }
  576. }
  577. .thin {
  578. font-weight: 200;
  579. }
  580. .left {
  581. float: left !important;
  582. }
  583. .right {
  584. float: right !important;
  585. }
  586. .white {
  587. background-color: var(--white) !important;
  588. }
  589. .btn-search {
  590. font-size: 14px;
  591. }
  592. a.nav-item.is-tab {
  593. border-bottom: 1px solid transparent;
  594. border-top: 1px solid transparent;
  595. }
  596. .button.is-info {
  597. border-width: 0;
  598. color: var(--white);
  599. }
  600. strong {
  601. color: inherit;
  602. }
  603. hr {
  604. background-color: var(--light-grey-2);
  605. border: none;
  606. height: 1px;
  607. }
  608. p,
  609. button,
  610. input,
  611. select,
  612. textarea {
  613. font-family: "Inter", Helvetica, Arial, sans-serif;
  614. }
  615. input,
  616. select,
  617. textarea {
  618. outline: none;
  619. }
  620. .label {
  621. display: flex;
  622. font-weight: 700;
  623. &:not(:last-child) {
  624. margin-bottom: 5px;
  625. }
  626. }
  627. #page-title {
  628. margin-top: 0;
  629. font-size: 35px;
  630. text-align: center;
  631. }
  632. @media only screen and (min-width: 700px) {
  633. #page-title {
  634. margin: 0;
  635. margin-bottom: 30px;
  636. font-size: 40px;
  637. }
  638. }
  639. @media screen and (min-width: 980px) {
  640. .container {
  641. max-width: 960px;
  642. margin-left: auto;
  643. margin-right: auto;
  644. }
  645. }
  646. @media screen and (min-width: 1180px) {
  647. .container {
  648. max-width: 1200px;
  649. }
  650. }
  651. .upper-container {
  652. height: 100%;
  653. }
  654. .main-container {
  655. height: 100%;
  656. min-height: 100vh;
  657. display: flex;
  658. flex-direction: column;
  659. &.main-container-modal-active {
  660. height: 100% !important;
  661. overflow: hidden !important;
  662. }
  663. > .container {
  664. position: relative;
  665. flex: 1 0 auto;
  666. margin: 0 auto;
  667. max-width: 1200px;
  668. }
  669. }
  670. a {
  671. color: var(--primary-color);
  672. text-decoration: none;
  673. cursor: pointer;
  674. &:hover,
  675. &:focus {
  676. filter: brightness(90%);
  677. }
  678. }
  679. table {
  680. border-collapse: collapse;
  681. width: 100%;
  682. thead {
  683. td {
  684. border-width: 0 0 2px;
  685. }
  686. }
  687. td {
  688. border: 1px solid var(--light-grey-2);
  689. border-width: 0 0 1px;
  690. padding: 8px 10px;
  691. }
  692. tbody {
  693. tr:last-child {
  694. td {
  695. border-bottom-width: 0;
  696. }
  697. }
  698. }
  699. }
  700. img {
  701. max-width: 100%;
  702. }
  703. .absolute-a {
  704. width: 100%;
  705. height: 100%;
  706. position: absolute;
  707. top: 0;
  708. left: 0;
  709. }
  710. .alert {
  711. padding: 20px;
  712. color: var(--white);
  713. background-color: var(--dark-red);
  714. position: fixed;
  715. top: 50px;
  716. right: 50px;
  717. font-size: 2em;
  718. border-radius: @border-radius;
  719. z-index: 10000000;
  720. }
  721. .night-mode {
  722. .tippy-box {
  723. border: 1px solid var(--light-grey-3);
  724. box-shadow: @box-shadow-dropdown;
  725. background-color: var(--white);
  726. .tippy-content {
  727. color: var(--black);
  728. }
  729. &[data-theme~="songActions"],
  730. &[data-theme~="dropdown"],
  731. &[data-theme~="search"],
  732. &[data-theme~="stationSettings"] {
  733. background-color: var(--dark-grey-2);
  734. border: 0 !important;
  735. }
  736. &[data-theme~="songActions"] {
  737. background-color: var(--dark-grey-2);
  738. border: 0 !important;
  739. i,
  740. a {
  741. color: var(--white);
  742. }
  743. .youtube-icon {
  744. background-color: var(--white);
  745. }
  746. }
  747. &[data-theme~="dropdown"] {
  748. background-color: var(--dark-grey-2);
  749. border: 0 !important;
  750. .nav-dropdown-items {
  751. .nav-item {
  752. background-color: var(--dark-grey);
  753. &:focus {
  754. outline-color: var(--dark-grey);
  755. }
  756. p {
  757. color: var(--white);
  758. }
  759. }
  760. }
  761. }
  762. &[data-theme~="search"] {
  763. background-color: var(--dark-grey-2);
  764. border: 0 !important;
  765. }
  766. &[data-theme~="info"] p {
  767. color: var(--black) !important;
  768. }
  769. }
  770. .tippy-box[data-placement^="top"] {
  771. &[data-theme~="songActions"],
  772. &[data-theme~="dropdown"],
  773. &[data-theme~="search"] {
  774. > .tippy-arrow::before {
  775. border-top-color: var(--dark-grey-2);
  776. }
  777. }
  778. }
  779. .tippy-box[data-placement^="bottom"] {
  780. &[data-theme~="songActions"],
  781. &[data-theme~="dropdown"],
  782. &[data-theme~="search"],
  783. &[data-theme~="stationSettings"] {
  784. > .tippy-arrow::before {
  785. border-bottom-color: var(--dark-grey-2);
  786. }
  787. }
  788. }
  789. .tippy-box[data-placement^="left"] {
  790. &[data-theme~="songActions"],
  791. &[data-theme~="dropdown"],
  792. &[data-theme~="search"] {
  793. > .tippy-arrow::before {
  794. border-left-color: var(--dark-grey-2);
  795. }
  796. }
  797. }
  798. .tippy-box[data-placement^="right"] {
  799. &[data-theme~="songActions"],
  800. &[data-theme~="dropdown"],
  801. &[data-theme~="search"] {
  802. > .tippy-arrow::before {
  803. border-right-color: var(--dark-grey-2);
  804. }
  805. }
  806. }
  807. }
  808. .tippy-box[data-theme~="info"] {
  809. font-size: 12px;
  810. letter-spacing: 1px;
  811. }
  812. .tippy-box[data-theme~="quickConfirm"] {
  813. background-color: var(--dark-red);
  814. border: 0;
  815. .tippy-content {
  816. padding: 0;
  817. }
  818. a {
  819. padding: 15px;
  820. line-height: 30px;
  821. color: var(--white);
  822. border-bottom: 0;
  823. font-size: 15px;
  824. font-weight: 600;
  825. &:hover,
  826. &:focus {
  827. filter: brightness(90%);
  828. }
  829. }
  830. }
  831. .tippy-box[data-theme~="songActions"] {
  832. font-size: 15px;
  833. padding: 5px 10px;
  834. border: 1px solid var(--light-grey-3);
  835. box-shadow: @box-shadow-dropdown;
  836. background-color: var(--white);
  837. .button {
  838. width: 146px;
  839. }
  840. i,
  841. a {
  842. display: inline-block;
  843. cursor: pointer;
  844. color: var(--dark-grey);
  845. vertical-align: middle;
  846. &:hover,
  847. &:focus {
  848. filter: brightness(90%);
  849. }
  850. &:not(:first) {
  851. margin-left: 5px;
  852. }
  853. }
  854. .play-icon,
  855. .added-to-playlist-icon {
  856. color: var(--green);
  857. }
  858. .edit-icon,
  859. .view-icon,
  860. .add-to-playlist-icon,
  861. .add-to-queue-icon {
  862. color: var(--primary-color);
  863. }
  864. .hide-icon {
  865. color: var(--light-grey-3);
  866. }
  867. .stop-icon,
  868. .delete-icon {
  869. color: var(--dark-red);
  870. }
  871. .report-icon {
  872. color: var(--yellow);
  873. }
  874. }
  875. .tippy-box[data-placement^="top"] {
  876. &[data-theme~="songActions"],
  877. &[data-theme~="dropdown"],
  878. &[data-theme~="search"] {
  879. > .tippy-arrow::before {
  880. border-top-color: var(--white);
  881. }
  882. }
  883. &[data-theme~="quickConfirm"] > .tippy-arrow::before {
  884. border-top-color: var(--dark-red);
  885. }
  886. }
  887. .tippy-box[data-placement^="bottom"] {
  888. &[data-theme~="songActions"],
  889. &[data-theme~="dropdown"],
  890. &[data-theme~="stationSettings"],
  891. &[data-theme~="search"] {
  892. > .tippy-arrow::before {
  893. border-bottom-color: var(--white);
  894. }
  895. }
  896. &[data-theme~="quickConfirm"] > .tippy-arrow::before {
  897. border-bottom-color: var(--dark-red);
  898. }
  899. }
  900. .tippy-box[data-placement^="left"] {
  901. &[data-theme~="songActions"],
  902. &[data-theme~="dropdown"],
  903. &[data-theme~="search"] {
  904. > .tippy-arrow::before {
  905. border-left-color: var(--white);
  906. }
  907. }
  908. &[data-theme~="quickConfirm"] > .tippy-arrow::before {
  909. border-left-color: var(--dark-red);
  910. }
  911. }
  912. .tippy-box[data-placement^="right"] {
  913. &[data-theme~="songActions"],
  914. &[data-theme~="dropdown"],
  915. &[data-theme~="search"] {
  916. > .tippy-arrow::before {
  917. border-right-color: var(--white);
  918. }
  919. }
  920. &[data-theme~="quickConfirm"] > .tippy-arrow::before {
  921. border-right-color: var(--dark-red);
  922. }
  923. }
  924. .tippy-box[data-theme~="stationSettings"] {
  925. border: 1px solid var(--light-grey-3);
  926. box-shadow: @box-shadow-dropdown;
  927. background-color: var(--white);
  928. button:not(:last-of-type) {
  929. margin-bottom: 5px;
  930. }
  931. }
  932. .tippy-box[data-theme~="dropdown"] {
  933. font-size: 15px;
  934. padding: 0;
  935. border: 1px solid var(--light-grey-3);
  936. box-shadow: @box-shadow-dropdown;
  937. background-color: var(--white);
  938. color: var(--dark-grey);
  939. width: 350px;
  940. .tippy-content {
  941. padding: 0;
  942. }
  943. .nav-dropdown-items {
  944. max-height: 220px;
  945. overflow-y: auto;
  946. padding: 10px;
  947. .nav-item {
  948. width: 100%;
  949. justify-content: flex-start;
  950. border: 0;
  951. padding: 8px 4px;
  952. font-size: 15.5px;
  953. min-height: 36px;
  954. background: var(--light-grey);
  955. border-radius: @border-radius;
  956. cursor: pointer;
  957. .checkbox-control {
  958. display: flex;
  959. flex-direction: row;
  960. align-items: center;
  961. overflow-wrap: anywhere;
  962. margin: 0 !important;
  963. p {
  964. margin-left: 10px;
  965. }
  966. .switch {
  967. position: relative;
  968. display: inline-block;
  969. flex-shrink: 0;
  970. width: 40px;
  971. height: 24px;
  972. }
  973. .switch input {
  974. opacity: 0;
  975. width: 0;
  976. height: 0;
  977. }
  978. .slider {
  979. width: 100%;
  980. position: absolute;
  981. cursor: pointer;
  982. top: 0;
  983. left: 0;
  984. right: 0;
  985. bottom: 0;
  986. background-color: var(--light-grey-3);
  987. transition: 0.2s;
  988. border-radius: 34px;
  989. &.disabled {
  990. cursor: not-allowed;
  991. }
  992. }
  993. .slider:before {
  994. position: absolute;
  995. content: "";
  996. height: 16px;
  997. width: 16px;
  998. left: 4px;
  999. bottom: 4px;
  1000. background-color: var(--white);
  1001. transition: 0.2s;
  1002. border-radius: 50%;
  1003. }
  1004. input:checked + .slider {
  1005. background-color: var(--primary-color);
  1006. }
  1007. input:focus + .slider {
  1008. box-shadow: 0 0 1px var(--primary-color);
  1009. }
  1010. input:checked + .slider:before {
  1011. transform: translateX(16px);
  1012. }
  1013. }
  1014. &:focus {
  1015. outline-color: var(--light-grey-3);
  1016. }
  1017. &:not(:last-of-type) {
  1018. margin-bottom: 5px;
  1019. }
  1020. }
  1021. }
  1022. .tippy-content > span {
  1023. display: flex;
  1024. flex-direction: column;
  1025. button.nav-item {
  1026. &:not(:last-of-type) {
  1027. margin-bottom: 10px;
  1028. }
  1029. }
  1030. }
  1031. #create-playlist {
  1032. margin: 10px 10px 10px 10px;
  1033. width: calc(100% - 20px);
  1034. }
  1035. }
  1036. .tippy-box[data-theme~="search"] {
  1037. font-size: 15px;
  1038. padding: 0;
  1039. border: 1px solid var(--light-grey-3);
  1040. box-shadow: @box-shadow-dropdown;
  1041. background-color: var(--white);
  1042. color: var(--dark-grey);
  1043. width: 100% !important;
  1044. max-width: 600px !important;
  1045. max-height: calc(100vh - 300px);
  1046. overflow-y: auto;
  1047. .tippy-content {
  1048. padding: 0;
  1049. & > span {
  1050. display: flex;
  1051. flex-direction: column;
  1052. padding: 5px;
  1053. }
  1054. }
  1055. }
  1056. .has-text-centered {
  1057. text-align: center;
  1058. }
  1059. .select {
  1060. position: relative;
  1061. &.is-expanded {
  1062. width: 100%;
  1063. }
  1064. &.disabled,
  1065. .disabled {
  1066. filter: grayscale(1);
  1067. cursor: not-allowed;
  1068. }
  1069. &:after {
  1070. content: " ";
  1071. border: 1.5px solid var(--primary-color);
  1072. border-right: 0;
  1073. border-top: 0;
  1074. height: 7px;
  1075. pointer-events: none;
  1076. position: absolute;
  1077. transform: rotate(-45deg);
  1078. width: 7px;
  1079. margin-top: -6px;
  1080. right: 16px;
  1081. top: 50%;
  1082. }
  1083. select {
  1084. height: 36px;
  1085. width: 100%;
  1086. background-color: var(--white);
  1087. border: 1px solid var(--light-grey-2);
  1088. color: var(--dark-grey-2);
  1089. appearance: none;
  1090. border-radius: @border-radius;
  1091. font-size: 14px;
  1092. line-height: 24px;
  1093. padding-left: 8px;
  1094. position: relative;
  1095. padding-right: 36px;
  1096. cursor: pointer;
  1097. }
  1098. }
  1099. .checkbox {
  1100. height: 25px;
  1101. width: 25px;
  1102. input[type="checkbox"] {
  1103. height: 25px;
  1104. width: 25px;
  1105. background-color: var(--white);
  1106. border: 1px solid var(--light-grey-2);
  1107. appearance: none;
  1108. border-radius: @border-radius;
  1109. cursor: pointer;
  1110. position: relative;
  1111. &:checked {
  1112. &:before {
  1113. content: "";
  1114. position: absolute;
  1115. top: 4px;
  1116. right: 7px;
  1117. background-color: var(--primary-color);
  1118. width: 4px;
  1119. height: 16px;
  1120. transform: rotate(45deg);
  1121. }
  1122. &:after {
  1123. content: "";
  1124. position: absolute;
  1125. top: 12px;
  1126. left: 2px;
  1127. background-color: var(--primary-color);
  1128. width: 10px;
  1129. height: 4px;
  1130. transform: rotate(45deg);
  1131. }
  1132. }
  1133. }
  1134. }
  1135. .button:focus,
  1136. .button:active {
  1137. border-color: var(--light-grey-2) !important;
  1138. }
  1139. .input:focus,
  1140. .input:active,
  1141. .textarea:focus,
  1142. .textarea:active,
  1143. .select select:focus,
  1144. .select select:active {
  1145. border-color: var(--primary-color) !important;
  1146. }
  1147. button.delete:focus {
  1148. background-color: rgba(10, 10, 10, 0.3);
  1149. }
  1150. .tag {
  1151. padding-right: 6px !important;
  1152. }
  1153. #tab-selection,
  1154. .tab-selection {
  1155. overflow-x: auto;
  1156. .button {
  1157. white-space: nowrap;
  1158. }
  1159. }
  1160. .table {
  1161. background-color: var(--white);
  1162. color: var(--dark-grey);
  1163. width: 100%;
  1164. border-collapse: collapse;
  1165. border-spacing: 0;
  1166. border-radius: @border-radius;
  1167. thead th {
  1168. padding: 5px 10px;
  1169. text-align: left;
  1170. font-weight: 600;
  1171. color: var(--grey-3);
  1172. }
  1173. tr {
  1174. &:nth-child(even) {
  1175. background-color: #fafafa;
  1176. }
  1177. &:hover,
  1178. &:focus {
  1179. background-color: var(--light-grey);
  1180. }
  1181. }
  1182. }
  1183. .button {
  1184. border: 1px solid var(--light-grey-2);
  1185. background-color: var(--white);
  1186. color: var(--dark-grey-2);
  1187. border-radius: @border-radius;
  1188. line-height: 24px;
  1189. align-items: center;
  1190. display: inline-flex;
  1191. font-size: 14px;
  1192. padding-left: 10px;
  1193. padding-right: 10px;
  1194. justify-content: center;
  1195. cursor: pointer;
  1196. user-select: none;
  1197. white-space: nowrap;
  1198. &:hover,
  1199. &:focus {
  1200. filter: brightness(95%);
  1201. }
  1202. &.is-success {
  1203. background-color: var(--green) !important;
  1204. border-width: 0;
  1205. color: var(--white);
  1206. }
  1207. &.is-primary {
  1208. background-color: var(--primary-color) !important;
  1209. border-width: 0;
  1210. color: var(--white);
  1211. }
  1212. &.is-danger {
  1213. background-color: var(--dark-red) !important;
  1214. border-width: 0;
  1215. color: var(--white);
  1216. }
  1217. &.is-info {
  1218. background-color: var(--primary-color) !important;
  1219. border-width: 0;
  1220. color: var(--white);
  1221. }
  1222. &.is-warning {
  1223. background-color: var(--yellow) !important;
  1224. border-width: 0;
  1225. color: rgba(0, 0, 0, 0.7);
  1226. }
  1227. &.is-dark {
  1228. background-color: var(--dark-grey-2);
  1229. border-width: 0;
  1230. color: var(--light-grey);
  1231. }
  1232. &.is-fullwidth {
  1233. display: flex;
  1234. width: 100%;
  1235. }
  1236. &.disabled {
  1237. filter: grayscale(1);
  1238. cursor: not-allowed;
  1239. }
  1240. }
  1241. .input,
  1242. .textarea {
  1243. width: 100%;
  1244. padding-left: 8px;
  1245. padding-right: 8px;
  1246. line-height: 24px;
  1247. font-size: 14px;
  1248. border-radius: @border-radius;
  1249. box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
  1250. border: 1px solid var(--light-grey-2);
  1251. }
  1252. .input,
  1253. .button {
  1254. height: 36px;
  1255. }
  1256. .textarea {
  1257. display: block;
  1258. line-height: 1.2;
  1259. padding: 10px;
  1260. max-height: 600px;
  1261. min-height: 120px;
  1262. min-width: 100%;
  1263. resize: vertical;
  1264. }
  1265. .icon {
  1266. height: 24px;
  1267. width: 24px;
  1268. line-height: 24px;
  1269. margin-left: 4px;
  1270. margin-right: -2px;
  1271. }
  1272. .fadein-helpbox-enter-active {
  1273. transition-duration: 0.3s;
  1274. transition-timing-function: ease-in;
  1275. }
  1276. .fadein-helpbox-leave-active {
  1277. transition-duration: 0.3s;
  1278. transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
  1279. }
  1280. .fadein-helpbox-enter-to,
  1281. .fadein-helpbox-leave {
  1282. max-height: 100px;
  1283. overflow: hidden;
  1284. }
  1285. .fadein-helpbox-enter,
  1286. .fadein-helpbox-leave-to {
  1287. overflow: hidden;
  1288. max-height: 0;
  1289. }
  1290. .control {
  1291. margin-bottom: 5px !important;
  1292. &.is-grouped {
  1293. display: flex;
  1294. & > .control {
  1295. &.select.is-expanded > select {
  1296. width: 100%;
  1297. }
  1298. & > input,
  1299. & > select,
  1300. & > .button,
  1301. &.label {
  1302. border-radius: 0;
  1303. }
  1304. &:first-child {
  1305. & > input,
  1306. & > select,
  1307. & > .button,
  1308. &.label {
  1309. border-radius: @border-radius 0 0 @border-radius;
  1310. }
  1311. }
  1312. &:last-child {
  1313. & > input,
  1314. & > select,
  1315. & > .button,
  1316. &.label {
  1317. border-radius: 0 @border-radius @border-radius 0;
  1318. }
  1319. }
  1320. }
  1321. }
  1322. &.is-expanded {
  1323. flex: 1;
  1324. }
  1325. &.has-addons {
  1326. display: flex;
  1327. .button {
  1328. border-radius: 0;
  1329. margin-right: -1px;
  1330. &:first-child {
  1331. border-radius: @border-radius 0 0 @border-radius;
  1332. }
  1333. &:last-child {
  1334. border-radius: 0 @border-radius @border-radius 0;
  1335. padding-left: 10px;
  1336. }
  1337. &.dropdown-toggle {
  1338. padding-left: 5px;
  1339. padding-right: 5px;
  1340. }
  1341. }
  1342. .input {
  1343. margin-right: -1px;
  1344. &:first-child {
  1345. border-radius: @border-radius 0 0 @border-radius;
  1346. }
  1347. }
  1348. }
  1349. }
  1350. .input-with-button {
  1351. .control {
  1352. margin-right: 0px !important;
  1353. }
  1354. input,
  1355. select {
  1356. width: 100%;
  1357. height: 36px;
  1358. border-radius: @border-radius 0 0 @border-radius;
  1359. border-right: 0;
  1360. border-color: var(--light-grey-3);
  1361. }
  1362. .button {
  1363. height: 36px;
  1364. border-radius: 0 @border-radius @border-radius 0;
  1365. }
  1366. }
  1367. .page-title {
  1368. margin: 0 0 50px 0;
  1369. }
  1370. .material-icons {
  1371. user-select: none;
  1372. -webkit-user-select: none;
  1373. }
  1374. .icon-with-button {
  1375. margin-right: 3px;
  1376. font-size: 18px;
  1377. }
  1378. .verified-song {
  1379. font-size: 17px;
  1380. color: var(--primary-color);
  1381. }
  1382. .section-title,
  1383. h4.section-title {
  1384. font-size: 26px;
  1385. font-weight: 600;
  1386. margin: 0px;
  1387. }
  1388. .section-description {
  1389. font-size: 16px;
  1390. font-weight: 400;
  1391. margin-bottom: 10px !important;
  1392. }
  1393. .section-horizontal-rule {
  1394. margin: 15px 0 30px 0;
  1395. }
  1396. .section-margin-bottom {
  1397. height: 30px;
  1398. }
  1399. .margin-top-zero {
  1400. margin-top: 0 !important;
  1401. }
  1402. .margin-bottom-zero {
  1403. margin-bottom: 0 !important;
  1404. }
  1405. /** Universial items e.g. playlist items, queue items, activity items */
  1406. .item-draggable {
  1407. cursor: move;
  1408. }
  1409. .universal-item {
  1410. display: flex;
  1411. flex-direction: row;
  1412. flex-grow: 1;
  1413. align-items: center;
  1414. justify-content: space-between;
  1415. padding: 7.5px;
  1416. border: 1px solid var(--light-grey-3);
  1417. border-radius: @border-radius;
  1418. overflow: hidden;
  1419. .item-thumbnail {
  1420. width: 65px;
  1421. height: 65px;
  1422. margin: -7.5px;
  1423. border-radius: @border-radius 0 0 @border-radius;
  1424. }
  1425. .item-title {
  1426. font-size: 20px;
  1427. overflow: hidden;
  1428. text-overflow: ellipsis;
  1429. white-space: nowrap;
  1430. }
  1431. .item-description {
  1432. font-size: 14px;
  1433. overflow: hidden;
  1434. text-overflow: ellipsis;
  1435. white-space: nowrap;
  1436. }
  1437. .universal-item-actions {
  1438. display: flex;
  1439. flex-direction: row;
  1440. margin-left: 10px;
  1441. justify-content: center;
  1442. @media screen and (max-width: 800px) {
  1443. flex-wrap: wrap;
  1444. }
  1445. .action-dropdown-icon {
  1446. display: flex;
  1447. color: var(--primary-color);
  1448. }
  1449. .icons-group {
  1450. display: flex;
  1451. align-items: center;
  1452. a {
  1453. padding: 0;
  1454. }
  1455. }
  1456. .button {
  1457. width: 146px;
  1458. }
  1459. i,
  1460. span {
  1461. cursor: pointer;
  1462. &:not(:first-child) {
  1463. margin-left: 5px;
  1464. }
  1465. }
  1466. .play-icon,
  1467. .added-to-playlist-icon {
  1468. color: var(--green);
  1469. }
  1470. .edit-icon,
  1471. .view-icon,
  1472. .add-to-playlist-icon,
  1473. .add-to-queue-icon {
  1474. color: var(--primary-color);
  1475. }
  1476. .hide-icon {
  1477. color: var(--light-grey-3);
  1478. }
  1479. .stop-icon,
  1480. .delete-icon {
  1481. color: var(--dark-red);
  1482. }
  1483. .report-icon {
  1484. color: var(--yellow);
  1485. }
  1486. }
  1487. }
  1488. .save-button-mixin {
  1489. min-width: 200px;
  1490. &:disabled {
  1491. background-color: var(--light-grey) !important;
  1492. color: var(--black);
  1493. }
  1494. }
  1495. .save-button-transition-enter-active {
  1496. transition: all 0.1s ease;
  1497. }
  1498. .save-button-transition-enter {
  1499. transform: translateX(20px);
  1500. opacity: 0;
  1501. }
  1502. .youtube-icon {
  1503. margin-right: 3px;
  1504. height: 20px;
  1505. width: 20px;
  1506. -webkit-mask: url("/assets/social/youtube.svg") no-repeat center;
  1507. mask: url("/assets/social/youtube.svg") no-repeat center;
  1508. background-color: var(--youtube);
  1509. }
  1510. #forgot-password {
  1511. justify-content: flex-start;
  1512. margin: 5px 0;
  1513. }
  1514. .steps-fade-leave-active {
  1515. display: none;
  1516. }
  1517. .steps-fade-enter-active,
  1518. .steps-fade-leave-active {
  1519. transition: all 0.3s ease;
  1520. }
  1521. .steps-fade-enter-from,
  1522. .steps-fade-leave-to {
  1523. opacity: 0;
  1524. }
  1525. .skip-step {
  1526. background-color: var(--grey-3);
  1527. color: var(--white);
  1528. }
  1529. #steps {
  1530. display: flex;
  1531. align-items: center;
  1532. justify-content: center;
  1533. height: 50px;
  1534. margin-top: 36px;
  1535. @media screen and (max-width: 300px) {
  1536. display: none;
  1537. }
  1538. .step {
  1539. display: flex;
  1540. align-items: center;
  1541. justify-content: center;
  1542. border-radius: 100%;
  1543. border: 1px solid var(--dark-grey);
  1544. min-width: 50px;
  1545. min-height: 50px;
  1546. background-color: var(--white);
  1547. font-size: 30px;
  1548. user-select: none;
  1549. &.selected {
  1550. background-color: var(--primary-color);
  1551. color: var(--white) !important;
  1552. border: 0;
  1553. }
  1554. }
  1555. .divider {
  1556. display: flex;
  1557. justify-content: center;
  1558. width: 180px;
  1559. height: 1px;
  1560. background-color: var(--dark-grey);
  1561. }
  1562. }
  1563. /* This class is used for content-box in ResetPassword, but not in RemoveAccount. This is because ResetPassword uses transitions and RemoveAccount does not */
  1564. .content-box-wrapper {
  1565. margin-top: 90px;
  1566. width: 100%;
  1567. display: flex;
  1568. align-items: center;
  1569. }
  1570. .content-box {
  1571. border-radius: @border-radius;
  1572. background-color: var(--white);
  1573. border: 1px solid var(--dark-grey);
  1574. max-width: 580px;
  1575. padding: 40px;
  1576. flex: 1;
  1577. @media screen and (max-width: 300px) {
  1578. margin-top: 30px;
  1579. padding: 30px 20px;
  1580. }
  1581. }
  1582. .content-box-optional-helper {
  1583. margin-top: 15px;
  1584. color: var(--primary-color);
  1585. font-size: 16px;
  1586. a {
  1587. color: var(--primary-color);
  1588. }
  1589. }
  1590. .content-box-title {
  1591. font-size: 25px;
  1592. color: var(--black);
  1593. }
  1594. .content-box-description {
  1595. font-size: 14px;
  1596. color: var(--dark-grey);
  1597. }
  1598. .content-box-inputs {
  1599. margin-top: 35px;
  1600. .input-with-button {
  1601. .button {
  1602. width: 105px;
  1603. }
  1604. @media screen and (max-width: 450px) {
  1605. flex-direction: column;
  1606. }
  1607. }
  1608. label {
  1609. font-size: 11px;
  1610. }
  1611. #change-password-button {
  1612. margin-top: 36px;
  1613. width: 175px;
  1614. }
  1615. }
  1616. #password-visibility-container {
  1617. display: flex;
  1618. align-items: center;
  1619. a {
  1620. width: 0;
  1621. margin-left: -30px;
  1622. z-index: 0;
  1623. top: 2px;
  1624. position: relative;
  1625. color: var(--light-grey-1);
  1626. }
  1627. }
  1628. .news-item {
  1629. font-family: "Karla";
  1630. border-radius: @border-radius;
  1631. padding: 20px;
  1632. border: unset !important;
  1633. box-shadow: @box-shadow;
  1634. * {
  1635. font-family: Karla, Arial, sans-serif;
  1636. font-size: 16px;
  1637. }
  1638. h1 {
  1639. font-size: 40px;
  1640. &:first-of-type {
  1641. margin-top: 0;
  1642. }
  1643. }
  1644. h2 {
  1645. font-size: 30px;
  1646. }
  1647. h3 {
  1648. font-size: 25px;
  1649. }
  1650. h4,
  1651. h5,
  1652. h6 {
  1653. font-size: 20px;
  1654. }
  1655. h1,
  1656. h2,
  1657. h3,
  1658. h4,
  1659. h5,
  1660. h6 {
  1661. margin: 10px 0;
  1662. }
  1663. ul {
  1664. list-style: unset;
  1665. }
  1666. li {
  1667. margin-left: 30px;
  1668. }
  1669. blockquote {
  1670. padding: 0px 15px;
  1671. color: var(--grey-2);
  1672. border-left: 0.25em solid var(--light-grey-2);
  1673. }
  1674. code {
  1675. font-style: italic;
  1676. }
  1677. hr {
  1678. margin: 10px 0;
  1679. }
  1680. }
  1681. .checkbox-control {
  1682. display: flex;
  1683. flex-direction: row;
  1684. align-items: center;
  1685. p {
  1686. margin-left: 10px;
  1687. }
  1688. .switch {
  1689. position: relative;
  1690. display: inline-block;
  1691. flex-shrink: 0;
  1692. width: 40px;
  1693. height: 24px;
  1694. }
  1695. .switch input {
  1696. opacity: 0;
  1697. width: 0;
  1698. height: 0;
  1699. }
  1700. .slider {
  1701. position: absolute;
  1702. cursor: pointer;
  1703. top: 0;
  1704. left: 0;
  1705. right: 0;
  1706. bottom: 0;
  1707. background-color: var(--light-grey-3);
  1708. transition: 0.2s;
  1709. border-radius: 34px;
  1710. }
  1711. .slider:before {
  1712. position: absolute;
  1713. content: "";
  1714. height: 16px;
  1715. width: 16px;
  1716. left: 4px;
  1717. bottom: 4px;
  1718. background-color: var(--white);
  1719. transition: 0.2s;
  1720. border-radius: 50%;
  1721. }
  1722. input:checked + .slider {
  1723. background-color: var(--primary-color);
  1724. }
  1725. input:focus + .slider {
  1726. box-shadow: 0 0 1px var(--primary-color);
  1727. }
  1728. input:checked + .slider:before {
  1729. transform: translateX(16px);
  1730. }
  1731. }
  1732. html {
  1733. &,
  1734. * {
  1735. scrollbar-color: var(--primary-color) transparent;
  1736. scrollbar-width: thin;
  1737. }
  1738. &.night-mode {
  1739. &,
  1740. * {
  1741. scrollbar-color: var(--light-grey) transparent !important;
  1742. }
  1743. &::-webkit-scrollbar-thumb,
  1744. ::-webkit-scrollbar-thumb {
  1745. background-color: var(--light-grey);
  1746. }
  1747. ::-webkit-scrollbar-track {
  1748. background-color: var(--dark-grey-3);
  1749. }
  1750. }
  1751. div {
  1752. ::-webkit-scrollbar-track {
  1753. background-color: transparent !important;
  1754. }
  1755. }
  1756. }
  1757. ::-webkit-scrollbar {
  1758. height: 10px;
  1759. width: 10px;
  1760. }
  1761. ::-webkit-scrollbar-track {
  1762. background-color: var(--light-grey-2);
  1763. }
  1764. ::-webkit-scrollbar-thumb {
  1765. background-color: var(--primary-color);
  1766. }
  1767. ::-webkit-scrollbar-corner {
  1768. background-color: transparent;
  1769. }
  1770. :disabled,
  1771. .disabled {
  1772. cursor: not-allowed;
  1773. }
  1774. .pill {
  1775. background-color: var(--light-grey);
  1776. color: var(--primary-color);
  1777. padding: 5px 10px;
  1778. border-radius: @border-radius;
  1779. font-size: 14px;
  1780. font-weight: 600;
  1781. white-space: nowrap;
  1782. margin-top: 5px;
  1783. box-shadow: @box-shadow;
  1784. transition: all 0.2s ease-in-out;
  1785. &:hover,
  1786. &:focus {
  1787. filter: brightness(95%);
  1788. }
  1789. &:not(:last-of-type) {
  1790. margin-right: 5px;
  1791. }
  1792. }
  1793. </style>