diff --git a/renderer/css/global.css b/renderer/css/global.css deleted file mode 100644 index bd86f4c..0000000 --- a/renderer/css/global.css +++ /dev/null @@ -1,341 +0,0 @@ -/** @format */ - -:root { - --main-bg: #0a1827; - --accent-solid: #e82a5f; - --accent-translucent-1: rgb(232 42 95 / 40%); - --jf-purple-light: #aa5cc3; - --jf-purple-dark: #3e2247; - --jf-blue-light: #00a4dc; - --jf-blue-dark: #003c50; - --warning-yellow: #f18e06; - --warning-bg: rgba(220, 128, 1, 0.16); - --error-red: #a94442; - --error-red-darker-1: #8b2e2e; - --error-red-bg: #240e0ea0; - --yes-green: #18be12; - --yes-green-darker-1: #15a010; - --main-brd-clr: rgb(255 255 255/ 0.1); - --rounding: 10px; - --rounding-1: 5px; - --transition-time-fast-2: 100ms; - --transition-time-fast-1: 150ms; - --transition-time-default: 250ms; - --transition-time-slow-1: 350ms; - --transition-time-slow-2: 550ms; -} - -*, -*::before, -*::after { - box-sizing: border-box; -} - -body, -html { - margin: 0 !important; - padding: 0 !important; - font-family: "Montserrat", sans-serif; - color: white; - background: var(--main-bg); -} - -.input { - position: relative; - font-size: calc(60vw / 20); - width: 100%; -} - -.ripple__cont { - width: 100%; - height: 100%; - overflow: hidden; -} - -main, -.main__page { - position: fixed; - inset: 0; - contain: strict; - width: 100vw; - height: 100vh; - z-index: 1; - overflow: hidden; -} - -.main__page { - display: flex; - align-items: center; -} - -span.mdc-notched-outline__notch { - border-top: none; - position: relative; - border-bottom-width: 0.1px; -} - -span.mdc-notched-outline__notch::before { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 0.1px; - background: var(--border-clr) !important; - transition: transform var(--transition-time-default); - transform-origin: right; - transform: scaleX(1); -} - -.mdc-notched-outline--notched .mdc-notched-outline__notch::before { - height: 2px; - background: white !important; - transform: scaleX(0); -} - -.mdc-floating-label { - transition-duration: var(--transition-time-default) !important; -} - -@-webkit-keyframes btn_click { - 0% { - transform: scale(1); - opacity: 0; - } - 100% { - transform: scale(5); - opacity: 1; - } -} - -@keyframes btn_click { - 0% { - transform: scale(1); - opacity: 0; - } - 100% { - transform: scale(1.5); - opacity: 1; - } -} - -/*Animations*/ -@-webkit-keyframes fadeIn { - 0% { - opacity: 0; - margin-bottom: -150px; - } - 100% { - opactiy: 1; - margin-bottom: 0; - } -} - -@keyframes fadeIn { - 0% { - opacity: 0; - margin-bottom: -150px; - } - 100% { - opactiy: 1; - margin-bottom: 0; - } -} - -@-webkit-keyframes fadeOut { - 0% { - display: block; - opacity: 1; - inset: 0 0 0 0; - } - 99% { - display: block; - opacity: 0; - inset: 150px 0 0 0; - } - 100% { - display: none; - opacity: 0; - } -} - -@keyframes fadeOut { - 0% { - display: block; - opacity: 1; - inset: 0 0 0 0; - } - 99% { - display: block; - opacity: 0; - inset: 150px 0 0 0; - } - 100% { - display: none; - opacity: 0; - } -} - -@-webkit-keyframes fadeInOpac { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} - -@keyframes fadeInOpac { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} - -@-webkit-keyframes fadeOutOpac { - 0% { - display: block; - opacity: 1; - } - 99% { - display: block; - opacity: 0; - } - 100% { - display: none; - opacity: 0; - } -} - -@keyframes fadeOutOpac { - 0% { - display: block; - opacity: 1; - } - 99% { - display: block; - opacity: 0; - } - 100% { - display: none; - opacity: 0; - } -} - -@-webkit-keyframes comeIn { - 0% { - bottom: -100%; - } - 100% { - bottom: 20px; - } -} - -@keyframes comeIn { - 0% { - bottom: -100%; - } - 100% { - bottom: 20px; - } -} - -@-webkit-keyframes goOut { - 0% { - bottom: 20px; - } - 100% { - bottom: -100%; - } -} - -@keyframes goOut { - 0% { - bottom: 20px; - } - 100% { - bottom: -100%; - } -} - -@-webkit-keyframes load { - 0% { - transform: scaleX(0); - } - 100% { - transform: scaleX(1); - } -} - -@keyframes load { - 0% { - transform: scaleX(0); - } - 100% { - transform: scaleX(1); - } -} - -@-webkit-keyframes moveFadeOut { - 0% { - inset: 0; - opacity: 1; - } - 100% { - inset: 0 0 0 -100px; - opacity: 0; - } -} - -@keyframes moveFadeOut { - 0% { - inset: 0; - opacity: 1; - } - 100% { - inset: 0 0 0 -100px; - opacity: 0; - } -} - -@-webkit-keyframes moveFadeIn { - 0% { - inset: 0 0 0 100px; - opacity: 0; - } - 100% { - inset: 0; - opacity: 1; - } -} - -@keyframes moveFadeIn { - 0% { - inset: 0 0 0 100px; - opacity: 0; - } - 100% { - inset: 0; - opacity: 1; - } -} - -@-webkit-keyframes skeletonLoader { - 0% { - left: -5em; - } - 100% { - left: calc(100% + 5em); - } -} - -@keyframes skeletonLoader { - 0% { - left: -5em; - } - 100% { - left: calc(100% + 5em); - } -} diff --git a/renderer/css/login.css b/renderer/css/login.css deleted file mode 100644 index 990b258..0000000 --- a/renderer/css/login.css +++ /dev/null @@ -1,652 +0,0 @@ -/** @format */ - -::-webkit-scrollbar { - height: 10px; -} - -::-webkit-scrollbar-thumb { - background: rgb(255 255 255 / 0.5); - border-radius: 10px; -} - -::-webkit-scrollbar-thumb:hover { - background: rgb(255 255 255/1); -} - -#background { - width: 100vw; - height: 100vh; - position: fixed; - top: 0; - left: 0; - z-index: -1; - opacity: 0.8; -} - -.login { - --mdc-theme--primary: white !important; - --mdc-theme--primary-bg: var(--main-bg) !important; -} - -.login .mdc-button { - font-family: "Montserrat" !important; - background-color: rgb(255 255 255 / 0.3) !important; - border: 2px solid white !important; - overflow: hidden; -} -.login .mdc-button__ripple > * { - background-color: rgb(0 0 0 / 0.3) !important; -} - -.login .mdc-text-field--outlined { - font-family: "Montserrat" !important; -} - -.login .mdc-text-field--outlined { - --border-clr: rgb(255 255 255 / 0.4); -} -.login .mdc-text-field--outlined:hover { - --border-clr: rgb(255 255 255 / 0.8); -} - -.login .mdc-text-field--outlined .mdc-notched-outline__leading { - transition: background var(--transition-time-default); -} - -.login - .mdc-text-field--outlined:not(.mdc-text-field--disabled) - .mdc-notched-outline__leading, -.login - .mdc-text-field--outlined:not(.mdc-text-field--disabled) - .mdc-notched-outline__notch, -.login - .mdc-text-field--outlined:not(.mdc-text-field--disabled) - .mdc-notched-outline__trailing { - border-color: var(--border-clr) !important; -} - -.login - .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused - .mdc-notched-outline__leading, -.login - .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused - .mdc-notched-outline__notch, -.login - .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused - .mdc-notched-outline__trailing { - border-color: rgb(255, 255, 255) !important; -} - -.login .mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label { - color: rgb(255 255 255 / 0.6); - font-family: "Montserrat" !important; -} -.login - .mdc-text-field--focused:not(.mdc-text-field--disabled) - .mdc-floating-label { - color: white !important; -} - -.login .mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input { - color: rgb(255 255 255 / 0.87); - caret-color: white; - font-family: "Montserrat" !important; -} - -.mdc-form-field > label { - font-family: "Montserrat" !important; -} - -.login - .mdc-checkbox - .mdc-checkbox__native-control:enabled:checked - ~ .mdc-checkbox__background, -.login - .mdc-checkbox - .mdc-checkbox__native-control:enabled:indeterminate - ~ .mdc-checkbox__background, -.login - .mdc-checkbox - .mdc-checkbox__native-control[data-indeterminate="true"]:enabled - ~ .mdc-checkbox__background { - border-color: transparent !important; -} - -.login .mdc-checkbox { - --mdc-ripple-color: white; - --mdc-checkbox-unchecked-color: white; - --mdc-checkbox-checked-color: rgb(255 255 255 / 0.3) !important; -} - -.login .mdc-form-field { - --mdc-theme-text-primary-on-background: rgb(255 255 255 / 0.87); -} - -.login .mdc-text-field__icon::before { - font-size: 26px; - color: var(--border-clr); -} - -#background { - background: transparent; - position: fixed; - z-index: 0; - width: 100vw; - height: 100vh; -} - -#background > * { - width: inherit; - height: inherit; - position: absolute; - opacity: 0; - transition: opacity var(--transition-time-slow-2); -} - -#background .purple { - background: linear-gradient(140deg, var(--jf-purple-light), transparent); -} - -#background .blue { - background: linear-gradient(140deg, transparent, var(--jf-blue-light)); - z-index: -2; -} - -#background .purple.active, -#background .blue.active { - opacity: 1; -} - -.page { - position: static; - width: 100vw; - height: 100vh; - display: flex; - justify-content: center; - align-items: center; - flex-grow: 1; - flex-shrink: 0; - flex-basis: 100vw; - overflow: hidden; - flex-flow: column; - gap: 10px; -} - -.page > button { - width: 60vw; - max-width: 32em; -} - -.page.manual__login { - position: relative; -} - -.server__cont, -.user__cont, -.manual__input { - position: static; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - max-width: 30em; -} - -.logo { - width: 120%; -} - -.logo img { - width: 100%; -} - -.manual__input { - width: 60vw; - display: flex; - flex-flow: column; - align-items: stretch; - justify-content: center; -} - -.server__cont { - display: flex; - flex-flow: column; - grid-gap: 3em; - align-items: center; -} - -button.clicky { - position: relative; - overflow: visible; -} - -button.clicky::after { - content: ""; - box-shadow: 0 0 15px 40px var(--clr); - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - border-radius: 100px; - opacity: 0; - transition: all var(--transition-time-slow-1); -} - -button.clicky:active::after { - box-shadow: 0 0 0 0 white; - opacity: 0.5; - transition: 0s; -} - -.input__label { - position: absolute; - top: 50%; - left: 0; - transform: translateY(-50%); - font-size: min(1em, 25px); - transition: font-size var(--transition-time-default), - transform var(--transition-time-default); -} - -input:focus + .input__label, -.input__label.inputLabelActive { - transform: translateY(calc(-100% - 0.85em)); - font-size: min(0.75em, 15px); -} - -.form__cont { - display: flex; - flex-flow: column; - grid-gap: 1em; -} - -.hide { - display: none !important; - visibility: hidden !important; -} - -.info { - font-family: "IBM Plex Mono", monospace; - opacity: 0.65; - display: flex; - justify-content: center; - align-items: center; - grid-gap: 10px; - font-size: calc(60vw / 20); -} - -.info span { - color: var(--warning-yellow); - font-size: min(1.5em, 30px); - height: -webkit-fit-content; - height: -moz-fit-content; - height: fit-content; -} - -.info div { - font-size: min(0.65em, 15px); - text-align: left; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; -} - -.alert { - position: absolute; - box-sizing: content-box; - width: 50vw; - max-width: 20em; - display: flex; - left: 20px; - background: var(--background); - color: white; - border-radius: var(--rounding); - font-weight: 600; - justify-content: center; - align-items: center; - box-shadow: 0 0 30px rgb(0 0 0 / 0.5); - overflow: hidden; - -webkit-animation: comeIn var(--transition-time-default) forwards; - animation: comeIn var(--transition-time-default) forwards; -} - -.alert .icon { - font-size: 2.5em; - background: var(--color); - height: 100%; - flex-shrink: 0; - flex-grow: 1; - padding: 15px; -} - -.alert .msg { - padding: 0 15px; -} - -.warning { - --background: var(--warning-bg); - --color: var(--warning-yellow); -} - -.alert.error { - --background: var(--main-bg); - --color: var(--error-red); -} - -.dialog__cont { - position: absolute; - left: 0; - top: 0; - display: flex; - flex-wrap: nowrap; - align-content: center; - justify-content: center; - align-items: center; - width: 100vw; - height: 100vh; - z-index: 5; -} - -.dialog { - background: var(--main-bg); - z-index: 5; - height: -webkit-fit-content; - height: -moz-fit-content; - height: fit-content; - box-sizing: content-box; - padding: 20px; - color: black; - border-radius: var(--rounding); - box-shadow: 0 10px 35px rgba(5, 5, 5, 0.7); - max-width: 20em; -} - -.dialog .icon { - color: var(--color); - border-left: 5px solid; - padding: 0 0 0 15px; - font-size: 3em; - margin-left: -20px; -} - -.dialog.error { - --color: var(--error-red); -} - -.dialog.warning { - --color: var(--warning-yellow); -} - -.dialog .title { - font-size: 2em; - font-weight: 600; - color: rgb(255 255 255 / 90%); -} - -.dialog .msg { - font-size: 1.25em; - font-weight: 400; - color: rgb(255 255 255 / 65%); - margin: 0.5em 0; -} - -.buttons { - display: flex; - gap: 10px; -} - -.dialog__close { - position: absolute; - width: 100vw; - height: 100vh; - background: rgba(5, 5, 5, 0.5); - z-index: 0; -} - -.error.active, -.dialog.active, -.warning.active { - -webkit-animation: fadeIn var(--transition-time-fast-2); - animation: fadeIn var(--transition-time-fast-2); - display: block; - visibility: visible; -} - -.dialog__cont.fadeOut { - -webkit-animation: fadeOut var(--transition-time-fast-2) forwards; - animation: fadeOut var(--transition-time-fast-2) forwards; -} - -.dialog__close.fadeOut { - -webkit-animation: fadeOutOpac var(--transition-time-fast-2) forwards; - animation: fadeOutOpac var(--transition-time-fast-2) forwards; -} - -.dialog__close.active { - -webkit-animation: fadeInOpac var(--transition-time-fast-2) forwards; - animation: fadeInOpac var(--transition-time-fast-2) forwards; -} - -.alert.goOut { - -webkit-animation: goOut var(--transition-time-default) forwards; - animation: goOut var(--transition-time-default) forwards; -} - -.alert .load { - position: absolute; - bottom: 0; - height: 5px; - background: white; - width: 100%; - transform: scaleX(0); - -webkit-animation: load 3s forwards; - animation: load 3s forwards linear; - transform-origin: left; -} - -.loader { - position: fixed; - overflow: visible; - width: 100vw; - height: 100vh; - display: flex; - justify-content: center; - align-items: center; - z-index: 20; -} - -.loader::before { - content: ""; - position: fixed; - background: rgba(0, 0, 0, 0.5); - top: 0; - left: 0; - width: 100vw; - height: 100vh; - z-index: 0; - transition: var(--transition-time-slow-1); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); -} - -.loader svg { - z-index: 1; -} - -section.user__cont { - display: flex; - justify-content: space-between; - overflow: auto hidden; - z-index: 2; -} - -.user__card { - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - overflow: hidden; - flex-shrink: 0; - padding: 1em; -} - -.user__card .content { - display: flex; - flex-shrink: 0; - justify-content: center; - align-items: center; - flex-flow: column; - padding: 0 !important; -} - -.user__card h1 { - margin: 0.5em 0; -} - -.user__svg, -.user__img { - width: 10em; - -o-object-fit: cover; - object-fit: cover; - height: 10em; - border-radius: var(--rounding); - background: white; - mix-blend-mode: multiply; - box-shadow: 0 0 20px #00000057; -} - -.user__svg { - padding: 1em; -} - -.user { - display: flex; - flex-flow: column; - grid-gap: 2em; - justify-content: center; - align-items: stretch; -} - -.user__info { - width: 100%; - display: flex; - flex-flow: column; - justify-content: center; - align-items: center; - grid-gap: 10px; -} - -.title__name { - -webkit-filter: drop-shadow(0 0 8px #00000057); - filter: drop-shadow(0 0 8px #00000057); - text-align: center; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - font-weight: 500; - padding: 0; - margin: 0; - font-size: min(calc(100vw / 15), 10em); - position: relative; - margin-bottom: 0.5em; - align-self: center; -} - -.title__name::after { - content: ""; - width: 70%; - height: 2px; - position: absolute; - bottom: -2px; - left: 50%; - transform: translateX(-50%); - background: white; -} - -.user__info .title__name::after, -.manual__login .title__name::after { - all: unset; -} - -.user__info .title__name { - margin-bottom: 0; -} - -.user__info .user__img, -.user__info .user__svg { - border-radius: 100%; -} - -.input.checkbox { - display: flex; - flex-flow: row; - justify-content: flex-start; - grid-gap: 10px; - align-items: center; -} - -.checkbox label { - font-size: min(0.6em, calc(100vw / 25)); -} - -.tick { - display: block; - width: 0.6em; - border-radius: var(--rounding-1); - border: 1.5px solid white; -} - -.tick path { - stroke: white; - stroke-dasharray: 100%; - stroke-dashoffset: -100%; - transition: stroke-dashoffset var(--transition-time-fast-2); -} - -input[type="checkbox"]:checked + .tick > path { - stroke-dashoffset: 0%; -} - -.remember__user { - position: absolute; - height: 100%; - width: 100%; - inset: 0; - padding: 0; - margin: 0; -} - -.manual__form { - display: flex; - flex-flow: column; - gap: 20px; - row-gap: 20px; - -moz-column-gap: 20px; - column-gap: 20px; - align-items: stretch; -} - -.back { - position: absolute; - top: 0; - left: 0; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - z-index: 1; - padding: 0.3em 0.5em; - font-size: 1.5em; - background: rgb(20 20 20 / 0.5); - border-radius: 0 0 5px 0; - transition: background var(--transition-time-fast-1); -} - -.back:hover { - background: rgb(20 20 20 / 0.7); -} -/*Scaling for other display*/ - -@media (min-width: 800px) { - .title__name { - font-size: 2.7em; - } -} diff --git a/renderer/css/main.css b/renderer/css/main.css deleted file mode 100644 index 4eda3dc..0000000 --- a/renderer/css/main.css +++ /dev/null @@ -1,548 +0,0 @@ -/** @format */ - -.library__page::-webkit-scrollbar { - width: 5px; -} - -.library__page::-webkit-scrollbar-thumb { - border-radius: 0; -} - -.moveFadeOut { - -webkit-animation: moveFadeOut var(--transition-time-slow-2) forwards; - animation: moveFadeOut var(--transition-time-slow-2) forwards; -} -.moveFadeIn { - -webkit-animation: moveFadeIn var(--transition-time-slow-2) forwards; - animation: moveFadeIn var(--transition-time-slow-2) forwards; -} -.main { - opacity: 0; - right: -300px; -} -.main.active { - opacity: 1; - right: 0; -} - -.menu.side__menu { - width: 40vw; - height: 100vh; - max-width: 20em; - overflow: auto; - display: flex; - flex-wrap: nowrap; - flex-direction: column; - align-items: center; - justify-content: flex-start; - border-right: 1px solid var(--main-brd-clr); - position: relative; -} - -.user__menu { - width: 100%; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-items: center; - justify-content: center; - font-weight: 200; - font-size: 1.9rem; - gap: 0.5em; - padding: 2em 1em; - border-bottom: 1px solid var(--main-brd-clr); - position: relative; -} - -.user__menu .image { - width: 15vh; - border-radius: 100%; - overflow: hidden; - aspect-ratio: 1/1; -} - -img { - -o-object-fit: cover; - object-fit: cover; - -o-object-position: center; - object-position: center; -} - -.user__menu .image > img { - width: 100%; - aspect-ratio: 1/1; -} - -.submenu { - width: 100%; - padding: 0 1em; - position: relative; - overflow-x: hidden; - height: 100%; -} - -.menu__button { - font-size: 1.3rem; - padding: 0.5em; - position: relative; - display: flex; - gap: 0.5em; - transition: gap var(--transition-time-fast-1); -} - -.menu__button:hover { - gap: 0.7em; -} - -.main__animated__page { - width: 100%; - height: 100vh; - position: relative; - background: linear-gradient(45deg, var(--main-bg), var(--jf-blue-dark)); - display: flex; - flex-direction: column; - flex-wrap: nowrap; - justify-content: flex-start; - align-items: center; - z-index: 1; - flex-grow: 0; - flex-shrink: 1; - overflow: hidden; -} - -.main__animated__page > * { - height: 100vh; - width: 100%; - overflow-y: scroll; - overflow-x: hidden; -} - -.latestMediaSlider { - width: 100%; - position: relative; - overflow: visible; - aspect-ratio: 16/9; - z-index: -1; -} - -.slide { - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - z-index: 0; - opacity: 0; - transition: opacity var(--transition-time-default); -} - -.slide .info__cont { - left: -5em; - transition: left var(--transition-time-default); -} - -.slide.active .info__cont { - left: 2em; -} - -.slide.active ~ .slide > .info__cont { - left: 9em; -} - -.slide.active { - display: block; - z-index: 10; - opacity: 1; -} - -.slide__background { - width: 100%; - height: 100vh; - position: absolute; - z-index: -1; - right: 0; - -webkit-mask-composite: destination-in; - background-size: cover !important; - opacity: 0; - transition: opacity var(--transition-time-default); - -webkit-mask-image: linear-gradient(to top, transparent, black 75%); -} - -.slide__background::after { - content: ""; - position: absolute; - inset: 0; - background: linear-gradient(to right, rgb(0 0 0 / 0.5) 50%, transparent); -} - -.slide.active .slide__background { - opacity: 1; -} - -canvas.placeholder { - opacity: 1; - transition: opacity var(--transition-time-default); - position: absolute; - top: 0; - right: 0; - z-index: 2; - width: 100%; - height: 100%; -} - -.slide img { - position: absolute; - top: 0; - right: 0; - width: 100%; - height: 100%; -} - -.info__cont { - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-items: flex-start; - justify-content: center; - align-content: center; - width: 70%; - height: 100%; - position: absolute; - top: 50%; - transform: translateY(-50%); - left: 2em; -} - -.title { - width: 100%; - font-size: 2.9em; - font-weight: 500; - overflow: hidden; - max-height: 40%; - text-overflow: ellipsis; -} - -.title div { - width: 100%; - height: -webkit-fit-content; - height: -moz-fit-content; - height: fit-content; - position: static; - background-size: contain !important; - background-position: left !important; - background-repeat: no-repeat !important; -} - -.title div span { - display: inline-block; - vertical-align: middle; - line-height: normal; -} - -.logo div { - position: absolute; - height: 100%; -} - -.title.logo { - height: 40%; - position: relative; -} - -.overview { - width: 100%; - display: flex; - gap: 1em; - font-size: 0.9em; - font-weight: 600; -} - -.overview div { - display: flex; - gap: 0.2em; -} - -button.filled { - --clr: var(--accent-solid); - background: var(--accent-solid); - color: white; - border: 2px solid var(--clr); -} - -button.outlined { - --clr: white; - background: transparent; - color: white; - border: 2px solid var(--clr); -} - -.main .buttons { - width: 100%; - margin-top: 1em; -} - -.info__cont button { - max-width: 15em; - padding: 0; -} - -.info__cont button span { - font-size: 1.5em; -} - -.icon__image { - width: 100%; - height: 100%; - font-size: 30vw; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - justify-content: center; - align-items: center; - color: black; -} - -.track__cont { - position: absolute; - bottom: 1em; - left: 2em; - right: 2em; - height: 1em; - display: flex; - gap: 0.5em; - align-items: center; -} - -.track { - height: 5px; - width: 100%; - background: var(--main-brd-clr); - border-radius: var(--rounding-1); - transition: background var(--transition-time-default), - height var(--transition-time-default); - z-index: 30; -} -.track.active { - background: white; -} - -.track:hover { - height: 10px; - background: rgb(255 255 255 / 0.5); -} - -.skeleton__loader { - height: 100%; - width: 100%; - position: absolute; - background: var(--main-bg); - z-index: 100; - overflow: hidden; -} - -.skeleton__loader::after { - content: ""; - height: 100%; - width: 5em; - background: linear-gradient( - to right, - transparent, - rgb(255 255 255 / 0.2), - transparent - ); - position: absolute; - -webkit-animation: skeletonLoader 1.5s infinite; - animation: skeletonLoader 1.5s infinite; -} - -.primary__image { - width: 100%; -} - -.primay__image img { - width: 0; -} - -.card { - height: -webkit-fit-content; - height: -moz-fit-content; - height: fit-content; - flex-shrink: 0; - border-radius: var(--rounding); - display: block; - padding: 0 1em 0 0; -} - -.image__cont { - position: relative; - width: 100%; - flex: 0 0 100%; - border-radius: var(--rounding); - overflow: hidden; - box-shadow: 0px 0px 15px rgb(0 0 0 /0.3); -} - -.image__cont > * { - position: absolute; - inset: 0; - width: 100%; - height: 100%; -} - -.image__cont object { - width: 100%; - height: 100%; -} - -.primary__image img { - width: 100%; - height: 100%; - aspect-ratio: 0.777; -} - -.image__cont .icon__image { - padding: 0.07em; - border-radius: inherit; - border: 2px solid var(--main-brd-clr); -} - -.card__text { - font-weight: 300; - color: white; - text-align: center !important; - white-space: nowrap; - width: 100%; - overflow: hidden; - text-overflow: ellipsis; -} - -.content .grid { - display: flex; - flex-wrap: nowrap; - gap: 0; - justify-content: flex-start; -} - -.content { - padding: 0 2em; -} - -.content h2 { - font-size: 2em; - font-weight: 300; - display: flex; - align-items: center; - gap: 0.5em; - margin: 0; -} - -.content h2::before { - content: ""; - width: 1em; - height: 2px; - display: block; - background: white; -} - -.card .icon__image span { - font-size: 0.2em; - color: var(--accent-solid); -} - -.primary .image__cont { - height: auto; - width: 100%; - aspect-ratio: 0.66667; -} - -.primary .card__text { - font-size: 1em; - white-space: nowrap; - text-overflow: ellipsis; - width: 100%; - overflow: hidden; - padding: 0 0.2em; -} - -.card__text__cont { - width: 100%; - text-align: center; -} - -.card__text.secondary { - font-size: 0.9em; - opacity: 0.7; - font-weight: 300; -} - -.thumb .image__cont { - aspect-ratio: 1.777; -} - -.square .image__cont { - aspect-ratio: 1; -} -.content__header { - display: flex; - justify-content: space-between; - width: 100%; -} - -.content__header .buttons { - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - margin: 0 !important; -} - -.content__header button { - aspect-ratio: 1/1; - height: auto; - font-size: xx-large; - color: white !important; - --mdc-text-button-hover-state-layer-color: white; -} - -.content__header .mdc-button__ripple { - border-radius: 100% !important; -} - -.mdc-button:disabled { - opacity: 0; -} - -.sub { - margin-top: 1em; -} - -.menu__button.active { - font-size: 1.5rem; -} - -.menu__button .mdi { - background: linear-gradient( - 45deg, - var(--jf-blue-light), - var(--jf-purple-light) 80% - ); - -webkit-background-clip: text; - background-clip: text; - transition: color var(--transition-time-fast-1); -} - -.menu__button.active .mdi { - color: transparent; -} - -.vertical__tab__highlighter { - width: 2.5px; - position: fixed; - background: linear-gradient( - 45deg, - var(--jf-blue-light), - var(--jf-purple-light) - ); - border-radius: var(--rounding); - left: 15px; - transition: top var(--transition-time-fast-1) ease-in-out; -} diff --git a/renderer/html/main.html b/renderer/html/main.html deleted file mode 100644 index b88a82f..0000000 --- a/renderer/html/main.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - JellyPlayer - - - - - - - - - - - - -
-
-
-
-
-
- - - - - - - - - - - -
-
-
-
- -
-
- - - - - Server Address - - - -
- -
- -
- Enter your Jellyfin server address above
- Example: https://jellyfin.mydomain.com or http://192.168.25.35:8096 -
-
-
-
-
-
-

Users

-
- - -
- -
- - - -
- - \ No newline at end of file diff --git a/renderer/js/login.js b/renderer/js/login.js deleted file mode 100644 index fd65906..0000000 --- a/renderer/js/login.js +++ /dev/null @@ -1,462 +0,0 @@ -const serverForm = document.querySelector('.server__cont'); -const serverUrl = document.querySelector('.server__url'); -const saveBtn = document.querySelector('.save__server'); -const user__cont = document.querySelector('.users'); -let html; -var server; - - -function generateUUID() { // Public Domain/MIT - var d = new Date().getTime();//Timestamp - var d2 = ((typeof performance !== 'undefined') && performance.now && (performance.now()*1000)) || 0;//Time in microseconds since page-load or 0 if unsupported - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random() * 16;//random number between 0 and 16 - if(d > 0){//Use timestamp until depleted - r = (d + r)%16 | 0; - d = Math.floor(d/16); - } else {//Use microseconds since page-load if supported - r = (d2 + r)%16 | 0; - d2 = Math.floor(d2/16); - } - return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); - }); -} - -window.onload = () => { - new QWebChannel(qt.webChannelTransport, async (channel) => { - window.backend = await channel.objects.backend; - window.getServer = async () => { - await window.backend.getValuesFromDatabaseStr("server", (data) => { - window.server = data; - console.log(`Server:${data}`); - emitter.emit('server-url', data); - return data; - }); - }; - window.setAuthInfoDatabase = async (userName, Pw) => { - await window.backend.setAuthInfoDatabase(userName, Pw); - }; - window.getAuthinfo = async () => { - await window.backend.getAuthinfo(async (data) => { - console.log(data); - window.getServer(); - emitter.on('server-url', (server) => { - emitter.emit("user-saved", [data[0], data[1], server]); - }); - }); - }; - - emitter.on("send-jf-server-info", (server) => { - window.backend.saveServer(server, (dat) => { - console.log(`Is Jf Server = ${dat}`); - if (dat == true) { - emitter.emit('is-jf-server'); - } else if (dat == false) { - emitter.emit('not-jf-server'); - } - }); - }); - - window.serverOnline = await window.backend.onStartup(); - console.log(window.serverOnline); - if (window.serverOnline == "serverGoTrue") { - emitter.emit("serverGo-true"); - } else if (window.serverOnline == "serverGoFalse") { - emitter.emit("serverGo-false"); - } else if(window.serverOnline == "openHomeTrue") { - window.getAuthinfo(); - } else if (window.serverOnline == "serverOffline") { - emitter.emit("server-url", "offline"); - } - - }); - emitter.on("get-server", async () => { - window.getServer(); - }); - document.querySelector(".loader").classList.add("hide"); -}; - -const base_token = `MediaBrowser Client="JellyPlayer", Device="${window.navigator.userAgent}", DeviceId="${generateUUID()}", Version="1.0.0"`; - -const vanilla_token = `${base_token}, Token=""`; - -const createUserList = async (server) => { - document.querySelector('.loader').classList.remove('hide'); - let users = await window.userApi.getPublicUsers(); - let userlist = users.data; - if (userlist.length != 0) { - for (let user of userlist) { - if (user.PrimaryImageTag) { - html = `
-
- -

${user.Name}

-
-
`; - } - else if (!user.PrimaryImageTag) { - html = `
-
- -

${user.Name}

-
-
`; - } - document.querySelector('.user__cont').insertAdjacentHTML('beforeend', html); - } - document.querySelector('.users').classList.remove('hide'); - document.querySelector('.users').scrollIntoView({ behavior: "smooth" }); - document.querySelector('.loader').classList.add('hide'); - setTimeout(() => { - document.querySelector('.server').classList.add('hide'); - }, 1000); - }else if (userlist.length == 0) { - document.querySelector('.loader').classList.add('hide'); - createManualLogin(false); - setTimeout(() => { - document.querySelector('.server').classList.add('hide'); - }, 1000); - } -}; - -const closeDialog = () => { - document.querySelector('.dialog__cont').classList.remove('active'); - document.querySelector('.dialog__close').classList.remove('active'); - document.querySelector('.dialog__cont').classList.add('fadeOut'); - document.querySelector('.dialog__close').classList.add('fadeOut'); - setTimeout(() => { - document.querySelector('.dialog__cont').classList.remove('fadeOut'); - document.querySelector('.dialog__close').classList.remove('fadeOut'); - document.querySelector('.dialog__cont').remove(); - }, 305); -}; - -const createAlert = (type, msg, page) => { - html = `
-
- -
-
- ${msg} -
-
-
`; - document.querySelector(page).insertAdjacentHTML('beforeend', html); - setTimeout(() => { - document.querySelector('.alert').classList.add('goOut'); - setTimeout(() => { - document.querySelector('.alert').remove(); - }, 1000); - }, 3005); -}; - -const createDialog = (title, msg, btn, type, page, exitBg) => { - html = `
-
-
- -
-
- ${title} -
-
- ${msg} -
-
-
-
`; - document.querySelector(page).insertAdjacentHTML('beforeend', html); - if (btn == "yes__no") { - html = `
- - -
`; - document.querySelector('.dialog').insertAdjacentHTML('beforeend', html); - } else if (btn == "remove__server") { - html = `
- - -
`; - document.querySelector('.dialog').insertAdjacentHTML('beforeend', html); - } - document.querySelectorAll(".mdc-button").forEach(button => { - mdc.ripple.MDCRipple.attachTo(button); - }); - document.querySelector('.dialog').classList.add('active'); - document.querySelector('.dialog__close').classList.add('active'); - if (!exitBg) { - document.querySelector('.dialog__close').addEventListener('click', () => { - closeDialog(); - }); - } - document.querySelector('.loader').classList.add('hide'); -}; - -const sendClearDataRequest = () => { - window.backend.clearStorage(); -}; - -const createManualLogin = (from_users) => { - html = `

Login

-
-
- - - - - Username - - - -
-
- - - - - Password - - - - -
-
-
- -
- - - -
-
-
-
- -
- - -
`; - if (from_users == false) { - document.querySelector('.back').classList.add("hide"); - } - document.querySelector('.manual__input').insertAdjacentHTML('beforeend', html); - document.querySelectorAll(".mdc-button").forEach(button => { - mdc.ripple.MDCRipple.attachTo(button); - }); - document.querySelectorAll(".mdc-text-field").forEach(textField => { - mdc.textField.MDCTextField.attachTo(textField); - }); - mdc.checkbox.MDCCheckbox.attachTo(document.querySelector(".mdc-checkbox")); - document.querySelector('.manual__login').classList.remove('hide'); - document.querySelector('.manual__login').scrollIntoView({ behavior: "smooth" }); - // setTimeout(() => { - // document.querySelector('.users').classList.add('hide'); - // }, 1000); -}; - -const createEnterPassword = (userName, userImg, userId) => { - html = `
-
-

Hello, ${userName}

-
-
- - - - - Password - - - - -
-
-
- -
- - - -
-
-
-
- -
- - -
`; - document.querySelector('.manual__input').insertAdjacentHTML('beforeend', html); - if (userImg == true) { - html = ``; - document.querySelector('.user__info').insertAdjacentHTML('afterbegin', html); - } else if (userImg == false) { - html = ``; - document.querySelector('.user__info').insertAdjacentHTML('afterbegin', html); - } - document.querySelectorAll(".mdc-button").forEach(button => { - mdc.ripple.MDCRipple.attachTo(button); - }); - document.querySelectorAll(".mdc-text-field").forEach(textField => { - mdc.textField.MDCTextField.attachTo(textField); - }); - mdc.checkbox.MDCCheckbox.attachTo(document.querySelector(".mdc-checkbox")); - document.querySelector('.manual__login').classList.remove('hide'); - document.querySelector('.manual__login').scrollIntoView({ behavior: "smooth" }); - // setTimeout(() => { - // document.querySelector('.users').classList.add('hide'); - // }, 1000); -}; - -const sendAuthInfo = (userName, password, checkbox) => { - document.querySelector(".loader").classList.remove("hide"); - var authUser; - const auth = async () => { - try { - authUser = await window.userApi.authenticateUserByName({ - authenticateUserByName: { - Username: userName, - Pw: password - } - }); - emitter.emit("logged-in", [window.server, userName, password ,authUser.data.AccessToken, `${base_token}, Token=${authUser.data.AccessToken}`, authUser.data.User.Id, authUser.data.User.Name, authUser.data]); - } catch (error) { - document.querySelector(".loader").classList.add("hide"); - console.log(`[Err]Can't login, Reason: ${error}`); - createAlert("error", "Invalid Username or Password entered try again", ".manual__login"); - return "err"; - } - }; - if (auth() != "err") { - console.log(checkbox.checked); - if (checkbox.checked == true) { - window.setAuthInfoDatabase(userName, password); - } - } -}; - -const changeServer = (page) => { - createDialog('Are you sure?', "You want to remove this server", "yes__no", "warning", page); -}; - -const goBack = (from, to, loginForm) => { - to.classList.remove("hide"); - to.scrollIntoView({ behavior: "smooth" }); - setTimeout(() => { - from.classList.add('hide'); - from.querySelector(`.${loginForm}`).remove(); - html = `
`; - from.insertAdjacentHTML('beforeend', html); - }, 1000); -}; -emitter.on("serverGo-true", () => { - emitter.emit("get-server"); - emitter.on("server-url", (server) => { - window.ax = axios.create({ - headers: { - Authorization: vanilla_token - } - }); - window.userApi = new window.UserApi(undefined, server, window.ax); - document.querySelector('.loader').classList.remove('hide'); - document.querySelector('.loader').classList.add('hide'); - createUserList(server); - }); -}); -emitter.on("server-url", (server) => { - if (server == "offline") { - createDialog("Error", "Can't connect to Jellyfin server", "remove__server", "error", ".server", true); - } -}); -emitter.on("user-saved", (user) => { - document.querySelector(".loader").classList.remove("hide"); - window.ax = axios.create({ - headers: { - Authorization: vanilla_token - } - }); - window.userApi = new window.UserApi(undefined, user[2], window.ax); - var authUser; - const auth = async () => { - try { - authUser = await window.userApi.authenticateUserByName({ - authenticateUserByName: { - Username: user[0], - Pw: user[1] - } - }); - emitter.emit("logged-in", [window.server, user[0], user[1], authUser.data.AccessToken, `${base_token}, Token=${authUser.data.AccessToken}`, authUser.data.User.Id, authUser.data.User.Name, authUser.data]); - } catch (error) { - console.log(`[Err]Can't login, Reason: ${error}`); - document.querySelector('.loader').classList.add('hide'); - createDialog("Error", "Invalid Username or Password", "remove__server", "error", ".server", true); - } - }; - auth(); -}); -emitter.on("serverGo-false", () => { - saveBtn.addEventListener('click', () => { - emitter.emit("send-jf-server-info", serverUrl.value); - document.querySelector('.loader').classList.remove('hide'); - }, true); - emitter.on('not-jf-server', () => { - document.querySelector('.loader').classList.add('hide'); - createAlert('error', "Can't detrmine if the give server address is a valid Jellyfin server", ".server"); - }); - emitter.on('is-jf-server', () => { - emitter.emit('get-server'); - emitter.on("server-url", (server) => { - window.ax = axios.create({ - headers: { - Authorization: vanilla_token - } - }); - window.userApi = new window.UserApi(undefined, server, window.ax); - document.querySelector('.loader').classList.remove('hide'); - document.querySelector('.loader').classList.add('hide'); - createUserList(server); - }); - }); -}); \ No newline at end of file diff --git a/renderer/js/main.js b/renderer/js/main.js deleted file mode 100644 index 3a1d0be..0000000 --- a/renderer/js/main.js +++ /dev/null @@ -1,479 +0,0 @@ -const mainPageCont = document.querySelector("main"); -const loginPage = document.querySelector(".login"); -const bg = document.querySelector("#background"); -let backdrop; -let tempData; - -var homePageLayout = [ - { - "name": "Libraries", - "cardType": "thumb", - "data": "" - }, - { - "name": "Continue Watching", - "cardType": "thumb", - "data": "" - }, - { - "name": "Next Up", - "cardType": "thumb", - "data": "" - } -]; - -const pageTransition = (from, to, background) => { - document.querySelector(from).classList.add("moveFadeOut"); - document.querySelector(to).classList.add("moveFadeIn"); - setTimeout(() => { - document.querySelector(to).classList.remove("moveFadeIn"); - document.querySelector(to).classList.add("active"); - document.querySelector(from).classList.remove("moveFadeOut"); - document.querySelector(from).classList.add("hide"); - }, 5000); -} - -const ticksToMin = (ticks) => { - return Math.round(ticks / 600000000); -}; - -const showSlide = (index) => { - index = Number(index); - let slide = document.querySelectorAll(".slide")[index + 1]; - let track = document.querySelectorAll(".track")[index + 1]; - document.querySelector(".slide.active").classList.remove("active"); - document.querySelector(".track.active").classList.remove("active"); - slide.classList.add("active"); - track.classList.add("active"); -}; - -const sliderAnim = (slider) => { - var slides = document.querySelectorAll(slider); - sliderAnim.timer = setInterval(() => { - sliderAnim.index = Array.prototype.indexOf.call(slides, document.querySelector(".slide.active")); - if (sliderAnim.index + 1 >= slides.length) { - sliderAnim.index = 0; - } - showSlide(sliderAnim.index); - }, 5000); - document.querySelectorAll(".track").forEach(track => { - track.addEventListener("click", () => { - showSlide(track.dataset.index - 1); - clearInterval(sliderAnim.timer); - sliderAnim.timer = setInterval(() => { - sliderAnim.index = Array.prototype.indexOf.call(slides, document.querySelector(".slide.active")); - if (sliderAnim.index + 1 >= slides.length) { - sliderAnim.index = -1; - } - showSlide(sliderAnim.index); - sliderAnim.index += 1; - }, 5000); - }); - }); -}; - -const createCardGrid = (type, data, cardType) => { - let typeClass = type.replace(/\s+/g, ''); - if (data.length != 0) { - document.querySelector(".library__page").insertAdjacentHTML("beforeend", `
`); - setTimeout(() => { - let counter = 0; - document.querySelector(`.content.${typeClass.toLowerCase()}`).insertAdjacentHTML("afterbegin", `

${type}

- - -
-
`); - document.querySelector(`.content.${typeClass.toLowerCase()} .slider-forward`).addEventListener("click", () => { - console.log(counter); - document.querySelector(`.content.${typeClass.toLowerCase()} .grid`).style.transition = `transform var(--transition-time-slow-1) ease-in-out`; - counter++; - switch (cardType) { - case "thumb": - if (counter > data.length / 4) { - counter = 0; - } - break; - default: - if (counter > data.length / 6) { - counter = 0; - } - break; - } - document.querySelector(`.content.${typeClass.toLowerCase()} .grid`).style.transform = `translateX(${-document.querySelector(`.grid`).clientWidth * counter}px)`; - }); - document.querySelector(`.content.${typeClass.toLowerCase()} .slider-back`).addEventListener("click", () => { - document.querySelector(`.content.${typeClass.toLowerCase()} .grid`).style.transition = `transform var(--transition-time-slow-1) ease-in-out`; - counter--; - if (counter < 0) { - counter = 0; - } - console.log(counter); - document.querySelector(`.content.${typeClass.toLowerCase()} .grid`).style.transform = `translateX(${-document.querySelector(`.grid`).clientWidth * counter}px)`; - }); - if (data.length <= 6 && cardType == "primary") { - for (let child of document.querySelector(`.${typeClass.toLowerCase()} .content__header .buttons`).children) - child.setAttribute("disabled", true); - }else if (data.length <= 6 && cardType == "square") { - for (let child of document.querySelector(`.${typeClass.toLowerCase()} .content__header .buttons`).children) - child.setAttribute("disabled", true); - }else if (data.length <= 4 && cardType == "thumb") { - for (let child of document.querySelector(`.${typeClass.toLowerCase()} .content__header .buttons`).children) - child.setAttribute("disabled", true); - } - }, 0); - setTimeout(() => { - for (let item of data) { - html = `
-
-
- -
-
- -
-
-
-
${item.Name}
-
-
`; - document.querySelector(`.content.${typeClass.toLowerCase()} .grid`).insertAdjacentHTML("beforeend", html); - if (item.ImageTags.Primary) { - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .primary__image img`).setAttribute("src", `${window.server}/Items/${item.Id}/Images/Primary?imgTag=${item.ImageTags.Primary[0]}`); - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .primary__image`).classList.remove("hide"); - } - if (item.CollectionType) { - switch (item.CollectionType) { - case "books": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-book-multiple-outline"); - break; - case "boxsets": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-folder-outline"); - break; - case "movies": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-play-box-multiple-outline"); - break; - case "music": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-music-box-multiple-outline"); - break; - case "playlists": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-playlist-music"); - break; - case "tvshows": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-youtube-tv"); - break; - default: - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-file-outline"); - break; - } - } else { - switch (item.Type) { - case "Episode": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-television-classic"); - break; - case "Book": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-book-open-page-variant-outline"); - break; - case "Movie": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-movie-outline"); - break; - case "MusicAlbum": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-album"); - break; - case "Audio": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-music"); - break; - case "Series": - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-youtube-tv"); - break; - default: - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .mdi`).classList.add("mdi-file-outline"); - break; - } - } - if (item.ProductionYear) { - document.querySelector(`.${typeClass.toLowerCase()} .card[data-index="${data.indexOf(item)}"] .card__text__cont`).insertAdjacentHTML("beforeend", `
${item.ProductionYear}
`); - } - } - for (let card of document.querySelectorAll(".primary .card")) { - tempData = card.parentElement.clientWidth; - card.style.width = `${tempData / 6}px`; - } - for (let card of document.querySelectorAll(".square .card")) { - tempData = card.parentElement.clientWidth; - card.style.width = `${tempData / 6}px`; - } - for (let card of document.querySelectorAll(".thumb .card")) { - tempData = card.parentElement.clientWidth; - card.style.width = `${tempData / 4}px`; - } - window.onresize = () => { - for (let card of document.querySelectorAll(".primary .card")) { - tempData = card.parentElement.clientWidth; - card.style.width = `${tempData / 6}px`; - } - for (let card of document.querySelectorAll(".square .card")) { - tempData = card.parentElement.clientWidth; - card.style.width = `${tempData / 6}px`; - } - for (let card of document.querySelectorAll(".thumb .card")) { - tempData = card.parentElement.clientWidth; - card.style.width = `${tempData / 4}px`; - } - }; - }, 0); - } -}; - -const createLibraryPage = async (page, userId, itemsApi) => { - let data; - // if (!document.querySelector(`.library__page[data-page='${page}']`)) { - html = `
-
-
-
-
`; - document.querySelector('.main__animated__page').insertAdjacentHTML("beforeend", html) - document.querySelector(`.library__page[data-page='${page}']`).scrollIntoView({ behavior: "smooth" }); - data = await itemsApi.getItems({ - userId: userId, - includeItemTypes: [`${page.toUpperCase()}`], - recursive: true - }); - for (let item of data.data) { - html = `
-
-
- -
-
- -
-
-
-
${item.Name}
-
-
` - document.querySelector(`.library__page[data-page='${page}'] .LibraryGrid`).insertAdjacentHTML("beforeend", html); - } - document.querySelector(`.library__page[data-page='${page}'] .skeleton__loader`).classList.add("hide"); - // } -}; - -emitter.on("logged-in", async (user) => { - html = `
- -
-
-
-
-
-
-
-
-
`; - mainPageCont.insertAdjacentHTML("beforeend", html); - pageTransition(".login", ".main", false); - document.querySelector(".loader").classList.add("hide"); - const UserConf = new Configuration({ - apiKey: user[4], - basePath: user[0], - username: user[1], - password: user[2], - accessToken: user[3] - }); - const libApi = new LibraryApi(UserConf); - const itemsApi = new ItemsApi(UserConf); - const userLibApi = new UserLibraryApi(UserConf); - const tvshowsApi = new TvShowsApi(UserConf); - const libsRaw = await libApi.getMediaFolders(); - const libs = libsRaw.data.Items; - const latestMedia = await userLibApi.getLatestMedia({ - userId: user[5] - }); - if (!user[7].User.PrimaryImageTag) { - html = ``; - document.querySelector(".user__menu .image").insertAdjacentHTML("afterbegin", html); - } else if (user[7].User.PrimaryImageTag) { - html = ``; - document.querySelector(".user__menu .image").insertAdjacentHTML("afterbegin", html); - } - setTimeout(() => { - for (let item of libs) { - if (item.CollectionType) { - html = ``; - document.querySelector(".submenu .sub").insertAdjacentHTML("beforeend", html); - for (let menuBtn of document.querySelectorAll('.menu__button')) { - menuBtn.addEventListener("click", () => { - createLibraryPage(menuBtn.dataset.page, user[5], itemsApi) - }) - } - switch (item.CollectionType) { - case "books": - document.querySelector(`.menu__button[data-page="books"] .mdi`).classList.add("mdi-book-multiple-outline"); - break; - case "boxsets": - document.querySelector(`.menu__button[data-page="boxsets"] .mdi`).classList.add("mdi-folder-outline"); - break; - case "movies": - document.querySelector(`.menu__button[data-page="movies"] .mdi`).classList.add("mdi-play-box-multiple-outline"); - break; - case "music": - document.querySelector(`.menu__button[data-page="music"] .mdi`).classList.add("mdi-music-box-multiple-outline"); - break; - case "playlists": - document.querySelector(`.menu__button[data-page="playlists"] .mdi`).classList.add("mdi-playlist-music"); - break; - case "tvshows": - document.querySelector(`.menu__button[data-page="tvshows"] .mdi`).classList.add("mdi-youtube-tv"); - break; - default: - document.querySelector(`.menu__button[data-page="${item.CollectionType.toLowerCase()}"] .mdi`).classList.add("mdi-file-outline"); - break; - } - } else { - html = ``; - document.querySelector(".submenu .sub").insertAdjacentHTML("beforeend", html); - } - } - }, 0); - document.querySelectorAll(".menu__button").forEach(btn => { - if (btn.dataset.page == document.querySelector(".library__page.current").dataset.page) { - btn.classList.add("active"); - } - }); - document.querySelector(".vertical__tab__highlighter").style.top = `${document.querySelector(".menu__button.active").getBoundingClientRect().top}px`; - document.querySelector(".vertical__tab__highlighter").style.height = `${document.querySelector(".menu__button.active").getBoundingClientRect().height}px`; - document.querySelectorAll(".menu .skeleton__loader").forEach(sk => { - sk.classList.add("hide"); - }); - for (let item of latestMedia.data) { - document.querySelector(".latestMediaSlider .track__cont").insertAdjacentHTML("beforeend", `
`); - if (item.ImageBlurHashes.Backdrop) { - html = `
-
- -
-
-
-
-
${item.ProductionYear}
-
${item.CommunityRating}
-
${ticksToMin(item.RunTimeTicks)}min
-
-
- - -
-
-
`; - document.querySelector(".latestMediaSlider").insertAdjacentHTML("beforeend", html); - if (item.ImageTags.Logo) { - html = `
`; - document.querySelector(`[data-index='${latestMedia.data.indexOf(item)}'] .info__cont .title`).insertAdjacentHTML("beforeend", html); - document.querySelector(`[data-index='${latestMedia.data.indexOf(item)}'] .info__cont .title`).classList.add("logo"); - } else { - document.querySelector(".info__cont .title").insertAdjacentHTML("beforeend", item.Name); - } - } else { - if (item.Type == "AudioBook") { - html = `
-
-
- -
-
-
-
-
-
${item.ProductionYear}
-
${item.CommunityRating}
-
${ticksToMin(item.RunTimeTicks)}min
-
-
- - -
-
-
`; - document.querySelector(".latestMediaSlider").insertAdjacentHTML("beforeend", html); - if (item.ImageTags.Logo) { - html = `
`; - document.querySelector(`[data-index='${latestMedia.data.indexOf(item)}'] .info__cont .title`).insertAdjacentHTML("beforeend", html); - document.querySelector(`[data-index='${latestMedia.data.indexOf(item)}'] .info__cont .title`).classList.add("logo"); - } else { - document.querySelector(`[data-index="${latestMedia.data.indexOf(item)}"] .title`).insertAdjacentHTML("beforeend", `
${item.Name}
`); - } - } - // } else if (!item) { } - } - if (latestMedia.data.indexOf(item) == 0) { - document.querySelector(".slide").classList.add("active"); - document.querySelector(`.track[data-index="${Array.prototype.indexOf.call(document.querySelectorAll(".slide"), document.querySelector(".slide.active"))}"]`).classList.add("active"); - } - } - if (latestMedia.data.length > 1) { - sliderAnim(".slide"); - } else { - document.querySelector(".track__cont").classList.add("hide"); - } - let latest; - tempData = await itemsApi.getResumeItems({ userId: user[5], limit: 24, mediaTypes: "Video" }); - homePageLayout[0].data = libs; - homePageLayout[1].data = tempData.data.Items; - tempData = await tvshowsApi.getNextUp({ userId: user[5] }); - homePageLayout[2].data = tempData.data.Items; - // Array.prototype.push.call(homePageLayout[0], { "data": libs }); - // Array.prototype.push.call(homePageLayout[1], { "data": tempData.data.Items }); - // tempData = await tvshowsApi.getNextUp({ userId: user[5] }); - // Array.prototype.push.call(homePageLayout[2], { "data": tempData.data.Items }); - // homePageLayout[1].push({ "data": libs }); - setTimeout(async () => { - window.libs = libs - for (let library of libs) { - latest = await userLibApi.getLatestMedia({ - userId: user[5], - parentId: library.Id - }); - if (library.CollectionType == "music") { - homePageLayout.push({ "name": `Latest ${library.Name}`, "cardType": "square", "data": latest.data }); - } else { - homePageLayout.push({ "name": `Latest ${library.Name}`, "cardType": "primary", "data": latest.data }); - } - } - for (let lib of homePageLayout) { - createCardGrid(lib.name, lib.data, lib.cardType); - } - }, 0); - document.querySelectorAll(".main__animated__page .skeleton__loader").forEach(sk => { - sk.classList.add("hide"); - }); -}); \ No newline at end of file diff --git a/renderer/svg/avatar.svg b/renderer/svg/avatar.svg deleted file mode 100644 index ba842d7..0000000 --- a/renderer/svg/avatar.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/renderer/svg/books.svg b/renderer/svg/books.svg deleted file mode 100644 index 237311b..0000000 --- a/renderer/svg/books.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/renderer/svg/boxsets.svg b/renderer/svg/boxsets.svg deleted file mode 100644 index 4057dd8..0000000 --- a/renderer/svg/boxsets.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/renderer/svg/loader.svg b/renderer/svg/loader.svg deleted file mode 100644 index ca6210a..0000000 --- a/renderer/svg/loader.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/renderer/svg/movies.svg b/renderer/svg/movies.svg deleted file mode 100644 index 960ac30..0000000 --- a/renderer/svg/movies.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/renderer/svg/music.svg b/renderer/svg/music.svg deleted file mode 100644 index 9a00875..0000000 --- a/renderer/svg/music.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/renderer/svg/playlists.svg b/renderer/svg/playlists.svg deleted file mode 100644 index c6b5a4c..0000000 --- a/renderer/svg/playlists.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/renderer/svg/tvshows.svg b/renderer/svg/tvshows.svg deleted file mode 100644 index 0844f52..0000000 --- a/renderer/svg/tvshows.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - -