App.vue 39 KB

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