12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042 |
- <template>
- <div class="upper-container">
- <banned v-if="banned" />
- <div v-else class="upper-container">
- <router-view
- :key="$route.fullPath"
- class="main-container"
- :class="{ 'main-container-modal-active': aModalIsOpen2 }"
- />
- <what-is-new v-show="modals.whatIsNew" />
- <login-modal v-if="modals.login" />
- <register-modal v-if="modals.register" />
- <create-playlist-modal v-if="modals.createPlaylist" />
- </div>
- <falling-snow v-if="christmas" />
- </div>
- </template>
- <script>
- import { mapState, mapActions, mapGetters } from "vuex";
- import Toast from "toasters";
- import { defineAsyncComponent } from "vue";
- import ws from "./ws";
- import aw from "./aw";
- import keyboardShortcuts from "./keyboardShortcuts";
- export default {
- components: {
- WhatIsNew: defineAsyncComponent(() =>
- import("@/components/modals/WhatIsNew.vue")
- ),
- LoginModal: defineAsyncComponent(() =>
- import("@/components/modals/Login.vue")
- ),
- RegisterModal: defineAsyncComponent(() =>
- import("@/components/modals/Register.vue")
- ),
- CreatePlaylistModal: defineAsyncComponent(() =>
- import("@/components/modals/CreatePlaylist.vue")
- ),
- Banned: defineAsyncComponent(() => import("@/pages/Banned.vue")),
- FallingSnow: defineAsyncComponent(() =>
- import("@/components/FallingSnow.vue")
- )
- },
- replace: false,
- data() {
- return {
- apiDomain: "",
- socketConnected: true,
- keyIsDown: false,
- scrollPosition: { y: 0, x: 0 },
- aModalIsOpen2: false,
- broadcastChannel: null,
- christmas: false
- };
- },
- computed: {
- ...mapState({
- loggedIn: state => state.user.auth.loggedIn,
- role: state => state.user.auth.role,
- username: state => state.user.auth.username,
- userId: state => state.user.auth.userId,
- banned: state => state.user.auth.banned,
- modals: state => state.modalVisibility.modals,
- currentlyActive: state => state.modalVisibility.currentlyActive,
- nightmode: state => state.user.preferences.nightmode,
- activityWatch: state => state.user.preferences.activityWatch
- }),
- ...mapGetters({
- socket: "websockets/getSocket"
- }),
- aModalIsOpen() {
- return Object.keys(this.currentlyActive).length > 0;
- }
- },
- watch: {
- socketConnected(connected) {
- if (!connected) this.disconnectedMessage.show();
- else this.disconnectedMessage.hide();
- },
- nightmode(nightmode) {
- if (nightmode) this.enableNightmode();
- else this.disableNightmode();
- },
- activityWatch(activityWatch) {
- if (activityWatch) aw.enable();
- else aw.disable();
- },
- aModalIsOpen(aModalIsOpen) {
- if (aModalIsOpen) {
- this.scrollPosition = {
- x: window.scrollX,
- y: window.scrollY
- };
- this.aModalIsOpen2 = true;
- } else {
- this.aModalIsOpen2 = false;
- setTimeout(() => {
- window.scrollTo(
- this.scrollPosition.x,
- this.scrollPosition.y
- );
- }, 10);
- }
- }
- },
- async mounted() {
- window
- .matchMedia("(prefers-color-scheme: dark)")
- .addEventListener("change", e => {
- if (e.matches === !this.nightmode) this.toggleNightMode();
- });
- if (!this.loggedIn) {
- lofig.get("cookie.SIDname").then(sid => {
- this.broadcastChannel = new BroadcastChannel(
- `${sid}.user_login`
- );
- this.broadcastChannel.onmessage = data => {
- if (data) {
- this.broadcastChannel.close();
- window.location.reload();
- }
- };
- });
- }
- document.onkeydown = ev => {
- const event = ev || window.event;
- const { keyCode } = event;
- const shift = event.shiftKey;
- const ctrl = event.ctrlKey;
- const alt = event.altKey;
- const identifier = `${keyCode}.${shift}.${ctrl}`;
- if (this.keyIsDown === identifier) return;
- this.keyIsDown = identifier;
- keyboardShortcuts.handleKeyDown(event, keyCode, shift, ctrl, alt);
- };
- document.onkeyup = () => {
- this.keyIsDown = "";
- };
- // ctrl + alt + n
- keyboardShortcuts.registerShortcut("nightmode", {
- keyCode: 78,
- ctrl: true,
- alt: true,
- handler: () => this.toggleNightMode()
- });
- keyboardShortcuts.registerShortcut("closeModal", {
- keyCode: 27,
- shift: false,
- ctrl: false,
- handler: () => {
- if (
- Object.keys(this.currentlyActive).length !== 0 &&
- this.currentlyActive[0] !== "editSong" &&
- this.currentlyActive[0] !== "editSongs"
- )
- this.closeCurrentModal();
- }
- });
- this.disconnectedMessage = new Toast({
- content: "Could not connect to the server.",
- persistent: true,
- interactable: false
- });
- this.disconnectedMessage.hide();
- ws.onConnect(() => {
- this.socketConnected = true;
- this.socket.dispatch("users.getPreferences", res => {
- if (res.status === "success") {
- const { preferences } = res.data;
- this.changeAutoSkipDisliked(preferences.autoSkipDisliked);
- this.changeNightmode(preferences.nightmode);
- this.changeActivityLogPublic(preferences.activityLogPublic);
- this.changeAnonymousSongRequests(
- preferences.anonymousSongRequests
- );
- this.changeActivityWatch(preferences.activityWatch);
- if (this.nightmode) this.enableNightmode();
- else this.disableNightmode();
- }
- });
- this.socket.on("keep.event:user.session.deleted", () =>
- window.location.reload()
- );
- });
- ws.onDisconnect(true, () => {
- this.socketConnected = false;
- });
- this.apiDomain = await lofig.get("backend.apiDomain");
- this.$router.isReady().then(() => {
- if (this.$route.query.err) {
- let { err } = this.$route.query;
- err = err.replace(/</g, "<").replace(/>/g, ">");
- this.$router.push({ query: {} });
- new Toast({ content: err, timeout: 20000 });
- }
- if (this.$route.query.msg) {
- let { msg } = this.$route.query;
- msg = msg.replace(/</g, "<").replace(/>/g, ">");
- this.$router.push({ query: {} });
- new Toast({ content: msg, timeout: 20000 });
- }
- if (localStorage.getItem("github_redirect")) {
- this.$router.push(localStorage.getItem("github_redirect"));
- localStorage.removeItem("github_redirect");
- }
- });
- if (localStorage.getItem("nightmode") === "true") {
- this.changeNightmode(true);
- this.enableNightmode();
- }
- lofig.get("siteSettings.christmas").then(christmas => {
- if (christmas) {
- this.christmas = true;
- this.enableChristmasMode();
- }
- });
- },
- methods: {
- toggleNightMode() {
- localStorage.setItem("nightmode", !this.nightmode);
- if (this.loggedIn) {
- this.socket.dispatch(
- "users.updatePreferences",
- { nightmode: !this.nightmode },
- res => {
- if (res.status !== "success") new Toast(res.message);
- }
- );
- }
- this.changeNightmode(!this.nightmode);
- },
- enableNightmode: () => {
- document
- .getElementsByTagName("html")[0]
- .classList.add("night-mode");
- },
- disableNightmode: () => {
- document
- .getElementsByTagName("html")[0]
- .classList.remove("night-mode");
- },
- enableChristmasMode: () => {
- document
- .getElementsByTagName("html")[0]
- .classList.add("christmas-mode");
- },
- ...mapActions("modalVisibility", ["closeCurrentModal"]),
- ...mapActions("user/preferences", [
- "changeNightmode",
- "changeAutoSkipDisliked",
- "changeActivityLogPublic",
- "changeAnonymousSongRequests",
- "changeActivityWatch"
- ])
- }
- };
- </script>
- <style lang="less">
- @import "normalize.css/normalize.css";
- @import "tippy.js/dist/tippy.css";
- @import "tippy.js/animations/scale.css";
- :root {
- --primary-color: var(--blue);
- --blue: rgb(2, 166, 242);
- --light-blue: rgb(163, 224, 255);
- --dark-blue: rgb(0, 102, 244);
- --teal: rgb(0, 209, 178);
- --purple: rgb(143, 40, 140);
- --light-purple: rgb(170, 141, 216);
- --yellow: rgb(241, 196, 15);
- --light-pink: rgb(228, 155, 166);
- --dark-pink: rgb(234, 72, 97);
- --orange: rgb(255, 94, 0);
- --dark-orange: rgb(250, 50, 0);
- --green: rgb(68, 189, 50);
- --red: rgb(231, 77, 60);
- --dark-red: rgb(235, 41, 19);
- --white: rgb(255, 255, 255);
- --black: rgb(0, 0, 0);
- --light-grey: rgb(245, 245, 245);
- --light-grey-2: rgb(221, 221, 221);
- --light-grey-3: rgb(195, 193, 195);
- --grey: rgb(107, 107, 107);
- --grey-2: rgb(113, 113, 113);
- --grey-3: rgb(126, 126, 126);
- --dark-grey: rgb(77, 77, 77);
- --dark-grey-2: rgb(51, 51, 51);
- --dark-grey-3: rgb(34, 34, 34);
- --dark-grey-4: rgb(26, 26, 26);
- --youtube: rgb(189, 46, 46);
- }
- .night-mode {
- body {
- background-color: var(--black) !important;
- }
- div {
- color: var(--light-grey-2);
- }
- .input,
- .textarea,
- .select select {
- background-color: var(--dark-grey);
- border-color: var(--grey-3);
- color: var(--white);
- &::placeholder {
- color: var(--light-grey-3);
- }
- }
- .control.has-addons .button {
- background-color: var(--dark-grey-2);
- border: 0;
- i {
- color: var(--white);
- }
- }
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- color: var(--white) !important;
- }
- p:not(.help),
- label,
- .label {
- color: var(--light-grey-2) !important;
- }
- .section,
- .content {
- background-color: var(--dark-grey-3) !important;
- }
- .content-box,
- .step:not(.selected) {
- background-color: var(--dark-grey-3) !important;
- }
- .tippy-box[data-theme~="songActions"] {
- background-color: var(--dark-grey);
- }
- code {
- background-color: var(--dark-grey-2) !important;
- }
- .button.is-dark {
- background-color: var(--light-grey) !important;
- color: var(--dark-grey-2) !important;
- }
- .checkbox input[type="checkbox"] {
- background-color: var(--dark-grey);
- border-color: transparent;
- &:checked:before,
- &:checked:after {
- background-color: var(--white);
- }
- }
- .pill {
- background-color: var(--dark-grey);
- color: var(--primary-color);
- }
- }
- .christmas-mode {
- --primary-color: var(--red);
- }
- /* inter-regular - latin */
- @font-face {
- font-family: "Inter";
- font-style: normal;
- font-weight: 400;
- src: url("/fonts/inter-v3-latin-regular.eot"); /* IE9 Compat Modes */
- src: local(""),
- url("/fonts/inter-v3-latin-regular.eot?#iefix")
- format("embedded-opentype"),
- /* IE6-IE8 */ url("/fonts/inter-v3-latin-regular.woff2") format("woff2"),
- /* Super Modern Browsers */ url("/fonts/inter-v3-latin-regular.woff")
- format("woff"),
- /* Modern Browsers */ url("/fonts/inter-v3-latin-regular.ttf")
- format("truetype"),
- /* Safari, Android, iOS */
- url("/fonts/inter-v3-latin-regular.svg#Inter") format("svg"); /* Legacy iOS */
- }
- /* inter-200 - latin */
- @font-face {
- font-family: "Inter";
- font-style: normal;
- font-weight: 200;
- src: url("/fonts/inter-v3-latin-200.eot"); /* IE9 Compat Modes */
- src: local(""),
- url("/fonts/inter-v3-latin-200.eot?#iefix") format("embedded-opentype"),
- /* IE6-IE8 */ url("/fonts/inter-v3-latin-200.woff2") format("woff2"),
- /* Super Modern Browsers */ url("/fonts/inter-v3-latin-200.woff")
- format("woff"),
- /* Modern Browsers */ url("/fonts/inter-v3-latin-200.ttf")
- format("truetype"),
- /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-200.svg#Inter")
- format("svg"); /* Legacy iOS */
- }
- /* inter-800 - latin */
- @font-face {
- font-family: "Inter";
- font-style: normal;
- font-weight: 800;
- src: url("/fonts/inter-v3-latin-800.eot"); /* IE9 Compat Modes */
- src: local(""),
- url("/fonts/inter-v3-latin-800.eot?#iefix") format("embedded-opentype"),
- /* IE6-IE8 */ url("/fonts/inter-v3-latin-800.woff2") format("woff2"),
- /* Super Modern Browsers */ url("/fonts/inter-v3-latin-800.woff")
- format("woff"),
- /* Modern Browsers */ url("/fonts/inter-v3-latin-800.ttf")
- format("truetype"),
- /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-800.svg#Inter")
- format("svg"); /* Legacy iOS */
- }
- /* inter-600 - latin */
- @font-face {
- font-family: "Inter";
- font-style: normal;
- font-weight: 600;
- src: url("/fonts/inter-v3-latin-600.eot"); /* IE9 Compat Modes */
- src: local(""),
- url("/fonts/inter-v3-latin-600.eot?#iefix") format("embedded-opentype"),
- /* IE6-IE8 */ url("/fonts/inter-v3-latin-600.woff2") format("woff2"),
- /* Super Modern Browsers */ url("/fonts/inter-v3-latin-600.woff")
- format("woff"),
- /* Modern Browsers */ url("/fonts/inter-v3-latin-600.ttf")
- format("truetype"),
- /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-600.svg#Inter")
- format("svg"); /* Legacy iOS */
- }
- /* pacifico-regular - latin */
- @font-face {
- font-family: "Pacifico";
- font-style: normal;
- font-weight: 400;
- src: url("/fonts/pacifico-v17-latin-regular.eot"); /* IE9 Compat Modes */
- src: local(""),
- url("/fonts/pacifico-v17-latin-regular.eot?#iefix")
- format("embedded-opentype"),
- /* IE6-IE8 */ url("/fonts/pacifico-v17-latin-regular.woff2")
- format("woff2"),
- /* Super Modern Browsers */
- url("/fonts/pacifico-v17-latin-regular.woff") format("woff"),
- /* Modern Browsers */ url("/fonts/pacifico-v17-latin-regular.ttf")
- format("truetype"),
- /* Safari, Android, iOS */
- url("/fonts/pacifico-v17-latin-regular.svg#Pacifico") format("svg"); /* Legacy iOS */
- }
- @font-face {
- font-family: "Material Icons";
- font-style: normal;
- font-weight: 400;
- src: url(/fonts/MaterialIcons-Regular.ttf); /* For IE6-8 */
- src: local("Material Icons"), local("MaterialIcons-Regular"),
- url(/fonts/MaterialIcons-Regular.ttf) format("truetype");
- }
- .material-icons {
- font-family: "Material Icons";
- font-weight: normal;
- font-style: normal;
- font-size: 24px; /* Preferred icon size */
- display: inline-block;
- line-height: 1;
- text-transform: none;
- letter-spacing: normal;
- word-wrap: normal;
- white-space: nowrap;
- direction: ltr;
- /* Support for all WebKit browsers. */
- -webkit-font-smoothing: antialiased;
- /* Support for Safari and Chrome. */
- text-rendering: optimizeLegibility;
- /* Support for Firefox. */
- -moz-osx-font-smoothing: grayscale;
- /* Support for IE. */
- font-feature-settings: "liga";
- }
- code {
- background-color: var(--light-grey) !important;
- color: var(--dark-red) !important;
- }
- #toasts-container {
- z-index: 10000 !important;
- .toast {
- font-weight: 600;
- z-index: 10000 !important;
- }
- }
- html {
- overflow: auto !important;
- height: 100%;
- background-color: inherit;
- font-size: 14px;
- }
- body {
- background-color: var(--light-grey);
- color: var(--dark-grey);
- height: 100%;
- line-height: 1.4285714;
- font-size: 1rem;
- font-family: "Inter", Helvetica, Arial, sans-serif;
- }
- .app {
- min-height: 100vh;
- position: relative;
- }
- #root {
- height: 100%;
- }
- .content-wrapper {
- /* padding: 60px 0 calc(230px + 60px) 0; */
- padding-top: 60px;
- }
- .column {
- display: flex;
- flex: 1 1 0;
- flex-direction: column;
- padding: 10px;
- }
- ul {
- list-style: none;
- margin: 0;
- display: block;
- }
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- font-family: "Inter", Helvetica, Arial, sans-serif;
- font-weight: 400;
- line-height: 1.1;
- a {
- font-weight: inherit;
- }
- }
- h1 {
- font-size: 4.2rem;
- line-height: 110%;
- margin: 2.1rem 0 1.68rem 0;
- }
- h2 {
- font-size: 3.56rem;
- line-height: 110%;
- margin: 1.78rem 0 1.424rem 0;
- }
- h3 {
- font-size: 2.92rem;
- line-height: 110%;
- margin: 1.46rem 0 1.168rem 0;
- }
- h4 {
- font-size: 2.28rem;
- line-height: 110%;
- margin: 1.14rem 0 0.912rem 0;
- }
- h5 {
- font-size: 1.64rem;
- line-height: 110%;
- margin: 0.82rem 0 0.656rem 0;
- }
- h6 {
- font-size: 1rem;
- line-height: 110%;
- margin: 0.5rem 0 0.4rem 0;
- }
- .content {
- h4 {
- line-height: 1.125;
- }
- }
- .thin {
- font-weight: 200;
- }
- .left {
- float: left !important;
- }
- .right {
- float: right !important;
- }
- .white {
- background-color: var(--white) !important;
- }
- .btn-search {
- font-size: 14px;
- }
- a.nav-item.is-tab {
- border-bottom: 1px solid transparent;
- border-top: 1px solid transparent;
- }
- .button.is-info {
- border-width: 0;
- color: var(--white);
- }
- strong {
- color: inherit;
- }
- hr {
- background-color: var(--light-grey-2);
- border: none;
- height: 1px;
- }
- p,
- button,
- input,
- select,
- textarea {
- font-family: "Inter", Helvetica, Arial, sans-serif;
- }
- input,
- select,
- textarea {
- outline: none;
- }
- .label {
- display: flex;
- font-weight: 700;
- &:not(:last-child) {
- margin-bottom: 5px;
- }
- }
- #page-title {
- margin-top: 0;
- font-size: 35px;
- text-align: center;
- }
- @media only screen and (min-width: 700px) {
- #page-title {
- margin: 0;
- margin-bottom: 30px;
- font-size: 40px;
- }
- }
- @media screen and (min-width: 980px) {
- .container {
- max-width: 960px;
- margin-left: auto;
- margin-right: auto;
- }
- }
- @media screen and (min-width: 1180px) {
- .container {
- max-width: 1200px;
- }
- }
- .upper-container {
- height: 100%;
- }
- .main-container {
- height: 100%;
- min-height: 100vh;
- display: flex;
- flex-direction: column;
- &.main-container-modal-active {
- height: 100% !important;
- overflow: hidden !important;
- }
- > .container {
- position: relative;
- flex: 1 0 auto;
- margin: 0 auto;
- max-width: 1200px;
- }
- }
- a {
- color: var(--primary-color);
- text-decoration: none;
- cursor: pointer;
- &:hover,
- &:focus {
- filter: brightness(90%);
- }
- }
- table {
- border-collapse: collapse;
- width: 100%;
- thead {
- td {
- border-width: 0 0 2px;
- }
- }
- td {
- border: 1px solid var(--light-grey-2);
- border-width: 0 0 1px;
- padding: 8px 10px;
- }
- tbody {
- tr:last-child {
- td {
- border-bottom-width: 0;
- }
- }
- }
- }
- img {
- max-width: 100%;
- }
- .absolute-a {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
- }
- .alert {
- padding: 20px;
- color: var(--white);
- background-color: var(--dark-red);
- position: fixed;
- top: 50px;
- right: 50px;
- font-size: 2em;
- border-radius: @border-radius;
- z-index: 10000000;
- }
- .night-mode {
- .tippy-box {
- border: 1px solid var(--light-grey-3);
- box-shadow: @box-shadow-dropdown;
- background-color: var(--white);
- .tippy-content {
- color: var(--black);
- }
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"],
- &[data-theme~="stationSettings"] {
- background-color: var(--dark-grey-2);
- border: 0 !important;
- }
- &[data-theme~="songActions"] {
- background-color: var(--dark-grey-2);
- border: 0 !important;
- i,
- a {
- color: var(--white);
- }
- .youtube-icon {
- background-color: var(--white);
- }
- }
- &[data-theme~="dropdown"] {
- background-color: var(--dark-grey-2);
- border: 0 !important;
- .nav-dropdown-items {
- .nav-item {
- background-color: var(--dark-grey);
- &:focus {
- outline-color: var(--dark-grey);
- }
- p {
- color: var(--white);
- }
- }
- }
- }
- &[data-theme~="search"] {
- background-color: var(--dark-grey-2);
- border: 0 !important;
- }
- &[data-theme~="info"] p {
- color: var(--black) !important;
- }
- }
- .tippy-box[data-placement^="top"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"] {
- > .tippy-arrow::before {
- border-top-color: var(--dark-grey-2);
- }
- }
- }
- .tippy-box[data-placement^="bottom"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"],
- &[data-theme~="stationSettings"] {
- > .tippy-arrow::before {
- border-bottom-color: var(--dark-grey-2);
- }
- }
- }
- .tippy-box[data-placement^="left"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"] {
- > .tippy-arrow::before {
- border-left-color: var(--dark-grey-2);
- }
- }
- }
- .tippy-box[data-placement^="right"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"] {
- > .tippy-arrow::before {
- border-right-color: var(--dark-grey-2);
- }
- }
- }
- }
- .tippy-box[data-theme~="info"] {
- font-size: 12px;
- letter-spacing: 1px;
- }
- .tippy-box[data-theme~="quickConfirm"] {
- background-color: var(--dark-red);
- border: 0;
- .tippy-content {
- padding: 0;
- }
- a {
- padding: 15px;
- line-height: 30px;
- color: var(--white);
- border-bottom: 0;
- font-size: 15px;
- font-weight: 600;
- &:hover,
- &:focus {
- filter: brightness(90%);
- }
- }
- }
- .tippy-box[data-theme~="songActions"] {
- font-size: 15px;
- padding: 5px 10px;
- border: 1px solid var(--light-grey-3);
- box-shadow: @box-shadow-dropdown;
- background-color: var(--white);
- .button {
- width: 146px;
- }
- i,
- a {
- display: inline-block;
- cursor: pointer;
- color: var(--dark-grey);
- vertical-align: middle;
- &:hover,
- &:focus {
- filter: brightness(90%);
- }
- &:not(:first) {
- margin-left: 5px;
- }
- }
- .play-icon,
- .added-to-playlist-icon {
- color: var(--green);
- }
- .edit-icon,
- .view-icon,
- .add-to-playlist-icon,
- .add-to-queue-icon {
- color: var(--primary-color);
- }
- .hide-icon {
- color: var(--light-grey-3);
- }
- .stop-icon,
- .delete-icon {
- color: var(--dark-red);
- }
- .report-icon {
- color: var(--yellow);
- }
- }
- .tippy-box[data-placement^="top"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"] {
- > .tippy-arrow::before {
- border-top-color: var(--white);
- }
- }
- &[data-theme~="quickConfirm"] > .tippy-arrow::before {
- border-top-color: var(--dark-red);
- }
- }
- .tippy-box[data-placement^="bottom"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="stationSettings"],
- &[data-theme~="search"] {
- > .tippy-arrow::before {
- border-bottom-color: var(--white);
- }
- }
- &[data-theme~="quickConfirm"] > .tippy-arrow::before {
- border-bottom-color: var(--dark-red);
- }
- }
- .tippy-box[data-placement^="left"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"] {
- > .tippy-arrow::before {
- border-left-color: var(--white);
- }
- }
- &[data-theme~="quickConfirm"] > .tippy-arrow::before {
- border-left-color: var(--dark-red);
- }
- }
- .tippy-box[data-placement^="right"] {
- &[data-theme~="songActions"],
- &[data-theme~="dropdown"],
- &[data-theme~="search"] {
- > .tippy-arrow::before {
- border-right-color: var(--white);
- }
- }
- &[data-theme~="quickConfirm"] > .tippy-arrow::before {
- border-right-color: var(--dark-red);
- }
- }
- .tippy-box[data-theme~="stationSettings"] {
- border: 1px solid var(--light-grey-3);
- box-shadow: @box-shadow-dropdown;
- background-color: var(--white);
- button:not(:last-of-type) {
- margin-bottom: 5px;
- }
- }
- .tippy-box[data-theme~="dropdown"] {
- font-size: 15px;
- padding: 0;
- border: 1px solid var(--light-grey-3);
- box-shadow: @box-shadow-dropdown;
- background-color: var(--white);
- color: var(--dark-grey);
- width: 350px;
- .tippy-content {
- padding: 0;
- }
- .nav-dropdown-items {
- max-height: 220px;
- overflow-y: auto;
- padding: 10px;
- .nav-item {
- width: 100%;
- justify-content: flex-start;
- border: 0;
- padding: 8px 4px;
- font-size: 15.5px;
- min-height: 36px;
- background: var(--light-grey);
- border-radius: @border-radius;
- cursor: pointer;
- .checkbox-control {
- display: flex;
- flex-direction: row;
- align-items: center;
- overflow-wrap: anywhere;
- margin: 0 !important;
- p {
- margin-left: 10px;
- }
- .switch {
- position: relative;
- display: inline-block;
- flex-shrink: 0;
- width: 40px;
- height: 24px;
- }
- .switch input {
- opacity: 0;
- width: 0;
- height: 0;
- }
- .slider {
- width: 100%;
- position: absolute;
- cursor: pointer;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: var(--light-grey-3);
- transition: 0.2s;
- border-radius: 34px;
- &.disabled {
- cursor: not-allowed;
- }
- }
- .slider:before {
- position: absolute;
- content: "";
- height: 16px;
- width: 16px;
- left: 4px;
- bottom: 4px;
- background-color: var(--white);
- transition: 0.2s;
- border-radius: 50%;
- }
- input:checked + .slider {
- background-color: var(--primary-color);
- }
- input:focus + .slider {
- box-shadow: 0 0 1px var(--primary-color);
- }
- input:checked + .slider:before {
- transform: translateX(16px);
- }
- }
- &:focus {
- outline-color: var(--light-grey-3);
- }
- &:not(:last-of-type) {
- margin-bottom: 5px;
- }
- }
- }
- .tippy-content > span {
- display: flex;
- flex-direction: column;
- button.nav-item {
- &:not(:last-of-type) {
- margin-bottom: 10px;
- }
- }
- }
- #create-playlist {
- margin: 10px 10px 10px 10px;
- width: unset;
- }
- }
- .tippy-box[data-theme~="search"] {
- font-size: 15px;
- padding: 0;
- border: 1px solid var(--light-grey-3);
- box-shadow: @box-shadow-dropdown;
- background-color: var(--white);
- color: var(--dark-grey);
- width: 100% !important;
- max-width: 600px !important;
- max-height: calc(100vh - 300px);
- overflow-y: auto;
- .tippy-content {
- padding: 0;
- & > span {
- display: flex;
- flex-direction: column;
- padding: 5px;
- }
- }
- }
- .has-text-centered {
- text-align: center;
- }
- .select {
- position: relative;
- &:after {
- content: " ";
- border: 1.5px solid var(--primary-color);
- border-right: 0;
- border-top: 0;
- height: 7px;
- pointer-events: none;
- position: absolute;
- transform: rotate(-45deg);
- width: 7px;
- margin-top: -6px;
- right: 16px;
- top: 50%;
- }
- select {
- height: 36px;
- background-color: var(--white);
- border: 1px solid var(--light-grey-2);
- color: var(--dark-grey-2);
- appearance: none;
- border-radius: @border-radius;
- font-size: 14px;
- line-height: 24px;
- padding-left: 8px;
- position: relative;
- padding-right: 36px;
- cursor: pointer;
- }
- }
- .checkbox {
- height: 25px;
- width: 25px;
- input[type="checkbox"] {
- height: 25px;
- width: 25px;
- background-color: var(--white);
- border: 1px solid var(--light-grey-2);
- appearance: none;
- border-radius: @border-radius;
- cursor: pointer;
- position: relative;
- &:checked {
- &:before {
- content: "";
- position: absolute;
- top: 4px;
- right: 7px;
- background-color: var(--primary-color);
- width: 4px;
- height: 16px;
- transform: rotate(45deg);
- }
- &:after {
- content: "";
- position: absolute;
- top: 12px;
- left: 2px;
- background-color: var(--primary-color);
- width: 10px;
- height: 4px;
- transform: rotate(45deg);
- }
- }
- }
- }
- .button:focus,
- .button:active {
- border-color: var(--light-grey-2) !important;
- }
- .input:focus,
- .input:active,
- .textarea:focus,
- .textarea:active,
- .select select:focus,
- .select select:active {
- border-color: var(--primary-color) !important;
- }
- button.delete:focus {
- background-color: rgba(10, 10, 10, 0.3);
- }
- .tag {
- padding-right: 6px !important;
- }
- #tab-selection,
- .tab-selection {
- overflow-x: auto;
- .button {
- white-space: nowrap;
- }
- }
- .table {
- background-color: var(--white);
- color: var(--dark-grey);
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
- border-radius: @border-radius;
- thead th {
- padding: 5px 10px;
- text-align: left;
- font-weight: 600;
- color: var(--grey-3);
- }
- tr {
- &:nth-child(even) {
- background-color: #fafafa;
- }
- &:hover,
- &:focus {
- background-color: var(--light-grey);
- }
- }
- }
- .button {
- border: 1px solid var(--light-grey-2);
- background-color: var(--white);
- color: var(--dark-grey-2);
- border-radius: @border-radius;
- line-height: 24px;
- align-items: center;
- display: inline-flex;
- font-size: 14px;
- padding-left: 10px;
- padding-right: 10px;
- justify-content: center;
- cursor: pointer;
- user-select: none;
- white-space: nowrap;
- &:hover,
- &:focus {
- filter: brightness(95%);
- }
- &.is-success {
- background-color: var(--green) !important;
- border-width: 0;
- color: var(--white);
- }
- &.is-primary {
- background-color: var(--primary-color) !important;
- border-width: 0;
- color: var(--white);
- }
- &.is-danger {
- background-color: var(--dark-red) !important;
- border-width: 0;
- color: var(--white);
- }
- &.is-info {
- background-color: var(--primary-color) !important;
- border-width: 0;
- color: var(--white);
- }
- &.is-warning {
- background-color: var(--yellow) !important;
- border-width: 0;
- color: rgba(0, 0, 0, 0.7);
- }
- &.is-dark {
- background-color: var(--dark-grey-2);
- border-width: 0;
- color: var(--light-grey);
- }
- &.is-fullwidth {
- display: flex;
- width: 100%;
- }
- &.disabled {
- filter: grayscale(1);
- cursor: not-allowed;
- }
- }
- .input,
- .textarea {
- width: 100%;
- padding-left: 8px;
- padding-right: 8px;
- line-height: 24px;
- font-size: 14px;
- border-radius: @border-radius;
- box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
- border: 1px solid var(--light-grey-2);
- }
- .input,
- .button {
- height: 36px;
- }
- .textarea {
- display: block;
- line-height: 1.2;
- padding: 10px;
- max-height: 600px;
- min-height: 120px;
- min-width: 100%;
- resize: vertical;
- }
- .icon {
- height: 24px;
- width: 24px;
- line-height: 24px;
- margin-left: 4px;
- margin-right: -2px;
- }
- .fadein-helpbox-enter-active {
- transition-duration: 0.3s;
- transition-timing-function: ease-in;
- }
- .fadein-helpbox-leave-active {
- transition-duration: 0.3s;
- transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
- }
- .fadein-helpbox-enter-to,
- .fadein-helpbox-leave {
- max-height: 100px;
- overflow: hidden;
- }
- .fadein-helpbox-enter,
- .fadein-helpbox-leave-to {
- overflow: hidden;
- max-height: 0;
- }
- .control {
- margin-bottom: 5px !important;
- &.is-grouped {
- display: flex;
- }
- &.is-expanded {
- flex: 1;
- }
- &.has-addons {
- display: flex;
- .button {
- border-radius: 0;
- margin-right: -1px;
- &:first-child {
- border-radius: @border-radius 0 0 @border-radius;
- }
- &:last-child {
- border-radius: 0 @border-radius @border-radius 0;
- padding-left: 10px;
- }
- }
- .input {
- margin-right: -1px;
- &:first-child {
- border-radius: @border-radius 0 0 @border-radius;
- }
- }
- }
- }
- .input-with-button {
- .control {
- margin-right: 0px !important;
- }
- input,
- select {
- width: 100%;
- height: 36px;
- border-radius: @border-radius 0 0 @border-radius;
- border-right: 0;
- border-color: var(--light-grey-3);
- }
- .button {
- height: 36px;
- border-radius: 0 @border-radius @border-radius 0;
- }
- }
- .page-title {
- margin: 0 0 50px 0;
- }
- .material-icons {
- user-select: none;
- -webkit-user-select: none;
- }
- .icon-with-button {
- margin-right: 3px;
- font-size: 18px;
- }
- .verified-song {
- font-size: 17px;
- color: var(--primary-color);
- }
- .section-title,
- h4.section-title {
- font-size: 26px;
- font-weight: 600;
- margin: 0px;
- }
- .section-description {
- font-size: 16px;
- font-weight: 400;
- margin-bottom: 10px !important;
- }
- .section-horizontal-rule {
- margin: 15px 0 30px 0;
- }
- .section-margin-bottom {
- height: 30px;
- }
- .margin-top-zero {
- margin-top: 0 !important;
- }
- .margin-bottom-zero {
- margin-bottom: 0 !important;
- }
- /** Universial items e.g. playlist items, queue items, activity items */
- .item-draggable {
- cursor: move;
- }
- .universal-item {
- display: flex;
- flex-direction: row;
- flex-grow: 1;
- align-items: center;
- justify-content: space-between;
- padding: 7.5px;
- border: 1px solid var(--light-grey-3);
- border-radius: @border-radius;
- overflow: hidden;
- .item-thumbnail {
- width: 65px;
- height: 65px;
- margin: -7.5px;
- border-radius: @border-radius 0 0 @border-radius;
- }
- .item-title {
- font-size: 20px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .item-description {
- font-size: 14px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .universal-item-actions {
- display: flex;
- flex-direction: row;
- margin-left: 10px;
- justify-content: center;
- @media screen and (max-width: 800px) {
- flex-wrap: wrap;
- }
- .action-dropdown-icon {
- display: flex;
- color: var(--primary-color);
- }
- .icons-group {
- display: flex;
- align-items: center;
- a {
- padding: 0;
- }
- }
- .button {
- width: 146px;
- }
- i,
- span {
- cursor: pointer;
- &:not(:first-child) {
- margin-left: 5px;
- }
- }
- .play-icon,
- .added-to-playlist-icon {
- color: var(--green);
- }
- .edit-icon,
- .view-icon,
- .add-to-playlist-icon,
- .add-to-queue-icon {
- color: var(--primary-color);
- }
- .hide-icon {
- color: var(--light-grey-3);
- }
- .stop-icon,
- .delete-icon {
- color: var(--dark-red);
- }
- .report-icon {
- color: var(--yellow);
- }
- }
- }
- .save-button-mixin {
- min-width: 200px;
- &:disabled {
- background-color: var(--light-grey) !important;
- color: var(--black);
- }
- }
- .save-button-transition-enter-active {
- transition: all 0.1s ease;
- }
- .save-button-transition-enter {
- transform: translateX(20px);
- opacity: 0;
- }
- .youtube-icon {
- margin-right: 3px;
- height: 20px;
- width: 20px;
- -webkit-mask: url("/assets/social/youtube.svg") no-repeat center;
- mask: url("/assets/social/youtube.svg") no-repeat center;
- background-color: var(--youtube);
- }
- #forgot-password {
- justify-content: flex-start;
- margin: 5px 0;
- }
- .steps-fade-leave-active {
- display: none;
- }
- .steps-fade-enter-active,
- .steps-fade-leave-active {
- transition: all 0.3s ease;
- }
- .steps-fade-enter-from,
- .steps-fade-leave-to {
- opacity: 0;
- }
- .skip-step {
- background-color: var(--grey-3);
- color: var(--white);
- }
- #steps {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 50px;
- margin-top: 36px;
- @media screen and (max-width: 300px) {
- display: none;
- }
- .step {
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 100%;
- border: 1px solid var(--dark-grey);
- min-width: 50px;
- min-height: 50px;
- background-color: var(--white);
- font-size: 30px;
- user-select: none;
- &.selected {
- background-color: var(--primary-color);
- color: var(--white) !important;
- border: 0;
- }
- }
- .divider {
- display: flex;
- justify-content: center;
- width: 180px;
- height: 1px;
- background-color: var(--dark-grey);
- }
- }
- /* This class is used for content-box in ResetPassword, but not in RemoveAccount. This is because ResetPassword uses transitions and RemoveAccount does not */
- .content-box-wrapper {
- margin-top: 90px;
- width: 100%;
- display: flex;
- align-items: center;
- }
- .content-box {
- border-radius: @border-radius;
- background-color: var(--white);
- border: 1px solid var(--dark-grey);
- max-width: 580px;
- padding: 40px;
- flex: 1;
- @media screen and (max-width: 300px) {
- margin-top: 30px;
- padding: 30px 20px;
- }
- }
- .content-box-optional-helper {
- margin-top: 15px;
- color: var(--primary-color);
- font-size: 16px;
- a {
- color: var(--primary-color);
- }
- }
- .content-box-title {
- font-size: 25px;
- color: var(--black);
- }
- .content-box-description {
- font-size: 14px;
- color: var(--dark-grey);
- }
- .content-box-inputs {
- margin-top: 35px;
- .input-with-button {
- .button {
- width: 105px;
- }
- @media screen and (max-width: 450px) {
- flex-direction: column;
- }
- }
- label {
- font-size: 11px;
- }
- #change-password-button {
- margin-top: 36px;
- width: 175px;
- }
- }
- #password-visibility-container {
- display: flex;
- align-items: center;
- a {
- width: 0;
- margin-left: -30px;
- z-index: 0;
- top: 2px;
- position: relative;
- color: var(--light-grey-1);
- }
- }
- .news-item {
- font-family: "Karla";
- border-radius: @border-radius;
- padding: 20px;
- border: unset !important;
- box-shadow: @box-shadow;
- * {
- font-family: Karla, Arial, sans-serif;
- font-size: 16px;
- }
- h1 {
- font-size: 40px;
- &:first-of-type {
- margin-top: 0;
- }
- }
- h2 {
- font-size: 30px;
- }
- h3 {
- font-size: 25px;
- }
- h4,
- h5,
- h6 {
- font-size: 20px;
- }
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- margin: 10px 0;
- }
- ul {
- list-style: unset;
- }
- li {
- margin-left: 30px;
- }
- blockquote {
- padding: 0px 15px;
- color: var(--grey-2);
- border-left: 0.25em solid var(--light-grey-2);
- }
- code {
- font-style: italic;
- }
- }
- .checkbox-control {
- display: flex;
- flex-direction: row;
- align-items: center;
- p {
- margin-left: 10px;
- }
- .switch {
- position: relative;
- display: inline-block;
- flex-shrink: 0;
- width: 40px;
- height: 24px;
- }
- .switch input {
- opacity: 0;
- width: 0;
- height: 0;
- }
- .slider {
- position: absolute;
- cursor: pointer;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: var(--light-grey-3);
- transition: 0.2s;
- border-radius: 34px;
- }
- .slider:before {
- position: absolute;
- content: "";
- height: 16px;
- width: 16px;
- left: 4px;
- bottom: 4px;
- background-color: var(--white);
- transition: 0.2s;
- border-radius: 50%;
- }
- input:checked + .slider {
- background-color: var(--primary-color);
- }
- input:focus + .slider {
- box-shadow: 0 0 1px var(--primary-color);
- }
- input:checked + .slider:before {
- transform: translateX(16px);
- }
- }
- html {
- &,
- * {
- scrollbar-color: var(--primary-color) transparent;
- scrollbar-width: thin;
- }
- &.night-mode {
- &,
- * {
- scrollbar-color: var(--light-grey) transparent !important;
- }
- &::-webkit-scrollbar-thumb,
- ::-webkit-scrollbar-thumb {
- background-color: var(--light-grey);
- }
- ::-webkit-scrollbar-track {
- background-color: var(--dark-grey-3);
- }
- }
- div {
- ::-webkit-scrollbar-track {
- background-color: transparent !important;
- }
- }
- }
- ::-webkit-scrollbar {
- height: 10px;
- width: 10px;
- }
- ::-webkit-scrollbar-track {
- background-color: var(--light-grey-2);
- }
- ::-webkit-scrollbar-thumb {
- background-color: var(--primary-color);
- }
- ::-webkit-scrollbar-corner {
- background-color: transparent;
- }
- :disabled,
- .disabled {
- cursor: not-allowed;
- }
- .pill {
- background-color: var(--light-grey);
- color: var(--primary-color);
- padding: 5px 10px;
- border-radius: @border-radius;
- font-size: 14px;
- font-weight: 600;
- white-space: nowrap;
- margin-top: 5px;
- box-shadow: @box-shadow;
- transition: all 0.2s ease-in-out;
- &:hover,
- &:focus {
- filter: brightness(95%);
- }
- &:not(:last-of-type) {
- margin-right: 5px;
- }
- }
- </style>
|