App.vue 39 KB

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