App.vue 39 KB

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