Compare commits

...
22 Commits
Author SHA1 Message Date
Prayag Prajapati 4dc71b4c8b Disable building .msi bundle for windows 2023-12-31 17:16:15 +05:30
Prayag Prajapati a31a8920e9 Update latest.json 2023-12-31 16:49:42 +05:30
Prayag Prajapati da524107f0 Update version to 0.0.3-dev 2023-12-30 18:38:37 +05:30
Prayag Prajapati e397d0cf58 Update hero carousel 2023-12-30 16:17:50 +05:30
renovate[bot] 65db12192f fix(deps): update tauri monorepo (#237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-29 18:53:29 +05:30
renovate[bot] b2d1154354 fix(deps): update material-ui monorepo (#236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-29 18:52:35 +05:30
renovate[bot] 99bee007ac fix(deps): update tauri monorepo (#235)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-29 18:52:20 +05:30
renovate[bot] 3740d24cd1 fix(deps): update material-ui monorepo (#234)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-29 18:52:05 +05:30
Prayag Prajapati 960538a9a6 Update homepage carousel and add support for MD in updater 2023-12-29 17:45:23 +05:30
Prayag Prajapati afcc8cfd4d Update search page and emptyNotice 2023-12-29 11:00:06 +05:30
Prayag Prajapati bccc19981e Add navLink components to libraries menu 2023-12-29 10:46:39 +05:30
Prayag Prajapati 66f63c6d75 Start working on new appBar 2023-12-28 17:18:15 +05:30
Prayag Prajapati 722630cf37 Merge branch 'main' of https://github.com/prayag17/JellyPlayer 2023-12-17 19:19:26 +05:30
Prayag Prajapati 32e439c495 Fix display error in heroLayout 2023-12-17 19:19:09 +05:30
renovate[bot] eda16f8cc2 fix(deps): update material-ui monorepo (#233)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-16 20:26:03 +05:30
renovate[bot] 1b688fe75e fix(deps): update material-ui monorepo (#232)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-15 22:18:17 +05:30
Prayag Prajapati 3134818ca7 Add criticsRating and improve icons and animations in itemPage 2023-12-14 17:39:10 +05:30
Prayag Prajapati 2268bca663 Fix emptyNotice icon 2023-12-12 22:40:42 +05:30
Prayag Prajapati c1e55c0e3f Update EmptyNotice 2023-12-12 22:38:08 +05:30
Prayag Prajapati c5922d67c4 Update ErrorNotice and add route level errorBoundary 2023-12-12 20:29:16 +05:30
Prayag Prajapati 5799031a34 Update deps and code cleanup 2023-12-11 21:45:34 +05:30
Prayag Prajapati dc226da809 Update lastest.json 2023-12-10 14:41:53 +05:30
39 changed files with 2228 additions and 1240 deletions

No files matched your search

+13 -17
View File
@@ -1,19 +1,15 @@
{ {
"version": "0.0.1", "version": "0.0.3-dev",
"notes": "See the assets to download and install this version.", "notes": "See the assets to download and install this version.",
"pub_date": "2023-12-08T10:15:47.030Z", "pub_date": "2023-12-30T13:19:40.566Z",
"platforms": { "platforms": {
"darwin-x86_64": { "linux-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bWVlb2tUSWF6NlRYL0dDYWVHK2hhWVpHVjkyeTFLMU9uM01QS0RhQ0huTnpsNDY5eUpiaHIzRlJxS0tGT3VPTWNkWlJWNCtPaXRlWlljZ1VFeEpSNUE4PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAyMDMwNDI0CWZpbGU6SmVsbHlQbGF5ZXIuYXBwLnRhci5negpzMEx6WDlybVJkTmM4cE1oQThYKzhKT1BsNUlGUjB1MnNGUk4rYXVkNVJMMmoySks4VGp4bTd3a2Jtbm1kTnh2TDFKTXFRZXMzbTQyeXh6L2h3WjBEQT09Cg==", "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVUxMlNNMXNqRUJzbTlxQTVSeldOcG1QNnROYUpVbWx1dVJabHFzUFRTVnpSdlhPMnNMWlNZaW1RTFZ1NUhhYmtsNFBVa3cwWDVqWmU0R3JFNnJjVHdNPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAzOTQyMzI3CWZpbGU6amVsbHktcGxheWVyXzAuMC4zLWRldl9hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKbnpNR2VkeFB4eDZpd25JZDBDVjJFRVNFYndXM0hmeVRtZ3dJdmlRMldHRVpxeDBKL3AyTzZld21rbzYwanJwcUkzenpUQXNPSURETmdZZHBXNCtqREE9PQo=",
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.1-dev%40874646a/JellyPlayer_x64.app.tar.gz" "url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/jelly-player_0.0.3-dev_amd64.AppImage.tar.gz"
}, },
"linux-x86_64": { "darwin-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bWNQRlIzaTlNa2l4dHRGQk1hcVNIRUI5Z0Z4L0lEMktIWmhRT0RlS2RHMjBib240NHNlTWltbGZFY242cTNLM2xlTFpMdVh3WWw5a240QnVYNjF0Z2dzPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAyMDMwMzE0CWZpbGU6amVsbHktcGxheWVyXzAuMC4xX2FtZDY0LkFwcEltYWdlLnRhci5negpBQWhWcDhjZGJTdHYxSG95WUpYZE81WmFrWS8zeDYvNFJpYVRzV1ZKNnVNVXUvL3A0a21YOHV0aHFQR3cwU3Fka2ZNb2dYQkR6OHlIWTRtdnc3T2RCdz09Cg==", "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVFSd2o2eGdKZUFuQ09ucXF6amJaYU1TVXRCaDBzTVJZM0xBZDVMNkRnL0N2WDJtclpBYTYwamthTGFVWERaUXVpRzdEZ3oyT2N1azFoamJ2RENZZFFvPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAzOTQyMzc0CWZpbGU6SmVsbHlQbGF5ZXIuYXBwLnRhci5negpycDN3eWRlR1IyZXo0djlmSjJMVkpHUWNRVUhqbmFsSHFnbzNQM2VGc21uOTRESjJxaUNlbEl6K2hnSU41T0lPQ292VWFjYlVRM2YyM1BNM0NWOTJEUT09Cg==",
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.1-dev%40874646a/jelly-player_0.0.1_amd64.AppImage.tar.gz" "url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/JellyPlayer_x64.app.tar.gz"
}, }
"windows-x86_64": { }
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVJSTzNJTklhOGFjZUlwTnlPa1d3Zk5WazRzcWUrV0RqSWlvM2ZIWjYweVQ0TWtJK3ZtWEVPdmorbFpMN2M4TDhLdmR4QlJjdDAzWjV2T2NqcTQ3MkFvPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAyMDMwNTIzCWZpbGU6SmVsbHlQbGF5ZXJfMC4wLjFfeDY0X2VuLVVTLm1zaS56aXAKU054eGZNSDlKeHJsOEVyT0VoczU3TjdIWU9jWGNiVUxvTWRac0ZUdmtRZ1Q1QStqS0NUOVVSRHVaUGJkNDNpc3NUNTFDaWRMOS9VRit2WnFCbVRyRGc9PQo=",
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.1-dev%40874646a/JellyPlayer_0.0.1_x64_en-US.msi.zip"
}
}
} }
+20 -19
View File
@@ -1,7 +1,7 @@
{ {
"name": "jellyplayer", "name": "jellyplayer",
"private": true, "private": true,
"version": "0.0.1", "version": "0.0.3-dev",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -13,46 +13,47 @@
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0", "@emotion/styled": "^11.11.0",
"@fontsource-variable/jetbrains-mono": "^5.0.18", "@fontsource-variable/jetbrains-mono": "^5.0.19",
"@fontsource/noto-sans": "^5.0.17", "@fontsource/noto-sans": "^5.0.18",
"@jellyfin/sdk": "0.8.2", "@jellyfin/sdk": "0.8.2",
"@mdi/js": "^7.3.67", "@mdi/js": "^7.3.67",
"@mui/lab": "5.0.0-alpha.155", "@mui/lab": "5.0.0-alpha.158",
"@mui/material": "^5.14.15", "@mui/material": "^5.14.20",
"@tanstack/react-query": "^5.0.5", "@tanstack/react-query": "^5.13.4",
"@tanstack/react-query-devtools": "^5.4.2", "@tanstack/react-query-devtools": "^5.13.5",
"@tauri-apps/api": "^1.5.1", "@tauri-apps/api": "^1.5.1",
"axios": "^1.6.0", "axios": "^1.6.2",
"axios-tauri-api-adapter": "^0.2.0", "axios-tauri-api-adapter": "^0.2.0",
"blurhash": "^2.0.5", "blurhash": "^2.0.5",
"events": "^3.3.0", "events": "^3.3.0",
"framer-motion": "^10.16.4", "framer-motion": "^10.16.16",
"material-symbols": "^0.14.0", "material-symbols": "^0.14.2",
"notistack": "^3.0.1", "notistack": "^3.0.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-blurhash": "^0.3.0", "react-blurhash": "^0.3.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-error-boundary": "^4.0.11", "react-error-boundary": "^4.0.11",
"react-markdown": "^9.0.1",
"react-multi-carousel": "^2.8.4", "react-multi-carousel": "^2.8.4",
"react-player": "^2.13.0", "react-player": "^2.13.0",
"react-router-dom": "^6.17.0", "react-router-dom": "^6.20.1",
"react-use-konami": "^1.1.0", "react-use-konami": "^1.1.0",
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1", "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store", "tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
"uuid": "^9.0.1", "uuid": "^9.0.1",
"vite-plugin-svgr": "^4.1.0", "vite-plugin-svgr": "^4.2.0",
"wavesurfer.js": "^7.4.2", "wavesurfer.js": "^7.5.1",
"zustand": "^4.4.4" "zustand": "^4.4.7"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "^1.5.6", "@tauri-apps/cli": "^1.5.7",
"@vitejs/plugin-react": "^4.1.0", "@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.52.0", "eslint": "^8.55.0",
"eslint-plugin-react": "^7.33.2", "eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-refresh": "^0.4.3", "eslint-plugin-react-refresh": "^0.4.5",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"sass": "^1.69.5", "sass": "^1.69.5",
"vite": "^5.0.5", "vite": "^5.0.7",
"vite-plugin-compression": "^0.5.1" "vite-plugin-compression": "^0.5.1"
}, },
"license": "GPL-3.0-only" "license": "GPL-3.0-only"
+1163 -722
View File
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "jellyplayer" name = "jellyplayer"
version = "0.0.1" version = "0.0.3-dev"
description = "A Modern Jellyfin Client" description = "A Modern Jellyfin Client"
authors = ["prayag17", "JellyPlayer contributors (https://github.com/prayag17/JellyPlayer/graphs/contributors)"] authors = ["prayag17", "JellyPlayer contributors (https://github.com/prayag17/JellyPlayer/graphs/contributors)"]
license = "GPL-3.0-only" license = "GPL-3.0-only"
@@ -12,13 +12,13 @@ rust-version = "1.59"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies] [build-dependencies]
tauri-build = { version = "1.5.0", features = [] } tauri-build = { version = "1.5.1", features = [] }
[dependencies] [dependencies]
log = "^0.4.20" log = "^0.4.20"
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.5.3", features = [ "updater", "http-all", "devtools", "process-exit", "process-relaunch", "shell-all", "window-set-fullscreen", "http-all"] } tauri = { version = "1.5.4", features = [ "updater", "http-all", "devtools", "process-exit", "process-relaunch", "shell-all", "window-set-fullscreen", "http-all"] }
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1", features = ["colored"] } tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1", features = ["colored"] }
+2 -6
View File
@@ -8,7 +8,7 @@
}, },
"package": { "package": {
"productName": "JellyPlayer", "productName": "JellyPlayer",
"version": "0.0.1" "version": "0.0.3-dev"
}, },
"tauri": { "tauri": {
"allowlist": { "allowlist": {
@@ -61,15 +61,11 @@
}, },
"resources": [], "resources": [],
"shortDescription": "A Modern Jellyfin Client for Jellyfin", "shortDescription": "A Modern Jellyfin Client for Jellyfin",
"targets": "all", "targets": ["deb", "appimage", "nsis", "app", "dmg", "updater"],
"windows": { "windows": {
"certificateThumbprint": null, "certificateThumbprint": null,
"digestAlgorithm": "sha256", "digestAlgorithm": "sha256",
"timestampUrl": "", "timestampUrl": "",
"wix": {
"bannerPath": "../public/installerBanner.bmp",
"dialogImagePath": "../public/installerDialog.bmp"
},
"nsis": { "nsis": {
"sidebarImage": "../public/installerSideBarImage.bmp", "sidebarImage": "../public/installerSideBarImage.bmp",
"headerImage": "../public/installerHeaderImage.bmp", "headerImage": "../public/installerHeaderImage.bmp",
+17 -9
View File
@@ -58,6 +58,7 @@ import About from "./routes/about";
import SearchPage from "./routes/search"; import SearchPage from "./routes/search";
import { VideoPlayer } from "./routes/player/videoPlayer.jsx"; import { VideoPlayer } from "./routes/player/videoPlayer.jsx";
import Markdown from "react-markdown";
import { SideMenu } from "./components/menu/sidemenu.jsx"; import { SideMenu } from "./components/menu/sidemenu.jsx";
import { AppBar } from "./components/appBar/appBar.jsx"; import { AppBar } from "./components/appBar/appBar.jsx";
@@ -101,6 +102,8 @@ import { CircularProgress } from "@mui/material";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { useCentralStore } from "./utils/store/central.js"; import { useCentralStore } from "./utils/store/central.js";
import { useSnackbar } from "notistack"; import { useSnackbar } from "notistack";
import { ErrorBoundary } from "react-error-boundary";
import { ErrorNotice } from "./components/notices/errorNotice/errorNotice.jsx";
const anim = { const anim = {
initial: { initial: {
@@ -243,7 +246,7 @@ function App() {
setUpdateDialog(true); setUpdateDialog(true);
// You could show a dialog asking the user if they want to install the update here. // You could show a dialog asking the user if they want to install the update here.
console.log( console.log(
`Installing update ${manifest?.version}, ${manifest?.date}, ${manifest?.body}`, `Update found : ${manifest?.version}, ${manifest?.date}`,
); );
// Install the update. This will also restart the app on Windows! // Install the update. This will also restart the app on Windows!
@@ -293,7 +296,7 @@ function App() {
/> />
)} )}
<Dialog <Dialog
// open={false} // open={true}
open={updateDialog} open={updateDialog}
// onClose={} // onClose={}
// maxWidth="md" // maxWidth="md"
@@ -313,7 +316,9 @@ function App() {
</DialogTitle> </DialogTitle>
<DialogContent dividers> <DialogContent dividers>
<DialogContentText> <DialogContentText>
{updateInfo.body} <Markdown>
{updateInfo.body}
</Markdown>
</DialogContentText> </DialogContentText>
</DialogContent> </DialogContent>
<DialogActions <DialogActions
@@ -454,14 +459,15 @@ function App() {
}} }}
> >
<CssBaseline /> <CssBaseline />
<SideMenu /> {/* <SideMenu /> */}
<AppBar /> <AppBar />
<AudioPlayer key={audioPlayerVisible} /> <AudioPlayer key={audioPlayerVisible} />
<Routes location={location}> <ErrorBoundary FallbackComponent={ErrorNotice}>
<Route <Routes location={location}>
{/* <Route
// key={location.key} // key={location.key}
element={<AnimationWrapper />} element={<AnimationWrapper />}
> > */}
<Route <Route
path="/" path="/"
exact exact
@@ -559,6 +565,7 @@ function App() {
exact exact
path="/musicalbum/:id" path="/musicalbum/:id"
element={<MusicAlbumTitlePage />} element={<MusicAlbumTitlePage />}
errorElement={<div>Error</div>}
/> />
<Route <Route
exact exact
@@ -609,8 +616,9 @@ function App() {
path="/player" path="/player"
element={<VideoPlayer />} element={<VideoPlayer />}
/> />
</Route> {/* </Route> */}
</Routes> </Routes>
</ErrorBoundary>
</div> </div>
<ReactQueryDevtools buttonPosition="bottom-left" /> <ReactQueryDevtools buttonPosition="bottom-left" />
</ThemeProvider> </ThemeProvider>
+238 -97
View File
@@ -1,5 +1,5 @@
/** @format */ /** @format */
import React, { useEffect, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { relaunch } from "@tauri-apps/api/process"; import { relaunch } from "@tauri-apps/api/process";
@@ -11,12 +11,16 @@ import ListItemIcon from "@mui/material/ListItemIcon";
import Menu from "@mui/material/Menu"; import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem"; import MenuItem from "@mui/material/MenuItem";
import useScrollTrigger from "@mui/material/useScrollTrigger"; import useScrollTrigger from "@mui/material/useScrollTrigger";
import Typography from "@mui/material/Typography";
import Popper from "@mui/material/Popper";
import { red } from "@mui/material/colors"; import { red } from "@mui/material/colors";
import { useLocation, useNavigate } from "react-router-dom"; import { useLocation, useNavigate, NavLink } from "react-router-dom";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api"; import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
import { useQuery, useQueryClient } from "@tanstack/react-query"; import { useQuery, useQueryClient } from "@tanstack/react-query";
import "./appBar.module.scss"; import "./appBar.module.scss";
@@ -35,6 +39,10 @@ import { MdiLogoutVariant } from "../icons/mdiLogoutVariant";
import { EventEmitter as event } from "../../eventEmitter"; import { EventEmitter as event } from "../../eventEmitter";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
import { getTypeIcon } from "../../components/utils/iconsCollection";
import logo from "../../assets/logo.svg";
export const AppBar = () => { export const AppBar = () => {
const [api] = useApi((state) => [state.api]); const [api] = useApi((state) => [state.api]);
const navigate = useNavigate(); const navigate = useNavigate();
@@ -53,6 +61,17 @@ export const AppBar = () => {
enabled: display, enabled: display,
networkMode: "always", networkMode: "always",
}); });
let libraries = useQuery({
queryKey: ["libraries"],
queryFn: async () => {
let libs = await getUserViewsApi(api).getUserViews({
userId: user.data.Id,
});
return libs.data;
},
enabled: !!user.data,
networkMode: "always",
});
useEffect(() => { useEffect(() => {
if (user.isError) { if (user.isError) {
console.error(user.error); console.error(user.error);
@@ -91,6 +110,20 @@ export const AppBar = () => {
navigate("/login/index"); navigate("/login/index");
}; };
const [librariesPopover, setLibrariesPopover] = useState(false);
const librariesText = useRef(null);
const popoverEnter = (event) => {
if (anchorEl !== event.currentTarget) {
setLibrariesPopover(event.currentTarget);
}
};
const popoverLeave = () => {
setLibrariesPopover(null);
};
const [isBrowsingLibrary, setIsBrowsingLibrary] = useState(false);
useEffect(() => { useEffect(() => {
if ( if (
location.pathname.includes("login") || location.pathname.includes("login") ||
@@ -104,14 +137,18 @@ export const AppBar = () => {
} else { } else {
setDisplay(true); setDisplay(true);
} }
}, [location]);
useEffect(() => {
if (location.pathname == "/home") { if (location.pathname == "/home") {
setBackButtonVisible(false); setBackButtonVisible(false);
} else { } else {
setBackButtonVisible(true); setBackButtonVisible(true);
} }
if (location.pathname.includes("library")) {
setIsBrowsingLibrary(true);
} else {
setIsBrowsingLibrary(false);
}
}, [location]); }, [location]);
if (!display) { if (!display) {
@@ -123,109 +160,213 @@ export const AppBar = () => {
style={{ style={{
backgroundColor: "transparent", backgroundColor: "transparent",
paddingRight: "0 !important", paddingRight: "0 !important",
width: "fit-content",
}} }}
className={trigger ? "appBar backdropVisible" : "appBar"} className={trigger ? "appBar backdropVisible" : "appBar"}
elevation={0} elevation={trigger ? 4 : 0}
color="transparent"
> >
<Toolbar <Toolbar
sx={{ sx={{
justifyContent: "space-between", display: "grid",
padding: "13px !important", gap: "0.6em",
display: "flex", gridTemplateColumns: "30% 1fr 30%",
gap: "1.2em",
}} }}
> >
<IconButton <div
onClick={() => navigate(-1)} className="flex flex-row flex-center"
disabled={!backButtonVisible} style={{
gap: "1.2em",
justifySelf: "start",
}}
> >
<div className="material-symbols-rounded"> <IconButton
arrow_back onClick={() => navigate(-1)}
</div> disabled={!backButtonVisible}
</IconButton> style={{
justifySelf: "left",
<IconButton onClick={() => navigate("/search")}>
<div className="material-symbols-rounded">
search
</div>
</IconButton>
<IconButton onClick={() => navigate("/favorite")}>
<div className="material-symbols-rounded">
favorite
</div>
</IconButton>
<IconButton sx={{ p: 0 }} onClick={handleMenuOpen}>
{user.isSuccess &&
(user.data.PrimaryImageTag == undefined ? (
<Avatar
className="appBar-avatar"
alt={user.data.Name}
>
<MdiAccount className="appBar-avatar-icon" />
</Avatar>
) : (
<Avatar
className="appBar-avatar"
src={
api.basePath +
"/Users/" +
user.data.Id +
"/Images/Primary"
}
alt={user.data.Name}
>
<MdiAccount className="appBar-avatar-icon" />
</Avatar>
))}
</IconButton>
<Menu
anchorEl={anchorEl}
open={openMenu}
onClose={handleMenuClose}
sx={{ mt: 1 }}
disableScrollLock
>
<MenuItem
onClick={() => navigate("/settings")}
disabled
>
<ListItemIcon>
<div className="material-symbols-rounded">
settings
</div>
</ListItemIcon>
Settings
</MenuItem>
<MenuItem onClick={() => navigate("/about")}>
<ListItemIcon>
<div className="material-symbols-rounded">
info
</div>
</ListItemIcon>
About
</MenuItem>
<MenuItem onClick={handleLogout}>
<ListItemIcon>
<div className="material-symbols-rounded">
logout
</div>
</ListItemIcon>
Logout
</MenuItem>
<MenuItem
onClick={async () => {
navigate("/servers/list");
}} }}
> >
<ListItemIcon> <div className="material-symbols-rounded">
<div className="material-symbols-rounded appBar-icon"> arrow_back
dns </div>
</div> </IconButton>
</ListItemIcon> <img src={logo} className="appBar-logo" />
Select Server </div>
</MenuItem>
</Menu> <div
className="flex flex-row flex-center"
style={{
gap: "2.6em",
}}
>
<NavLink to="/home" className="appBar-text">
<Typography
variant="subtitle1"
fontWeight={600}
>
Home
</Typography>
</NavLink>
<Typography
ref={librariesText}
variant="subtitle1"
fontWeight={600}
onMouseEnter={popoverEnter}
onFocus={popoverEnter}
tabIndex={0}
className={
isBrowsingLibrary
? "appBar-text active"
: "appBar-text"
}
// onMouseLeave={popoverLeave}
>
Libraries
</Typography>
<Menu
open={Boolean(librariesPopover)}
anchorEl={librariesPopover}
anchorOrigin={{
horizontal: "center",
vertical: "bottom",
}}
transformOrigin={{
horizontal: "center",
vertical: "top",
}}
sx={{
mt: 3,
maxHeight: "72em",
}}
onClose={popoverLeave}
MenuListProps={{
onMouseLeave: popoverLeave,
}}
disableScrollLock
hideBackdrop
>
{libraries.isPending
? "loading..."
: libraries.data.Items.map(
(library) => (
<MenuItem
component={NavLink}
to={
"/library/" +
library.Id
}
key={library.Id}
// onClick={() =>
// navigate(
// `/library/${library.Id}`,
// )
// }
tabIndex={0}
className="appBar-library"
>
<ListItemIcon>
{getTypeIcon(
library.CollectionType,
)}
</ListItemIcon>
{library.Name}
</MenuItem>
),
)}
</Menu>
</div>
<div
className="flex flex-row"
style={{ justifySelf: "right", gap: "0.6em" }}
>
<IconButton onClick={() => navigate("/search")}>
<div className="material-symbols-rounded">
search
</div>
</IconButton>
<IconButton onClick={() => navigate("/favorite")}>
<div className="material-symbols-rounded">
favorite
</div>
</IconButton>
<IconButton
sx={{ p: 0 }}
onClick={handleMenuOpen}
>
{user.isSuccess &&
(user.data.PrimaryImageTag ==
undefined ? (
<Avatar
className="appBar-avatar"
alt={user.data.Name}
>
<MdiAccount className="appBar-avatar-icon" />
</Avatar>
) : (
<Avatar
className="appBar-avatar"
src={
api.basePath +
"/Users/" +
user.data.Id +
"/Images/Primary"
}
alt={user.data.Name}
>
<MdiAccount className="appBar-avatar-icon" />
</Avatar>
))}
</IconButton>
<Menu
anchorEl={anchorEl}
open={openMenu}
onClose={handleMenuClose}
sx={{ mt: 2 }}
disableScrollLock
>
<MenuItem
onClick={() => navigate("/settings")}
disabled
>
<ListItemIcon>
<div className="material-symbols-rounded">
settings
</div>
</ListItemIcon>
Settings
</MenuItem>
<MenuItem onClick={() => navigate("/about")}>
<ListItemIcon>
<div className="material-symbols-rounded">
info
</div>
</ListItemIcon>
About
</MenuItem>
<MenuItem onClick={handleLogout}>
<ListItemIcon>
<div className="material-symbols-rounded">
logout
</div>
</ListItemIcon>
Logout
</MenuItem>
<MenuItem
onClick={async () => {
navigate("/servers/list");
}}
>
<ListItemIcon>
<div className="material-symbols-rounded appBar-icon">
dns
</div>
</ListItemIcon>
Select Server
</MenuItem>
</Menu>
</div>
</Toolbar> </Toolbar>
</MuiAppBar> </MuiAppBar>
); );
+49 -3
View File
@@ -1,9 +1,6 @@
/** @format */ /** @format */
.appBar { .appBar {
top: 8px !important;
right: 8px !important;
border-radius: 10000px;
transition: background-color $transition-time-fast, transition: background-color $transition-time-fast,
backdrop-filter $transition-time-fast, backdrop-filter $transition-time-fast,
box-shadow $transition-time-default !important; box-shadow $transition-time-default !important;
@@ -20,6 +17,55 @@
&-logo { &-logo {
height: 1.8em !important; height: 1.8em !important;
} }
&-text {
cursor: default;
opacity: 0.7;
transition: opacity $transition-time-fast;
position: relative;
color: white;
text-decoration: none;
&::after {
content: "";
width: 100%;
height: 1.2px;
background: white;
opacity: 0.7;
position: absolute;
bottom: -2.6px;
left: 0;
transform: scaleX(0);
transition: transform $transition-time-fast,
background $transition-time-fast,
opacity $transition-time-fast;
}
&:hover {
opacity: 0.8;
&::after {
transform: scaleX(0.5);
opacity: 0.8;
}
}
&.active {
opacity: 1;
color: $clr-accent-default;
&::after {
transform: scaleX(0.75);
opacity: 1;
background: $clr-accent-default;
}
}
}
&-logo {
width: 20em;
object-fit: contain;
object-position: center;
}
&-library {
transition: all 0.2s;
&.active {
background: $clr-gradient-default;
}
}
} }
.appLoading { .appLoading {
+1
View File
@@ -75,6 +75,7 @@ const LikeButton = ({
opacity: mutation.isPending ? 1 : 0, opacity: mutation.isPending ? 1 : 0,
transition: "opacity 200ms", transition: "opacity 200ms",
}} }}
thickness={2}
/> />
<IconButton <IconButton
onClick={(e) => { onClick={(e) => {
@@ -67,6 +67,7 @@ const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
opacity: mutation.isPending ? 1 : 0, opacity: mutation.isPending ? 1 : 0,
transition: "opacity 200ms", transition: "opacity 200ms",
}} }}
thickness={2}
/> />
<IconButton <IconButton
onClick={(e) => { onClick={(e) => {
+115 -122
View File
@@ -3,22 +3,18 @@ import React from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import MuiCard from "@mui/material/Card";
import CardActionArea from "@mui/material/CardActionArea";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import LinearProgress from "@mui/material/LinearProgress"; import LinearProgress from "@mui/material/LinearProgress";
import { Blurhash } from "react-blurhash";
import { getTypeIcon } from "../utils/iconsCollection"; import { getTypeIcon } from "../utils/iconsCollection";
import "./card.module.scss"; import "./card.module.scss";
import { MdiCheck } from "../icons/mdiCheck";
import LikeButton from "../buttons/likeButton"; import LikeButton from "../buttons/likeButton";
import MarkPlayedButton from "../buttons/markPlayedButton"; import MarkPlayedButton from "../buttons/markPlayedButton";
import PlayButton from "../buttons/playButton"; import PlayButton from "../buttons/playButton";
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client"; import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
import ErrorBoundary from "../errorBoundary";
const cardImageAspectRatios = { const cardImageAspectRatios = {
thumb: 1.777, thumb: 1.777,
@@ -63,7 +59,6 @@ export const Card = ({
cardTitle, cardTitle,
cardCaption, cardCaption,
imageType = "Primary", imageType = "Primary",
imageBlurhash,
cardType, cardType,
queryKey, queryKey,
userId, userId,
@@ -71,7 +66,6 @@ export const Card = ({
hideText, hideText,
onClick, onClick,
disableOverlay = false, disableOverlay = false,
disablePadding,
overrideIcon, overrideIcon,
}) => { }) => {
const [api] = useApi((state) => [state.api]); const [api] = useApi((state) => [state.api]);
@@ -94,47 +88,41 @@ export const Card = ({
tabIndex={0} tabIndex={0}
onClick={onClick ? onClick : defaultOnClick} onClick={onClick ? onClick : defaultOnClick}
> >
<div className="card-box"> <div
<div className="card-image-container"
className="card-image-container" style={{
style={{ aspectRatio: cardImageAspectRatios[cardType],
aspectRatio: cardImageAspectRatios[cardType], }}
}} >
> <ErrorBoundary fallback={<></>}>
{!!item.UserData && ( <div
<> className="card-indicator check"
<div style={{
className="card-indicator check" opacity: item.UserData?.Played ? 1 : 0,
style={{ }}
opacity: item.UserData?.Played >
? 1 <div className="material-symbols-rounded">
: 0, done
}} </div>
> </div>
<div className="material-symbols-rounded"> <div
done className={`card-indicator text`}
</div> style={{
</div> opacity: item.UserData?.UnplayedItemCount
<div ? 1
className={`card-indicator text`} : 0,
style={{ }}
opacity: item.UserData >
?.UnplayedItemCount <Typography
? 1 variant="subtitle2"
: 0, padding="0.1em 0.4em"
}} fontWeight={400}
> >
<Typography {item.UserData?.UnplayedItemCount}
variant="subtitle2" </Typography>
padding="0.1em 0.4em" </div>
fontWeight={400} </ErrorBoundary>
> {/* {!!imageBlurhash && (
{item.UserData?.UnplayedItemCount}
</Typography>
</div>
</>
)}
{/* {!!imageBlurhash && (
<Blurhash <Blurhash
hash={imageBlurhash} hash={imageBlurhash}
width={128} width={128}
@@ -144,40 +132,46 @@ export const Card = ({
className="card-image-blurhash" className="card-image-blurhash"
/> />
)} */} )} */}
<div className="card-image-icon-container"> <div className="card-image-icon-container">
{overrideIcon {overrideIcon
? getTypeIcon(overrideIcon) ? getTypeIcon(overrideIcon)
: getTypeIcon(item.Type)} : getTypeIcon(item.Type)}
</div> </div>
<img <img
src={ src={
overrideIcon == "User" overrideIcon == "User"
? `${api.basePath}/Users/${item.Id}/Images/Primary` ? `${api.basePath}/Users/${item.Id}/Images/Primary`
: api.getItemImageUrl( : api.getItemImageUrl(
seriesId seriesId
? item.SeriesId ? item.SeriesId
: item.AlbumId : item.AlbumId
? item.AlbumId ? item.AlbumId
: item.Id, : item.Id,
imageType, imageType,
{ {
quality: 85, quality: 90,
fillHeight: 462, fillHeight: 226,
fillWidth: 462, fillWidth: Math.floor(
}, 226 /
) cardImageAspectRatios[
} cardType
style={{ ],
height: "100%", ),
width: "100%", },
opacity: 0, )
}} }
loading="lazy" style={{
onLoad={(e) => (e.target.style.opacity = 1)} height: "100%",
className="card-image" width: "100%",
/> opacity: 0,
}}
loading="lazy"
onLoad={(e) => (e.target.style.opacity = 1)}
className="card-image"
/>
<div className="card-overlay">
{!disableOverlay && ( {!disableOverlay && (
<div className="card-overlay"> <>
<PlayButton <PlayButton
itemId={item.Id} itemId={item.Id}
userId={userId} userId={userId}
@@ -217,50 +211,49 @@ export const Card = ({
queryKey={queryKey} queryKey={queryKey}
userId={userId} userId={userId}
/> />
</div> </>
)}
{item.UserData?.PlaybackPositionTicks > 0 && (
<LinearProgress
variant="determinate"
value={item.UserData?.PlayedPercentage}
style={{
position: "absolute",
left: 0,
right: 0,
bottom: 0,
zIndex: 2,
height: "6px",
background:
"rgb(5 5 5 / 0.5) !important",
backdropFilter: "blur(5px)",
}}
color="primary"
/>
)} )}
</div> </div>
<div {item.UserData?.PlaybackPositionTicks > 0 && (
className="card-text-container" <LinearProgress
style={{ display: hideText ? "none" : "block" }} variant="determinate"
value={item.UserData?.PlayedPercentage}
style={{
position: "absolute",
left: 0,
right: 0,
bottom: 0,
zIndex: 2,
height: "6px",
background: "rgb(5 5 5 / 0.5) !important",
backdropFilter: "blur(5px)",
}}
color="primary"
/>
)}
</div>
<div
className="card-text-container"
style={{ display: hideText ? "none" : "block" }}
>
<Typography
variant="subtitle1"
fontWeight={500}
noWrap
textAlign="center"
style={{ opacity: 0.9 }}
> >
<Typography {cardTitle}
variant="subtitle1" </Typography>
fontWeight={500} <Typography
noWrap variant="subtitle2"
textAlign="center" noWrap
style={{ opacity: 0.9 }} textAlign="center"
> style={{ opacity: 0.6 }}
{cardTitle} lineHeight="auto"
</Typography> >
<Typography {cardCaption}
variant="subtitle2" </Typography>
noWrap
textAlign="center"
style={{ opacity: 0.6 }}
lineHeight="auto"
>
{cardCaption}
</Typography>
</div>
</div> </div>
</div> </div>
); );
+1 -8
View File
@@ -61,7 +61,6 @@
left: 0; left: 0;
width: 100% !important; width: 100% !important;
height: 100% !important; height: 100% !important;
border-radius: 8px;
overflow: hidden; overflow: hidden;
} }
} }
@@ -78,17 +77,11 @@
align-items: flex-end; align-items: flex-end;
justify-content: flex-end; justify-content: flex-end;
padding: 0.5em; padding: 0.5em;
border-radius: 8px; background: rgb(0 0 0 / 0.4);
} }
&:hover, &:hover,
&:focus, &:focus,
&:focus-within { &:focus-within {
.card-image {
filter: brightness(0.6);
}
.card-image-icon-container {
filter: brightness(0.6);
}
.card-overlay { .card-overlay {
opacity: 1; opacity: 1;
} }
+11 -5
View File
@@ -32,23 +32,29 @@ export const CardScroller = ({
partialVisibilityGutter: 40, partialVisibilityGutter: 40,
}, },
desktop: { desktop: {
breakpoint: { max: 3000, min: 625 }, breakpoint: { max: 3000, min: 925 },
items: displayCards, items: displayCards,
slidesToSlide: displayCards, // optional, default to 1. slidesToSlide: displayCards, // optional, default to 1.
partialVisibilityGutter: 30, partialVisibilityGutter: 30,
}, },
tablet: { tablet: {
breakpoint: { max: 624, min: 464 }, breakpoint: { max: 925, min: 600 },
items: displayCards - 2, items: displayCards - 3,
slidesToSlide: displayCards - 2, // optional, default to 1. slidesToSlide: displayCards - 3, // optional, default to 1.
partialVisibilityGutter: 20, partialVisibilityGutter: 20,
}, },
mobile: { mobile: {
breakpoint: { max: 464, min: 0 }, breakpoint: { max: 600, min: 424 },
items: displayCards - 5, items: displayCards - 5,
slidesToSlide: displayCards - 5, // optional, default to 1. slidesToSlide: displayCards - 5, // optional, default to 1.
partialVisibilityGutter: 10, partialVisibilityGutter: 10,
}, },
smallScreen: {
breakpoint: { max: 424, min: 0 },
items: 1,
slidesToSlide: 1, // optional, default to 1.
partialVisibilityGutter: 10,
},
}; };
const [carouselRef, setCarouselRef] = useState(); const [carouselRef, setCarouselRef] = useState();
+9 -7
View File
@@ -2,7 +2,8 @@
.carousel { .carousel {
position: relative; position: relative;
height: 100vh; height: 70vh;
margin: 4.4em 1.6em 1.6em 1.6em;
&-button { &-button {
position: absolute !important; position: absolute !important;
top: 50%; top: 50%;
@@ -12,25 +13,25 @@
right: 0.5em; right: 0.5em;
} }
&.left { &.left {
left: 0; left: 0.5em;
} }
} }
&-indicator { &-indicator {
height: 2px; height: 3px;
width: 100%; width: 100%;
border-radius: 10px; border-radius: 10px;
transition: background $transition-time-fast, transition: background $transition-time-fast,
height $transition-time-fast; height $transition-time-fast;
background: rgb(255 255 255 / 0.5);
&:hover { &:hover {
cursor: pointer; cursor: pointer;
height: 5px; height: 6px;
background: rgb(255 255 255 / 0.8) !important; background: rgb(255 255 255 / 0.8) !important;
} }
&-container { &-container {
display: flex; display: flex;
position: absolute; position: absolute;
bottom: 1em; bottom: -1em;
width: calc(100vw - 8em);
left: 1em; left: 1em;
right: 1em; right: 1em;
gap: 1em; gap: 1em;
@@ -38,7 +39,8 @@
justify-content: center; justify-content: center;
} }
&.active { &.active {
height: 5px; height: 6px;
background: white !important;
} }
} }
} }
+12 -12
View File
@@ -30,6 +30,10 @@ const Carousel = ({ content, onChange }) => {
<IconButton <IconButton
className="carousel-button left" className="carousel-button left"
onClick={() => { onClick={() => {
if (currentSlide == 0) {
setDirection("left");
setCurrentSlide(content.length - 1);
}
if (currentSlide > 0) { if (currentSlide > 0) {
setDirection("left"); setDirection("left");
setCurrentSlide((init) => init - 1); setCurrentSlide((init) => init - 1);
@@ -38,7 +42,7 @@ const Carousel = ({ content, onChange }) => {
sx={{ sx={{
background: " rgb(200 200 200 / 0.05)", background: " rgb(200 200 200 / 0.05)",
}} }}
disabled={currentSlide == 0} // disabled={currentSlide == 0}
> >
<div className="material-symbols-rounded">arrow_left</div> <div className="material-symbols-rounded">arrow_left</div>
</IconButton> </IconButton>
@@ -50,7 +54,6 @@ const Carousel = ({ content, onChange }) => {
exit={{ opacity: 0 }} exit={{ opacity: 0 }}
transition={{ transition={{
duration: 0.25, duration: 0.25,
ease: "easeInOut",
}} }}
drag={"x"} drag={"x"}
dragConstraints={{ left: 0, right: 0 }} dragConstraints={{ left: 0, right: 0 }}
@@ -72,8 +75,8 @@ const Carousel = ({ content, onChange }) => {
} }
}} }}
style={{ style={{
height: "100vh", height: "100%",
width: "100vw", width: "100%",
position: "absolute", position: "absolute",
}} }}
> >
@@ -83,12 +86,15 @@ const Carousel = ({ content, onChange }) => {
<IconButton <IconButton
className="carousel-button right" className="carousel-button right"
onClick={() => { onClick={() => {
if (currentSlide < content.length - 1) { if (currentSlide == content.length - 1) {
setDirection("right");
setCurrentSlide(0);
} else if (currentSlide < content.length - 1) {
setDirection("right"); setDirection("right");
setCurrentSlide((init) => init + 1); setCurrentSlide((init) => init + 1);
} }
}} }}
disabled={currentSlide == content.length - 1} // disabled={currentSlide == content.length - 1}
sx={{ sx={{
background: " rgb(200 200 200 / 0.05)", background: " rgb(200 200 200 / 0.05)",
}} }}
@@ -104,12 +110,6 @@ const Carousel = ({ content, onChange }) => {
: "carousel-indicator" : "carousel-indicator"
} }
key={index} key={index}
style={{
background:
currentSlide == index
? "white"
: "rgb(255 255 255 / 0.5)",
}}
onClick={() => { onClick={() => {
if (currentSlide > index) { if (currentSlide > index) {
setDirection("left"); setDirection("left");
+178 -70
View File
@@ -20,6 +20,7 @@ import { useNavigate } from "react-router-dom";
import { MediaTypeIconCollection, getTypeIcon } from "../utils/iconsCollection"; import { MediaTypeIconCollection, getTypeIcon } from "../utils/iconsCollection";
import { MdiChevronRight } from "../icons/mdiChevronRight"; import { MdiChevronRight } from "../icons/mdiChevronRight";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";
import { red } from "@mui/material/colors";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api"; import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import LikeButton from "../buttons/likeButton"; import LikeButton from "../buttons/likeButton";
@@ -79,8 +80,8 @@ const CarouselSlide = ({ item }) => {
sx={{ sx={{
background: "transparent", background: "transparent",
px: 3, px: 3,
boxShadow: "none !important",
}} }}
elevation={6}
> >
<div className="hero-carousel-background-container"> <div className="hero-carousel-background-container">
{!!item.ImageBlurHashes.Backdrop && ( {!!item.ImageBlurHashes.Backdrop && (
@@ -97,8 +98,8 @@ const CarouselSlide = ({ item }) => {
] ]
} }
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj" // hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
width="1080" width="108"
height="720" height="72"
resolutionX={64} resolutionX={64}
resolutionY={96} resolutionY={96}
className="hero-carousel-background-blurhash" className="hero-carousel-background-blurhash"
@@ -127,37 +128,61 @@ const CarouselSlide = ({ item }) => {
</div> </div>
</div> </div>
<motion.div <motion.div
initial={{ // initial={{
transform: // transform:
animationDirection == "right" // animationDirection == "right"
? "translateX(60px)" // ? "translateX(60px)"
: "translateX(-60px)", // : "translateX(-60px)",
opacity: 0, // opacity: 0,
}} // }}
animate={{ // animate={{
transform: "translateX(0px)", // transform: "translateX(0px)",
opacity: 1, // opacity: 1,
}} // }}
exit={{ // exit={{
transform: // transform:
animationDirection == "right" // animationDirection == "right"
? "translateX(-60px)" // ? "translateX(-60px)"
: "translateX(60px)", // : "translateX(60px)",
opacity: 0, // opacity: 0,
}} // }}
transition={{ // transition={{
duration: 0.25, // duration: 0.25,
ease: "easeInOut", // ease: "easeInOut",
}} // }}
className="hero-carousel-detail" className="hero-carousel-detail"
> >
<Typography <Typography
component={motion.div}
initial={{
transform:
animationDirection == "right"
? "translateX(60px)"
: "translateX(-60px)",
opacity: 0,
}}
animate={{
transform: "translateX(0px)",
opacity: 1,
}}
exit={{
transform:
animationDirection == "right"
? "translateX(-60px)"
: "translateX(60px)",
opacity: 0,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
key={item.Id} key={item.Id}
variant="h2" variant="h2"
className="hero-carousel-text" className="hero-carousel-text"
sx={{ sx={{
mb: 2.5, mb: "5px",
}} }}
overflow="visible" overflow="visible"
> >
@@ -170,12 +195,13 @@ const CarouselSlide = ({ item }) => {
api.basePath + api.basePath +
"/Items/" + "/Items/" +
item.Id + item.Id +
"/Images/Logo?quality=80&tag=" + "/Images/Logo?quality=90&tag=" +
item.ImageTags.Logo item.ImageTags.Logo
} }
style={{ style={{
opacity: 0, opacity: 0,
transition: "opacity 0.2s", transition: "opacity 0.2s",
objectFit: "contain",
}} }}
onLoad={(e) => onLoad={(e) =>
(e.target.style.opacity = 1) (e.target.style.opacity = 1)
@@ -184,23 +210,41 @@ const CarouselSlide = ({ item }) => {
)} )}
</Typography> </Typography>
<Stack <Stack
component={motion.div}
initial={{
transform:
animationDirection == "right"
? "translateX(20px)"
: "translateX(-20px)",
opacity: 0,
}}
animate={{
transform: "translateX(0px)",
opacity: 1,
}}
exit={{
transform:
animationDirection == "right"
? "translateX(-20px)"
: "translateX(20px)",
opacity: 0,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
direction="row" direction="row"
gap={1} gap={2}
divider={
<div
style={{
width: "4px",
height: "4px",
background: "white",
alignSelf: "center",
aspectRatio: 1,
borderRadius: "10px",
}}
></div>
}
className="hero-carousel-info" className="hero-carousel-info"
mt={1}
justifyItems="flex-start"
alignItems="center"
> >
<Typography variant="subtitle1"> <Typography
style={{ opacity: "0.8" }}
variant="subtitle1"
>
{item.ProductionYear {item.ProductionYear
? item.ProductionYear ? item.ProductionYear
: "Unknown"} : "Unknown"}
@@ -209,46 +253,110 @@ const CarouselSlide = ({ item }) => {
variant="filled" variant="filled"
label={item.OfficialRating ?? "Not Rated"} label={item.OfficialRating ?? "Not Rated"}
/> />
<div <ErrorBoundary fallback={<></>}>
style={{ <div
display: "flex", style={{
gap: "0.25em", display: "flex",
alignItems: "center", gap: "0.25em",
}} alignItems: "center",
className="hero-carousel-info-rating" }}
> className="hero-carousel-info-rating"
{item.CommunityRating ? ( >
<> <div
<MdiStar className="material-symbols-rounded "
sx={{ style={{
color: yellow[700], // fontSize: "2.2em",
}} color: yellow[400],
/> fontVariationSettings:
<Typography variant="subtitle1"> '"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
{Math.round( }}
item.CommunityRating * >
10, star
) / 10} </div>
</Typography> <Typography
</> style={{
) : ( opacity: "0.8",
<Typography variant="subtitle1"> }}
No Community Rating variant="subtitle1"
>
{Math.round(
item.CommunityRating * 10,
) / 10}
</Typography> </Typography>
)} </div>
</div> </ErrorBoundary>
{Boolean(item.CriticRating) && (
<div
style={{
display: "flex",
gap: "0.25em",
alignItems: "center",
}}
className="hero-carousel-info-rating"
>
<div
className="material-symbols-rounded "
style={{
color: red[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}}
>
thumb_up
</div>
<Typography
style={{
opacity: "0.8",
}}
variant="subtitle1"
>
{item.CriticRating}
</Typography>
</div>
)}
{!!item.RunTimeTicks && ( {!!item.RunTimeTicks && (
<Typography variant="subtitle1"> <Typography
style={{ opacity: "0.8" }}
variant="subtitle1"
>
{getRuntime(item.RunTimeTicks)} {getRuntime(item.RunTimeTicks)}
</Typography> </Typography>
)} )}
{!!item.RunTimeTicks && ( {!!item.RunTimeTicks && (
<Typography variant="subtitle1"> <Typography
style={{ opacity: "0.8" }}
variant="subtitle1"
>
{endsAt(item.RunTimeTicks)} {endsAt(item.RunTimeTicks)}
</Typography> </Typography>
)} )}
</Stack> </Stack>
<Typography <Typography
component={motion.div}
initial={{
transform:
animationDirection == "right"
? "translateX(20px)"
: "translateX(-20px)",
opacity: 0,
}}
animate={{
transform: "translateX(0px)",
opacity: 1,
}}
exit={{
transform:
animationDirection == "right"
? "translateX(-20px)"
: "translateX(20px)",
opacity: 0,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
variant="subtitle1" variant="subtitle1"
className="hero-carousel-text" className="hero-carousel-text"
sx={{ sx={{
+1
View File
@@ -17,6 +17,7 @@ class ErrorBoundary extends React.Component {
// in ErrorBoundary (created by App) // in ErrorBoundary (created by App)
// in div (created by App) // in div (created by App)
// in App // in App
this.setState;
console.error(`Err in ${info} - ${error}`); console.error(`Err in ${info} - ${error}`);
} }
+62 -35
View File
@@ -13,8 +13,7 @@ import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client/models/base-ite
import { MediaStreamType } from "@jellyfin/sdk/lib/generated-client/models/media-stream-type"; import { MediaStreamType } from "@jellyfin/sdk/lib/generated-client/models/media-stream-type";
import { Card } from "../../card/card"; import { Card } from "../../card/card";
import { MdiStar } from "../../icons/mdiStar"; import { yellow, red } from "@mui/material/colors";
import { yellow } from "@mui/material/colors";
import { endsAt, getRuntime, getRuntimeFull } from "../../../utils/date/time"; import { endsAt, getRuntime, getRuntimeFull } from "../../../utils/date/time";
import LikeButton from "../../buttons/likeButton"; import LikeButton from "../../buttons/likeButton";
import MarkPlayedButton from "../../buttons/markPlayedButton"; import MarkPlayedButton from "../../buttons/markPlayedButton";
@@ -25,6 +24,7 @@ import { Blurhash } from "react-blurhash";
import TextLink from "../../textLink"; import TextLink from "../../textLink";
import { useApi } from "../../../utils/store/api"; import { useApi } from "../../../utils/store/api";
import { ErrorBoundary } from "react-error-boundary";
/** /**
* @typedef {Object} Props * @typedef {Object} Props
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item * @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
@@ -327,7 +327,7 @@ const Hero = ({
}} }}
/> />
)} )}
{!!videoTracks[0].VideoRangeType && ( {!!videoTracks[0]?.VideoRangeType && (
<Chip <Chip
variant="filled" variant="filled"
label={ label={
@@ -418,42 +418,69 @@ const Hero = ({
item.OfficialRating ?? "Not Rated" item.OfficialRating ?? "Not Rated"
} }
/> />
<div <ErrorBoundary fallback={<></>}>
style={{ <div
display: "flex", style={{
gap: "0.25em", display: "flex",
alignItems: "center", gap: "0.25em",
}} alignItems: "center",
className="hero-carousel-info-rating" }}
> className="hero-carousel-info-rating"
{item.CommunityRating ? ( >
<> <div
<MdiStar className="material-symbols-rounded "
sx={{ style={{
color: yellow[700], // fontSize: "2.2em",
}} color: yellow[400],
/> fontVariationSettings:
<Typography '"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
style={{ }}
opacity: "0.8", >
}} star
variant="subtitle1" </div>
>
{Math.round(
item.CommunityRating *
10,
) / 10}
</Typography>
</>
) : (
<Typography <Typography
style={{ opacity: "0.8" }} style={{
opacity: "0.8",
}}
variant="subtitle1" variant="subtitle1"
> >
No Community Rating {Math.round(
item.CommunityRating *
10,
) / 10}
</Typography> </Typography>
)} </div>
</div> </ErrorBoundary>
{Boolean(item.CriticRating) && (
<div
style={{
display: "flex",
gap: "0.25em",
alignItems: "center",
}}
className="hero-carousel-info-rating"
>
<div
className="material-symbols-rounded "
style={{
color: red[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}}
>
thumb_up
</div>
<Typography
style={{
opacity: "0.8",
}}
variant="subtitle1"
>
{item.CriticRating}
</Typography>
</div>
)}
{!!item.RunTimeTicks && ( {!!item.RunTimeTicks && (
<Typography <Typography
style={{ opacity: "0.8" }} style={{ opacity: "0.8" }}
+11 -19
View File
@@ -11,26 +11,18 @@ $maskPercentage: 40%;
flex-shrink: 0; flex-shrink: 0;
} }
&-backdrop { &-backdrop {
position: fixed; position: absolute;
background-attachment: fixed; background-attachment: scroll;
width: 100%; width: calc(100vw + 100px);
height: 100vh; height: calc(100vh + 100px);
top: 0; top: -50px;
left: 0; left: -50px;
z-index: -1; z-index: -1;
filter: brightness(0.4); filter: brightness(0.4);
mask-image: linear-gradient( mask-image: linear-gradient(to bottom, black 40%, transparent),
to bottom, linear-gradient(to left, black 40%, transparent);
black $maskPercentage, -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent),
transparent linear-gradient(to left, black 40%, transparent);
),
linear-gradient(to left, black $maskPercentage, transparent);
-webkit-mask-image: linear-gradient(
to bottom,
black $maskPercentage,
transparent
),
linear-gradient(to left, black $maskPercentage, transparent);
mask-composite: source-in; mask-composite: source-in;
-webkit-mask-composite: source-in; -webkit-mask-composite: source-in;
& > * { & > * {
@@ -65,7 +57,7 @@ $maskPercentage: 40%;
&-name-logo { &-name-logo {
width: 10.4em; width: 10.4em;
height: 2.6em; max-height: 2.6em;
object-fit: contain; object-fit: contain;
object-position: left; object-position: left;
opacity: 0; opacity: 0;
+1 -1
View File
@@ -17,7 +17,7 @@ import { getTypeIcon } from "../../components/utils/iconsCollection.jsx";
import "./sidemenu.module.scss"; import "./sidemenu.module.scss";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
import Icon from "../../assets/icon.png"; import Icon from "../../assets/icon.svg";
const DrawerHeader = styled("div")(({ theme }) => ({ const DrawerHeader = styled("div")(({ theme }) => ({
display: "flex", display: "flex",
@@ -1,24 +1,44 @@
/** @format */ /** @format */
import React from "react";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import { MdiEmoticonCry } from "../../icons/mdiEmoticonCry";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import { yellow } from "@mui/material/colors";
export const EmptyNotice = () => { export const EmptyNotice = ({ extraMsg }) => {
return ( return (
<Box <Box
sx={{ sx={{
width: "100%", width: "100%",
height: "100vh", height: "100%",
display: "flex", display: "flex",
justifyContent: "center", justifyContent: "center",
alignItems: "center", alignItems: "center",
flexFlow: "column", flexFlow: "column",
opacity: 0.2, // opacity: 0.2,
}} }}
> >
<MdiEmoticonCry sx={{ fontSize: 200 }} /> <div
<Typography variant="h3">Nothing found</Typography> className="material-symbols-rounded"
style={{
fontSize: "10em",
color: yellow[800],
fontVariationSettings:
'"FILL" 1, "wght" 400, "GRAD" 25, "opsz" 60',
}}
>
sentiment_dissatisfied
</div>
<Typography variant="h4" fontWeight={300}>
No results found
</Typography>
<Typography
variant="subtitle1"
fontWeight={300}
style={{ opacity: 0.5 }}
>
{extraMsg}
</Typography>
</Box> </Box>
); );
}; };
@@ -1,10 +1,12 @@
/** @format */ /** @format */
import React from "react";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import { MdiEmoticonDead } from "../../icons/mdiEmoticonDead"; import Button from "@mui/material/Button";
import { red } from "@mui/material/colors";
export const ErrorNotice = () => { export const ErrorNotice = ({ error, resetErrorBoundary }) => {
console.error(error);
return ( return (
<Box <Box
sx={{ sx={{
@@ -14,11 +16,61 @@ export const ErrorNotice = () => {
justifyContent: "center", justifyContent: "center",
alignItems: "center", alignItems: "center",
flexFlow: "column", flexFlow: "column",
opacity: 0.2, // opacity: 0.2,
}} }}
> >
<MdiEmoticonDead sx={{ fontSize: 200 }} /> <div
<Typography variant="h3">Something went wrong</Typography> className="material-symbols-rounded animate-icon"
style={{
fontSize: "10em",
color: red[800],
"--clr": "rgb(198 40 40 / 30%)",
fontVariationSettings:
'"FILL" 0, "wght" 100, "GRAD" 25, "opsz" 40',
}}
>
error
</div>
<Typography variant="h3" fontWeight={100}>
Something went wrong
</Typography>
<Typography
fontFamily="JetBrains Mono Variable"
fontWeight={100}
variant="h5"
style={{
padding: "0.5em",
background: "rgb(0 0 0 / 1)",
borderRadius: "8px",
border: "2px dashed rgb(255 255 255 / 0.5)",
maxWidth: "40em",
marginTop: "1em",
// opacity: 0.6,
}}
>
{error.message}
</Typography>
<Button
size="large"
variant="contained"
onClick={resetErrorBoundary ? resetErrorBoundary : () => {}}
style={{
marginTop: "1em",
}}
color="info"
>
Close
</Button>
<Typography
variant="subitle1"
fontWeight={300}
style={{
marginTop: "1em",
}}
>
Note: You need to click on CLOSE button if you change the
page in order to close this error message
</Typography>
</Box> </Box>
); );
}; };
@@ -4,13 +4,13 @@
position: fixed; position: fixed;
bottom: 0; bottom: 0;
right: 0; right: 0;
background: $clr-background-dark-opacity-0_8; background: rgb(0 0 0 / 0.6);
z-index: 10; z-index: 10;
display: grid; display: grid;
padding: 1em; padding: 1em;
margin: 1em; // margin: 1em;
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
border-radius: 10px; // border-radius: 10px;
overflow: hidden; overflow: hidden;
gap: 1em; gap: 1em;
box-shadow: 0 0 20px rgb(0 0 0 / 0.25); box-shadow: 0 0 20px rgb(0 0 0 / 0.25);
@@ -212,9 +212,7 @@ const AudioPlayer = () => {
transform: "translateY(100%)", transform: "translateY(100%)",
}} }}
style={{ style={{
width: `calc(100vw - ${theme.spacing( width: `100%`,
13,
)} - 10px)`,
}} }}
transition={{ transition={{
duration: 0.2, duration: 0.2,
+16 -2
View File
@@ -9,6 +9,8 @@ import Paper from "@mui/material/Paper";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { motion } from "framer-motion";
import { import {
BaseItemKind, BaseItemKind,
ItemFields, ItemFields,
@@ -34,6 +36,7 @@ import { useBackdropStore } from "../../utils/store/backdrop";
import LikeButton from "../../components/buttons/likeButton"; import LikeButton from "../../components/buttons/likeButton";
import { useAudioPlayback } from "../../utils/store/audioPlayback"; import { useAudioPlayback } from "../../utils/store/audioPlayback";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
function TabPanel(props) { function TabPanel(props) {
const { children, value, index, ...other } = props; const { children, value, index, ...other } = props;
@@ -179,7 +182,18 @@ const MusicAlbumTitlePage = () => {
} }
if (item.isSuccess && similarItems.isSuccess) { if (item.isSuccess && similarItems.isSuccess) {
return ( return (
<div <motion.div
key={id}
initial={{
opacity: 0,
}}
animate={{
opacity: 1,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
className="scrollY" className="scrollY"
style={{ style={{
padding: "5em 2em 2em 1em", padding: "5em 2em 2em 1em",
@@ -418,7 +432,7 @@ const MusicAlbumTitlePage = () => {
})} })}
</CardScroller> </CardScroller>
)} )}
</div> </motion.div>
); );
} }
if (item.isError || similarItems.isError) { if (item.isError || similarItems.isError) {
+14 -2
View File
@@ -32,6 +32,7 @@ import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
import { useBackdropStore } from "../../utils/store/backdrop"; import { useBackdropStore } from "../../utils/store/backdrop";
import MusicTrack from "../../components/musicTrack"; import MusicTrack from "../../components/musicTrack";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
function TabPanel(props) { function TabPanel(props) {
const { children, value, index, ...other } = props; const { children, value, index, ...other } = props;
@@ -197,7 +198,18 @@ const ArtistTitlePage = () => {
} }
if (item.isSuccess) { if (item.isSuccess) {
return ( return (
<div <motion.div
key={id}
initial={{
opacity: 0,
}}
animate={{
opacity: 1,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
className="scrollY" className="scrollY"
style={{ style={{
padding: "5em 2em 2em 1em", padding: "5em 2em 2em 1em",
@@ -401,7 +413,7 @@ const ArtistTitlePage = () => {
</TabPanel> </TabPanel>
</AnimatePresence> </AnimatePresence>
</div> </div>
</div> </motion.div>
); );
} }
if (item.isError) { if (item.isError) {
+15 -2
View File
@@ -6,6 +6,8 @@ import Box from "@mui/material/Box";
import CircularProgress from "@mui/material/CircularProgress"; import CircularProgress from "@mui/material/CircularProgress";
import { useParams, useNavigate } from "react-router-dom"; import { useParams, useNavigate } from "react-router-dom";
import { motion } from "framer-motion";
import { import {
BaseItemKind, BaseItemKind,
ItemFields, ItemFields,
@@ -149,7 +151,18 @@ const BoxSetTitlePage = () => {
} }
if (item.isSuccess && similarItems.isSuccess) { if (item.isSuccess && similarItems.isSuccess) {
return ( return (
<div <motion.div
key={id}
initial={{
opacity: 0,
}}
animate={{
opacity: 1,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
className="scrollY" className="scrollY"
style={{ style={{
padding: "5em 2em 2em 1em", padding: "5em 2em 2em 1em",
@@ -312,7 +325,7 @@ const BoxSetTitlePage = () => {
})} })}
</CardScroller> </CardScroller>
)} )}
</div> </motion.div>
); );
} }
if (item.isError || similarItems.isError) { if (item.isError || similarItems.isError) {
+16 -2
View File
@@ -7,6 +7,8 @@ import CircularProgress from "@mui/material/CircularProgress";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { motion } from "framer-motion";
import { import {
BaseItemKind, BaseItemKind,
ItemFields, ItemFields,
@@ -27,6 +29,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
import { useBackdropStore } from "../../utils/store/backdrop"; import { useBackdropStore } from "../../utils/store/backdrop";
import { ActorCard } from "../../components/card/actorCards"; import { ActorCard } from "../../components/card/actorCards";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
function TabPanel(props) { function TabPanel(props) {
const { children, value, index, ...other } = props; const { children, value, index, ...other } = props;
@@ -175,7 +178,18 @@ const EpisodeTitlePage = () => {
} }
if (item.isSuccess) { if (item.isSuccess) {
return ( return (
<div <motion.div
key={id}
initial={{
opacity: 0,
}}
animate={{
opacity: 1,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
className="scrollY episode" className="scrollY episode"
style={{ style={{
padding: "5em 2em 2em 1em", padding: "5em 2em 2em 1em",
@@ -270,7 +284,7 @@ const EpisodeTitlePage = () => {
)} )}
</CardScroller> </CardScroller>
)} )}
</div> </motion.div>
); );
} }
if (item.isError) { if (item.isError) {
+21 -37
View File
@@ -1,20 +1,4 @@
/** @format */ /** @format */
.home {
&-background {
&-container {
position: fixed !important;
width: 100vw;
height: 100vh;
}
}
&-backdrop {
width: 100vw;
height: 100vh;
& > * {
all: inherit;
}
}
}
.hero-carousel { .hero-carousel {
position: relative; position: relative;
@@ -23,9 +7,11 @@
&-slide { &-slide {
position: relative; position: relative;
height: 100%; height: 100%;
border-radius: 0px !important; width: 100%;
border-radius: 10px !important;
overflow: hidden; overflow: hidden;
margin: 0 auto; margin: 0 auto;
// box-shadow: 0 0 40px red;
} }
&-background { &-background {
&-blurhash { &-blurhash {
@@ -33,7 +19,7 @@
height: 100%; height: 100%;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
filter: brightness(0.7); filter: brightness(0.4);
} }
&-container { &-container {
position: absolute; position: absolute;
@@ -42,17 +28,7 @@
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
opacity: 0.8; filter: brightness(0.7);
mask-image: linear-gradient(to bottom, black 40%, transparent),
linear-gradient(to left, black 40%, transparent);
-webkit-mask-image: linear-gradient(
to bottom,
black 40%,
transparent
),
linear-gradient(to left, black 40%, transparent);
mask-composite: source-in;
-webkit-mask-composite: source-in;
} }
&-image { &-image {
position: absolute; position: absolute;
@@ -67,23 +43,32 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
transition: opacity 0.5s; transition: opacity 0.5s;
mask-image: linear-gradient(to bottom, black 10%, transparent);
-webkit-mask-image: linear-gradient(
to left,
black 40%,
transparent 90%
);
} }
&-icon-container { &-icon-container {
position: absolute; position: absolute;
background: $clr-gradient-dark; // background: $clr-gradient-dark;
// background: url("/public/assetsStatic//meshbackground.png"); background: url("/src/assets/herobg.png"), rgb(0 0 0 /0.3);
z-index: 0; z-index: 0;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background-blend-mode: overlay;
.material-symbols-rounded { .material-symbols-rounded {
position: absolute; position: absolute;
font-size: 15em !important; font-size: 15em !important;
left: 70%; left: 80%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 50,
"opsz" 60;
} }
} }
} }
@@ -94,7 +79,7 @@
margin-bottom: 0.5em; margin-bottom: 0.5em;
&-logo { &-logo {
max-width: 9em; max-width: 9em;
height: 3em; max-height: 3em;
object-fit: contain; object-fit: contain;
object-position: bottom; object-position: bottom;
} }
@@ -105,15 +90,14 @@
display: flex; display: flex;
height: 100%; height: 100%;
width: 80%; width: 80%;
padding: 2em; padding: 2.5em;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: center;
align-items: flex-start; align-items: flex-start;
padding-bottom: 5em;
} }
&-indicator { &-indicator {
&-container { &-container {
width: calc(100% - 2em) !important; // width: calc(100% - 2em) !important;
margin-top: -1em !important; margin-top: -1em !important;
margin-left: 1em !important; margin-left: 1em !important;
margin-right: 1em !important; margin-right: 1em !important;
+4 -1
View File
@@ -31,6 +31,7 @@ import ErrorBoundary from "../../components/errorBoundary";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import CarouselSlideError from "../../components/errors/carousel"; import CarouselSlideError from "../../components/errors/carousel";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
import { useSnackbar } from "notistack";
const Home = () => { const Home = () => {
const [api] = useApi((state) => [state.api]); const [api] = useApi((state) => [state.api]);
@@ -212,8 +213,10 @@ const Home = () => {
<div <div
className="padded-container" className="padded-container"
style={{ style={{
padding: "1em", padding: "1.6em",
scrollPadding: "4.4em",
}} }}
id="libraries"
> >
<ErrorBoundary <ErrorBoundary
fallback={ fallback={
+17 -2
View File
@@ -7,6 +7,8 @@ import CircularProgress from "@mui/material/CircularProgress";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { motion, AnimatePresence } from "framer-motion";
import { import {
BaseItemKind, BaseItemKind,
ItemFields, ItemFields,
@@ -29,6 +31,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
import { useBackdropStore } from "../../utils/store/backdrop"; import { useBackdropStore } from "../../utils/store/backdrop";
import { ActorCard } from "../../components/card/actorCards"; import { ActorCard } from "../../components/card/actorCards";
import { useApi } from "../../utils/store/api"; import { useApi } from "../../utils/store/api";
function TabPanel(props) { function TabPanel(props) {
const { children, value, index, ...other } = props; const { children, value, index, ...other } = props;
@@ -200,9 +203,21 @@ const ItemDetail = () => {
</Box> </Box>
); );
} }
if (item.isSuccess && similarItems.isSuccess) { if (item.isSuccess && similarItems.isSuccess) {
return ( return (
<div <motion.div
key={id}
initial={{
opacity: 0,
}}
animate={{
opacity: 1,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
className="scrollY" className="scrollY"
style={{ style={{
padding: "5em 2em 2em 1em", padding: "5em 2em 2em 1em",
@@ -320,7 +335,7 @@ const ItemDetail = () => {
})} })}
</CardScroller> </CardScroller>
)} )}
</div> </motion.div>
); );
} }
if (item.isError || similarItems.isError) { if (item.isError || similarItems.isError) {
+3 -2
View File
@@ -369,7 +369,7 @@ const LibraryView = () => {
); );
} else if (currentLib.isSuccess) { } else if (currentLib.isSuccess) {
return ( return (
<main className="scrollY library"> <main className="scrollY library padded-top">
<div <div
style={{ style={{
padding: "1em 1em 1em 0.6em", padding: "1em 1em 1em 0.6em",
@@ -378,7 +378,7 @@ const LibraryView = () => {
zIndex: 10, zIndex: 10,
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "center", justifyContent: "flex-start",
}} }}
> >
<div <div
@@ -386,6 +386,7 @@ const LibraryView = () => {
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
width: "fit-content", width: "fit-content",
padding: "0 1em",
}} }}
> >
<Typography <Typography
+4 -5
View File
@@ -36,7 +36,8 @@
} }
.library { .library {
padding: 0 !important; padding-left: 0 !important;
padding-right: 0 !important;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -48,12 +49,10 @@
align-items: start; align-items: start;
} }
&-items { &-items {
height: calc(100vh - 4em); height: calc(100vh - 8.4em);
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
padding-bottom: 1em; padding: 1.5em 1em;
padding-right: 1em;
padding-top: 4.5em;
&-header { &-header {
position: absolute; position: absolute;
top: 4.4em; top: 4.4em;
+13 -2
View File
@@ -267,7 +267,18 @@ const PersonTitlePage = () => {
} }
if (item.isSuccess) { if (item.isSuccess) {
return ( return (
<div <motion.div
key={id}
initial={{
opacity: 0,
}}
animate={{
opacity: 1,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
className="scrollY" className="scrollY"
style={{ style={{
padding: "5em 2em 2em 1em", padding: "5em 2em 2em 1em",
@@ -446,7 +457,7 @@ const PersonTitlePage = () => {
})} })}
</AnimatePresence> </AnimatePresence>
</div> </div>
</div> </motion.div>
); );
} }
if (item.isError) { if (item.isError) {
+27 -1
View File
@@ -12,7 +12,7 @@ import { MdiMagnify } from "../../components/icons/mdiMagnify";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api"; import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import { getSearchApi } from "@jellyfin/sdk/lib/utils/api/search-api"; import { EmptyNotice } from "../../components/notices/emptyNotice/emptyNotice";
import useDebounce from "../../utils/hooks/useDebounce"; import useDebounce from "../../utils/hooks/useDebounce";
@@ -179,6 +179,7 @@ const SearchPage = () => {
style: { style: {
border: "100px !important", border: "100px !important",
}, },
autoFocus: true,
startAdornment: ( startAdornment: (
<InputAdornment position="start"> <InputAdornment position="start">
<div <div
@@ -479,6 +480,31 @@ const SearchPage = () => {
</CardScroller> </CardScroller>
)} )}
</div> </div>
{movies.isSuccess &&
series.isSuccess &&
audio.isSuccess &&
musicAlbum.isSuccess &&
book.isSuccess &&
musicArtists.isSuccess &&
person.isSuccess &&
movies.data.Items.length == 0 &&
series.data.Items.length == 0 &&
audio.data.Items.length == 0 &&
musicAlbum.data.Items.length == 0 &&
book.data.Items.length == 0 &&
musicArtists.data.Items.length == 0 &&
person.data.Items.length == 0 && (
<div
style={{
height: "calc(100vh - 12em)",
}}
>
<EmptyNotice
extraMsg={"Try using different terms."}
/>
</div>
)}
</div> </div>
); );
}; };
+14 -3
View File
@@ -117,7 +117,7 @@ const SeriesTitlePage = () => {
const result = await getTvShowsApi(api).getSeasons({ const result = await getTvShowsApi(api).getSeasons({
userId: user.data.Id, userId: user.data.Id,
seriesId: item.data.Id, seriesId: item.data.Id,
isSpecialSeason: false, // isSpecialSeason: false,
}); });
return result.data; return result.data;
}, },
@@ -228,7 +228,18 @@ const SeriesTitlePage = () => {
} }
if (item.isSuccess && similarItems.isSuccess) { if (item.isSuccess && similarItems.isSuccess) {
return ( return (
<div <motion.div
key={id}
initial={{
opacity: 0,
}}
animate={{
opacity: 1,
}}
transition={{
duration: 0.25,
ease: "easeInOut",
}}
className="scrollY" className="scrollY"
style={{ style={{
padding: "5em 2em 2em 1em", padding: "5em 2em 2em 1em",
@@ -633,7 +644,7 @@ const SeriesTitlePage = () => {
})} })}
</CardScroller> </CardScroller>
)} )}
</div> </motion.div>
); );
} }
if (item.isError || similarItems.isError) { if (item.isError || similarItems.isError) {
+51 -5
View File
@@ -47,9 +47,9 @@ body {
width: calc(100% + 100px); width: calc(100% + 100px);
height: calc(100% + 100px); height: calc(100% + 100px);
position: absolute; position: absolute;
top: -100px; top: -50px;
left: -100px; left: -50px;
z-index: -1; z-index: -2;
filter: blur(120px) saturate(130%) contrast(140%); filter: blur(120px) saturate(130%) contrast(140%);
&-container { &-container {
position: fixed; position: fixed;
@@ -57,6 +57,8 @@ body {
height: 100vh; height: 100vh;
left: 0; left: 0;
top: 0; top: 0;
z-index: -1;
filter: brightness(0.4);
} }
} }
@@ -121,8 +123,10 @@ h1 {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
min-height: 100vh; min-height: 100vh;
padding-left: 1em; padding: 0 1.6em;
padding-right: calc(1em + 14px); &.padded-top {
padding-top: 4.4em;
}
} }
.home { .home {
@@ -167,3 +171,45 @@ h1 {
.MuiListItemIcon-root { .MuiListItemIcon-root {
font-size: 24px; font-size: 24px;
} }
.animate-icon {
position: relative;
&::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(1);
width: 100%;
height: 100%;
border-radius: 100%;
opacity: 0;
// filter: blur(10px);
animation: iconAnimation ease-out 1s infinite;
background: var(--clr);
z-index: -1;
// background: radial-gradient(transparent, var(--clr));
}
}
@keyframes iconAnimation {
0% {
opacity: 1;
transform: translate(-50%, -50%) scale(0);
}
100% {
opacity: 0;
transform: translate(-50%, -50%) scale(4);
}
}
.flex {
display: flex;
&-row {
flex-direction: row;
}
&-center {
align-items: center;
justify-content: center;
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ $clr-background-default: hsl(256, 100%, 6%);
$clr-background-opacity-0_5: hsl(256, 100%, 6%, 50%); $clr-background-opacity-0_5: hsl(256, 100%, 6%, 50%);
$clr-background-dark: hsl(256, 100%, 4%); $clr-background-dark: hsl(256, 100%, 4%);
$clr-background-dark-opacity-0_8: hsl(256, 100%, 4%, 80%); $clr-background-dark-opacity-0_8: hsl(256, 100%, 4%, 94%);
$clr-background-light: hsl(256, 100%, 16%); $clr-background-light: hsl(256, 100%, 16%);
$clr-gradient-default: linear-gradient( $clr-gradient-default: linear-gradient(
+16
View File
@@ -49,5 +49,21 @@ export const theme = createTheme({
}, },
}, },
}, },
MuiPaper: {
styleOverrides: {
root: {},
},
},
MuiMenu: {
styleOverrides: {
paper: {
borderRadius: "10px",
// boxShadow: "0 0 5px hsl(273, 100%, 36%)",
background: "hsl(256, 100%, 2%, 40%)",
backdropFilter: "blur(20px)",
// border: "1.8px solid hsl(273, 100%, 36%)",
},
},
},
}, },
}); });