App.vue 38 KB

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