App.vue 38 KB

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