App.vue 37 KB

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