App.vue 38 KB

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