App.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176
  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. filter: grayscale(1);
  1771. cursor: not-allowed;
  1772. }
  1773. }
  1774. .slider:before {
  1775. position: absolute;
  1776. content: "";
  1777. height: 16px;
  1778. width: 16px;
  1779. left: 4px;
  1780. bottom: 4px;
  1781. background-color: var(--white);
  1782. transition: 0.2s;
  1783. border-radius: 50%;
  1784. }
  1785. input:checked + .slider {
  1786. background-color: var(--primary-color);
  1787. }
  1788. input:focus + .slider {
  1789. box-shadow: 0 0 1px var(--primary-color);
  1790. }
  1791. input:checked + .slider:before {
  1792. transform: translateX(16px);
  1793. }
  1794. }
  1795. html {
  1796. &,
  1797. * {
  1798. scrollbar-color: var(--primary-color) transparent;
  1799. scrollbar-width: thin;
  1800. }
  1801. &.night-mode {
  1802. &,
  1803. * {
  1804. scrollbar-color: var(--light-grey) transparent !important;
  1805. }
  1806. &::-webkit-scrollbar-thumb,
  1807. ::-webkit-scrollbar-thumb {
  1808. background-color: var(--light-grey);
  1809. }
  1810. ::-webkit-scrollbar-track {
  1811. background-color: var(--dark-grey-3);
  1812. }
  1813. }
  1814. div {
  1815. ::-webkit-scrollbar-track {
  1816. background-color: transparent !important;
  1817. }
  1818. }
  1819. }
  1820. ::-webkit-scrollbar {
  1821. height: 10px;
  1822. width: 10px;
  1823. }
  1824. ::-webkit-scrollbar-track {
  1825. background-color: var(--light-grey-2);
  1826. }
  1827. ::-webkit-scrollbar-thumb {
  1828. background-color: var(--primary-color);
  1829. }
  1830. ::-webkit-scrollbar-corner {
  1831. background-color: transparent;
  1832. }
  1833. :disabled,
  1834. .disabled {
  1835. cursor: not-allowed;
  1836. }
  1837. .pill {
  1838. background-color: var(--light-grey);
  1839. color: var(--primary-color);
  1840. padding: 5px 10px;
  1841. border-radius: @border-radius;
  1842. font-size: 14px;
  1843. font-weight: 600;
  1844. white-space: nowrap;
  1845. margin-top: 5px;
  1846. box-shadow: @box-shadow;
  1847. transition: all 0.2s ease-in-out;
  1848. &:hover,
  1849. &:focus {
  1850. filter: brightness(95%);
  1851. }
  1852. &:not(:last-of-type) {
  1853. margin-right: 5px;
  1854. }
  1855. }
  1856. </style>