App.vue 37 KB

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