App.vue 39 KB

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