App.vue 39 KB

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