App.vue 38 KB

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