Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dc71b4c8b | ||
|
|
a31a8920e9 | ||
|
|
da524107f0 | ||
|
|
e397d0cf58 | ||
|
|
65db12192f | ||
|
|
b2d1154354 | ||
|
|
99bee007ac | ||
|
|
3740d24cd1 | ||
|
|
960538a9a6 | ||
|
|
afcc8cfd4d | ||
|
|
bccc19981e | ||
|
|
66f63c6d75 | ||
|
|
722630cf37 | ||
|
|
32e439c495 | ||
|
|
eda16f8cc2 | ||
|
|
1b688fe75e | ||
|
|
3134818ca7 | ||
|
|
2268bca663 | ||
|
|
c1e55c0e3f | ||
|
|
c5922d67c4 | ||
|
|
5799031a34 | ||
|
|
dc226da809 | ||
|
|
3db6249f71 | ||
|
|
2926e845d2 | ||
|
|
ec6d5850d0 | ||
|
|
72a9f2cd39 | ||
|
|
874646a6dc | ||
|
|
d84073ee03 | ||
|
|
abca22763c | ||
|
|
2e62d3d2ee |
No files matched your search
@@ -14,6 +14,7 @@ jobs:
|
||||
matrix:
|
||||
platform: [macos-latest, ubuntu-22.04, windows-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
environment: TAURI
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -63,12 +64,12 @@ jobs:
|
||||
run: pnpm install --no-frozen-lockfile && pnpm run build # Change this to npm, yarn or pnpm.
|
||||
|
||||
- name: Build the app
|
||||
uses: tauri-apps/tauri-action@vdev
|
||||
uses: tauri-apps/tauri-action@dev
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY}}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD}}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
with:
|
||||
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
|
||||
releaseName: "App Name v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": "0.0.3-dev",
|
||||
"notes": "See the assets to download and install this version.",
|
||||
"pub_date": "2023-12-30T13:19:40.566Z",
|
||||
"platforms": {
|
||||
"linux-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVUxMlNNMXNqRUJzbTlxQTVSeldOcG1QNnROYUpVbWx1dVJabHFzUFRTVnpSdlhPMnNMWlNZaW1RTFZ1NUhhYmtsNFBVa3cwWDVqWmU0R3JFNnJjVHdNPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAzOTQyMzI3CWZpbGU6amVsbHktcGxheWVyXzAuMC4zLWRldl9hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKbnpNR2VkeFB4eDZpd25JZDBDVjJFRVNFYndXM0hmeVRtZ3dJdmlRMldHRVpxeDBKL3AyTzZld21rbzYwanJwcUkzenpUQXNPSURETmdZZHBXNCtqREE9PQo=",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/jelly-player_0.0.3-dev_amd64.AppImage.tar.gz"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVFSd2o2eGdKZUFuQ09ucXF6amJaYU1TVXRCaDBzTVJZM0xBZDVMNkRnL0N2WDJtclpBYTYwamthTGFVWERaUXVpRzdEZ3oyT2N1azFoamJ2RENZZFFvPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAzOTQyMzc0CWZpbGU6SmVsbHlQbGF5ZXIuYXBwLnRhci5negpycDN3eWRlR1IyZXo0djlmSjJMVkpHUWNRVUhqbmFsSHFnbzNQM2VGc21uOTRESjJxaUNlbEl6K2hnSU41T0lPQ292VWFjYlVRM2YyM1BNM0NWOTJEUT09Cg==",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/JellyPlayer_x64.app.tar.gz"
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
-19
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jellyplayer",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"version": "0.0.3-dev",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,46 +13,47 @@
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@fontsource-variable/jetbrains-mono": "^5.0.18",
|
||||
"@fontsource/noto-sans": "^5.0.17",
|
||||
"@fontsource-variable/jetbrains-mono": "^5.0.19",
|
||||
"@fontsource/noto-sans": "^5.0.18",
|
||||
"@jellyfin/sdk": "0.8.2",
|
||||
"@mdi/js": "^7.3.67",
|
||||
"@mui/lab": "5.0.0-alpha.155",
|
||||
"@mui/material": "^5.14.15",
|
||||
"@tanstack/react-query": "^5.0.5",
|
||||
"@tanstack/react-query-devtools": "^5.4.2",
|
||||
"@mui/lab": "5.0.0-alpha.158",
|
||||
"@mui/material": "^5.14.20",
|
||||
"@tanstack/react-query": "^5.13.4",
|
||||
"@tanstack/react-query-devtools": "^5.13.5",
|
||||
"@tauri-apps/api": "^1.5.1",
|
||||
"axios": "^1.6.0",
|
||||
"axios": "^1.6.2",
|
||||
"axios-tauri-api-adapter": "^0.2.0",
|
||||
"blurhash": "^2.0.5",
|
||||
"events": "^3.3.0",
|
||||
"framer-motion": "^10.16.4",
|
||||
"material-symbols": "^0.14.0",
|
||||
"framer-motion": "^10.16.16",
|
||||
"material-symbols": "^0.14.2",
|
||||
"notistack": "^3.0.1",
|
||||
"react": "^18.2.0",
|
||||
"react-blurhash": "^0.3.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-error-boundary": "^4.0.11",
|
||||
"react-markdown": "^9.0.1",
|
||||
"react-multi-carousel": "^2.8.4",
|
||||
"react-player": "^2.13.0",
|
||||
"react-router-dom": "^6.17.0",
|
||||
"react-router-dom": "^6.20.1",
|
||||
"react-use-konami": "^1.1.0",
|
||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||
"uuid": "^9.0.1",
|
||||
"vite-plugin-svgr": "^4.1.0",
|
||||
"wavesurfer.js": "^7.4.2",
|
||||
"zustand": "^4.4.4"
|
||||
"vite-plugin-svgr": "^4.2.0",
|
||||
"wavesurfer.js": "^7.5.1",
|
||||
"zustand": "^4.4.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.5.6",
|
||||
"@vitejs/plugin-react": "^4.1.0",
|
||||
"eslint": "^8.52.0",
|
||||
"@tauri-apps/cli": "^1.5.7",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"eslint": "^8.55.0",
|
||||
"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",
|
||||
"sass": "^1.69.5",
|
||||
"vite": "^5.0.5",
|
||||
"vite": "^5.0.7",
|
||||
"vite-plugin-compression": "^0.5.1"
|
||||
},
|
||||
"license": "GPL-3.0-only"
|
||||
|
||||
Generated
+1163
-722
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "jellyplayer"
|
||||
version = "1.0.0"
|
||||
version = "0.0.3-dev"
|
||||
description = "A Modern Jellyfin Client"
|
||||
authors = ["prayag17", "JellyPlayer contributors (https://github.com/prayag17/JellyPlayer/graphs/contributors)"]
|
||||
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
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.5.0", features = [] }
|
||||
tauri-build = { version = "1.5.1", features = [] }
|
||||
|
||||
[dependencies]
|
||||
log = "^0.4.20"
|
||||
serde_json = "1.0"
|
||||
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-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"] }
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "JellyPlayer",
|
||||
"version": "1.0.0"
|
||||
"version": "0.0.3-dev"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
@@ -61,15 +61,11 @@
|
||||
},
|
||||
"resources": [],
|
||||
"shortDescription": "A Modern Jellyfin Client for Jellyfin",
|
||||
"targets": "all",
|
||||
"targets": ["deb", "appimage", "nsis", "app", "dmg", "updater"],
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": "",
|
||||
"wix": {
|
||||
"bannerPath": "../public/installerBanner.bmp",
|
||||
"dialogImagePath": "../public/installerDialog.bmp"
|
||||
},
|
||||
"nsis": {
|
||||
"sidebarImage": "../public/installerSideBarImage.bmp",
|
||||
"headerImage": "../public/installerHeaderImage.bmp",
|
||||
@@ -102,10 +98,10 @@
|
||||
"updater": {
|
||||
"active": true,
|
||||
"endpoints": [
|
||||
"https://cdn.jsdelivr.net/gh/prayag17/jellyplayer@latest/updater.json"
|
||||
"https://raw.githack.com/prayag17/JellyPlayer/main/latest.json"
|
||||
],
|
||||
"dialog": true,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE1MTczRTNFNjFGQ0JBOEMKUldTTXV2eGhQajRYRmNFSG5EYVF1VE1YaVA5Qjl2WGt6alFWOGo5UCs2SGprTGtNOC9WMC8wTjMK"
|
||||
"dialog": false,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDk5QkE0QjMzOEQyRUI5M0MKUldROHVTNk5NMHU2bVMvS3VNRWZHRzhuWE1TRlg3WHI1VHBtZjFvVy80alZ2UHc4T3BqcHVGOWwK"
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
|
||||
+150
-6
@@ -16,6 +16,11 @@ import {
|
||||
} from "react-router-dom";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
checkUpdate,
|
||||
installUpdate,
|
||||
onUpdaterEvent,
|
||||
} from "@tauri-apps/api/updater";
|
||||
import { relaunch } from "@tauri-apps/api/process";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
@@ -34,6 +39,10 @@ import DialogTitle from "@mui/material/DialogTitle";
|
||||
import Button from "@mui/material/Button";
|
||||
import Slide from "@mui/material/Slide";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import LoadingButton from "@mui/lab/LoadingButton";
|
||||
|
||||
// Routes
|
||||
import { ServerSetup } from "./routes/setup/server";
|
||||
@@ -49,6 +58,7 @@ import About from "./routes/about";
|
||||
import SearchPage from "./routes/search";
|
||||
|
||||
import { VideoPlayer } from "./routes/player/videoPlayer.jsx";
|
||||
import Markdown from "react-markdown";
|
||||
|
||||
import { SideMenu } from "./components/menu/sidemenu.jsx";
|
||||
import { AppBar } from "./components/appBar/appBar.jsx";
|
||||
@@ -91,6 +101,9 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { CircularProgress } from "@mui/material";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { useCentralStore } from "./utils/store/central.js";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
import { ErrorNotice } from "./components/notices/errorNotice/errorNotice.jsx";
|
||||
|
||||
const anim = {
|
||||
initial: {
|
||||
@@ -158,6 +171,14 @@ const AnimationWrapper = () => {
|
||||
);
|
||||
};
|
||||
|
||||
// const unlisten = await onUpdaterEvent(({ error, status }) => {
|
||||
// // This will log all updater events, including status updates and errors.
|
||||
// console.log("Updater event", error, status);
|
||||
// });
|
||||
|
||||
// // you need to call unlisten if your handler goes out of scope, for example if the component is unmounted.
|
||||
// unlisten();
|
||||
|
||||
function App() {
|
||||
const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [
|
||||
state.isPending,
|
||||
@@ -204,6 +225,43 @@ function App() {
|
||||
"a",
|
||||
],
|
||||
});
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
const [updateDialog, setUpdateDialog] = useState(false);
|
||||
|
||||
/**
|
||||
* @type {[import("@tauri-apps/api/updater.js").UpdateManifest, React.Dispatch<import("@tauri-apps/api/updater.js").UpdateManifest>]}
|
||||
*/
|
||||
const [updateInfo, setUpdateInfo] = useState(null);
|
||||
|
||||
const [updateDialogButton, setUpdateDialogButton] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
async function checkForUpdates() {
|
||||
try {
|
||||
const { shouldUpdate, manifest } = await checkUpdate();
|
||||
|
||||
if (shouldUpdate) {
|
||||
setUpdateInfo(manifest);
|
||||
setUpdateDialog(true);
|
||||
// You could show a dialog asking the user if they want to install the update here.
|
||||
console.log(
|
||||
`Update found : ${manifest?.version}, ${manifest?.date}`,
|
||||
);
|
||||
|
||||
// Install the update. This will also restart the app on Windows!
|
||||
// await installUpdate();
|
||||
|
||||
// On macOS and Linux you will need to restart the app manually.
|
||||
// You could use this step to display another confirmation dialog.
|
||||
// await relaunch();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
checkForUpdates();
|
||||
}, []);
|
||||
|
||||
const [initialRoute] = useCentralStore((state) => [state.initialRoute]);
|
||||
|
||||
@@ -237,6 +295,89 @@ function App() {
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Dialog
|
||||
// open={true}
|
||||
open={updateDialog}
|
||||
// onClose={}
|
||||
// maxWidth="md"
|
||||
fullWidth
|
||||
>
|
||||
{Boolean(updateInfo) && (
|
||||
<>
|
||||
<DialogTitle>
|
||||
Update Available!
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.5",
|
||||
}}
|
||||
>
|
||||
v{updateInfo.version}
|
||||
</Typography>
|
||||
</DialogTitle>
|
||||
<DialogContent dividers>
|
||||
<DialogContentText>
|
||||
<Markdown>
|
||||
{updateInfo.body}
|
||||
</Markdown>
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions
|
||||
style={{
|
||||
padding: "1em",
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
disabled={updateDialogButton}
|
||||
>
|
||||
<SvgIcon>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 16 16"
|
||||
>
|
||||
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8" />
|
||||
</svg>
|
||||
</SvgIcon>
|
||||
</IconButton>
|
||||
<Button
|
||||
size="large"
|
||||
color="error"
|
||||
variant="outlined"
|
||||
disabled={updateDialogButton}
|
||||
onClick={() =>
|
||||
setUpdateDialog(false)
|
||||
}
|
||||
>
|
||||
close
|
||||
</Button>
|
||||
<LoadingButton
|
||||
size="large"
|
||||
color="success"
|
||||
variant="contained"
|
||||
loading={updateDialogButton}
|
||||
loadingIndicator="Updating..."
|
||||
onClick={async () => {
|
||||
setUpdateDialogButton(
|
||||
true,
|
||||
);
|
||||
await installUpdate();
|
||||
enqueueSnackbar(
|
||||
"Update has been installed! You need to relaunch JellyPlayer.",
|
||||
{
|
||||
variant: "success",
|
||||
},
|
||||
);
|
||||
await relaunch();
|
||||
}}
|
||||
>
|
||||
Update
|
||||
</LoadingButton>
|
||||
</DialogActions>
|
||||
</>
|
||||
)}
|
||||
</Dialog>
|
||||
<Dialog
|
||||
open={easterEgg}
|
||||
onClose={() => setEasterEgg(false)}
|
||||
@@ -318,14 +459,15 @@ function App() {
|
||||
}}
|
||||
>
|
||||
<CssBaseline />
|
||||
<SideMenu />
|
||||
{/* <SideMenu /> */}
|
||||
<AppBar />
|
||||
<AudioPlayer key={audioPlayerVisible} />
|
||||
<Routes location={location}>
|
||||
<Route
|
||||
<ErrorBoundary FallbackComponent={ErrorNotice}>
|
||||
<Routes location={location}>
|
||||
{/* <Route
|
||||
// key={location.key}
|
||||
element={<AnimationWrapper />}
|
||||
>
|
||||
> */}
|
||||
<Route
|
||||
path="/"
|
||||
exact
|
||||
@@ -423,6 +565,7 @@ function App() {
|
||||
exact
|
||||
path="/musicalbum/:id"
|
||||
element={<MusicAlbumTitlePage />}
|
||||
errorElement={<div>Error</div>}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
@@ -473,8 +616,9 @@ function App() {
|
||||
path="/player"
|
||||
element={<VideoPlayer />}
|
||||
/>
|
||||
</Route>
|
||||
</Routes>
|
||||
{/* </Route> */}
|
||||
</Routes>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
<ReactQueryDevtools buttonPosition="bottom-left" />
|
||||
</ThemeProvider>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** @format */
|
||||
import React, { useEffect, useState } from "react";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
|
||||
import { relaunch } from "@tauri-apps/api/process";
|
||||
|
||||
@@ -11,12 +11,16 @@ import ListItemIcon from "@mui/material/ListItemIcon";
|
||||
import Menu from "@mui/material/Menu";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
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 { 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 { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
||||
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
import "./appBar.module.scss";
|
||||
@@ -35,6 +39,10 @@ import { MdiLogoutVariant } from "../icons/mdiLogoutVariant";
|
||||
import { EventEmitter as event } from "../../eventEmitter";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||
|
||||
import logo from "../../assets/logo.svg";
|
||||
|
||||
export const AppBar = () => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
const navigate = useNavigate();
|
||||
@@ -53,6 +61,17 @@ export const AppBar = () => {
|
||||
enabled: display,
|
||||
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(() => {
|
||||
if (user.isError) {
|
||||
console.error(user.error);
|
||||
@@ -91,6 +110,20 @@ export const AppBar = () => {
|
||||
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(() => {
|
||||
if (
|
||||
location.pathname.includes("login") ||
|
||||
@@ -104,14 +137,18 @@ export const AppBar = () => {
|
||||
} else {
|
||||
setDisplay(true);
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
useEffect(() => {
|
||||
if (location.pathname == "/home") {
|
||||
setBackButtonVisible(false);
|
||||
} else {
|
||||
setBackButtonVisible(true);
|
||||
}
|
||||
|
||||
if (location.pathname.includes("library")) {
|
||||
setIsBrowsingLibrary(true);
|
||||
} else {
|
||||
setIsBrowsingLibrary(false);
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
if (!display) {
|
||||
@@ -123,109 +160,213 @@ export const AppBar = () => {
|
||||
style={{
|
||||
backgroundColor: "transparent",
|
||||
paddingRight: "0 !important",
|
||||
width: "fit-content",
|
||||
}}
|
||||
className={trigger ? "appBar backdropVisible" : "appBar"}
|
||||
elevation={0}
|
||||
elevation={trigger ? 4 : 0}
|
||||
color="transparent"
|
||||
>
|
||||
<Toolbar
|
||||
sx={{
|
||||
justifyContent: "space-between",
|
||||
padding: "13px !important",
|
||||
display: "flex",
|
||||
gap: "1.2em",
|
||||
display: "grid",
|
||||
gap: "0.6em",
|
||||
gridTemplateColumns: "30% 1fr 30%",
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
onClick={() => navigate(-1)}
|
||||
disabled={!backButtonVisible}
|
||||
<div
|
||||
className="flex flex-row flex-center"
|
||||
style={{
|
||||
gap: "1.2em",
|
||||
justifySelf: "start",
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
arrow_back
|
||||
</div>
|
||||
</IconButton>
|
||||
|
||||
<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");
|
||||
<IconButton
|
||||
onClick={() => navigate(-1)}
|
||||
disabled={!backButtonVisible}
|
||||
style={{
|
||||
justifySelf: "left",
|
||||
}}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded appBar-icon">
|
||||
dns
|
||||
</div>
|
||||
</ListItemIcon>
|
||||
Select Server
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<div className="material-symbols-rounded">
|
||||
arrow_back
|
||||
</div>
|
||||
</IconButton>
|
||||
<img src={logo} className="appBar-logo" />
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</MuiAppBar>
|
||||
);
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
/** @format */
|
||||
|
||||
.appBar {
|
||||
top: 8px !important;
|
||||
right: 8px !important;
|
||||
border-radius: 10000px;
|
||||
transition: background-color $transition-time-fast,
|
||||
backdrop-filter $transition-time-fast,
|
||||
box-shadow $transition-time-default !important;
|
||||
@@ -20,6 +17,55 @@
|
||||
&-logo {
|
||||
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 {
|
||||
|
||||
@@ -75,6 +75,7 @@ const LikeButton = ({
|
||||
opacity: mutation.isPending ? 1 : 0,
|
||||
transition: "opacity 200ms",
|
||||
}}
|
||||
thickness={2}
|
||||
/>
|
||||
<IconButton
|
||||
onClick={(e) => {
|
||||
|
||||
@@ -67,6 +67,7 @@ const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
|
||||
opacity: mutation.isPending ? 1 : 0,
|
||||
transition: "opacity 200ms",
|
||||
}}
|
||||
thickness={2}
|
||||
/>
|
||||
<IconButton
|
||||
onClick={(e) => {
|
||||
|
||||
+115
-122
@@ -3,22 +3,18 @@ import React from "react";
|
||||
|
||||
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 LinearProgress from "@mui/material/LinearProgress";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
|
||||
import { getTypeIcon } from "../utils/iconsCollection";
|
||||
import "./card.module.scss";
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import ErrorBoundary from "../errorBoundary";
|
||||
|
||||
const cardImageAspectRatios = {
|
||||
thumb: 1.777,
|
||||
@@ -63,7 +59,6 @@ export const Card = ({
|
||||
cardTitle,
|
||||
cardCaption,
|
||||
imageType = "Primary",
|
||||
imageBlurhash,
|
||||
cardType,
|
||||
queryKey,
|
||||
userId,
|
||||
@@ -71,7 +66,6 @@ export const Card = ({
|
||||
hideText,
|
||||
onClick,
|
||||
disableOverlay = false,
|
||||
disablePadding,
|
||||
overrideIcon,
|
||||
}) => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
@@ -94,47 +88,41 @@ export const Card = ({
|
||||
tabIndex={0}
|
||||
onClick={onClick ? onClick : defaultOnClick}
|
||||
>
|
||||
<div className="card-box">
|
||||
<div
|
||||
className="card-image-container"
|
||||
style={{
|
||||
aspectRatio: cardImageAspectRatios[cardType],
|
||||
}}
|
||||
>
|
||||
{!!item.UserData && (
|
||||
<>
|
||||
<div
|
||||
className="card-indicator check"
|
||||
style={{
|
||||
opacity: item.UserData?.Played
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
done
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`card-indicator text`}
|
||||
style={{
|
||||
opacity: item.UserData
|
||||
?.UnplayedItemCount
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
padding="0.1em 0.4em"
|
||||
fontWeight={400}
|
||||
>
|
||||
{item.UserData?.UnplayedItemCount}
|
||||
</Typography>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{/* {!!imageBlurhash && (
|
||||
<div
|
||||
className="card-image-container"
|
||||
style={{
|
||||
aspectRatio: cardImageAspectRatios[cardType],
|
||||
}}
|
||||
>
|
||||
<ErrorBoundary fallback={<></>}>
|
||||
<div
|
||||
className="card-indicator check"
|
||||
style={{
|
||||
opacity: item.UserData?.Played ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
done
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`card-indicator text`}
|
||||
style={{
|
||||
opacity: item.UserData?.UnplayedItemCount
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
padding="0.1em 0.4em"
|
||||
fontWeight={400}
|
||||
>
|
||||
{item.UserData?.UnplayedItemCount}
|
||||
</Typography>
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
{/* {!!imageBlurhash && (
|
||||
<Blurhash
|
||||
hash={imageBlurhash}
|
||||
width={128}
|
||||
@@ -144,40 +132,46 @@ export const Card = ({
|
||||
className="card-image-blurhash"
|
||||
/>
|
||||
)} */}
|
||||
<div className="card-image-icon-container">
|
||||
{overrideIcon
|
||||
? getTypeIcon(overrideIcon)
|
||||
: getTypeIcon(item.Type)}
|
||||
</div>
|
||||
<img
|
||||
src={
|
||||
overrideIcon == "User"
|
||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||
: api.getItemImageUrl(
|
||||
seriesId
|
||||
? item.SeriesId
|
||||
: item.AlbumId
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
imageType,
|
||||
{
|
||||
quality: 85,
|
||||
fillHeight: 462,
|
||||
fillWidth: 462,
|
||||
},
|
||||
)
|
||||
}
|
||||
style={{
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
opacity: 0,
|
||||
}}
|
||||
loading="lazy"
|
||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||
className="card-image"
|
||||
/>
|
||||
<div className="card-image-icon-container">
|
||||
{overrideIcon
|
||||
? getTypeIcon(overrideIcon)
|
||||
: getTypeIcon(item.Type)}
|
||||
</div>
|
||||
<img
|
||||
src={
|
||||
overrideIcon == "User"
|
||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||
: api.getItemImageUrl(
|
||||
seriesId
|
||||
? item.SeriesId
|
||||
: item.AlbumId
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
imageType,
|
||||
{
|
||||
quality: 90,
|
||||
fillHeight: 226,
|
||||
fillWidth: Math.floor(
|
||||
226 /
|
||||
cardImageAspectRatios[
|
||||
cardType
|
||||
],
|
||||
),
|
||||
},
|
||||
)
|
||||
}
|
||||
style={{
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
opacity: 0,
|
||||
}}
|
||||
loading="lazy"
|
||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||
className="card-image"
|
||||
/>
|
||||
<div className="card-overlay">
|
||||
{!disableOverlay && (
|
||||
<div className="card-overlay">
|
||||
<>
|
||||
<PlayButton
|
||||
itemId={item.Id}
|
||||
userId={userId}
|
||||
@@ -217,50 +211,49 @@ export const Card = ({
|
||||
queryKey={queryKey}
|
||||
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
|
||||
className="card-text-container"
|
||||
style={{ display: hideText ? "none" : "block" }}
|
||||
{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
|
||||
className="card-text-container"
|
||||
style={{ display: hideText ? "none" : "block" }}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
fontWeight={500}
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.9 }}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
fontWeight={500}
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.9 }}
|
||||
>
|
||||
{cardTitle}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.6 }}
|
||||
lineHeight="auto"
|
||||
>
|
||||
{cardCaption}
|
||||
</Typography>
|
||||
</div>
|
||||
{cardTitle}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.6 }}
|
||||
lineHeight="auto"
|
||||
>
|
||||
{cardCaption}
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
left: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
@@ -78,17 +77,11 @@
|
||||
align-items: flex-end;
|
||||
justify-content: flex-end;
|
||||
padding: 0.5em;
|
||||
border-radius: 8px;
|
||||
background: rgb(0 0 0 / 0.4);
|
||||
}
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
.card-image {
|
||||
filter: brightness(0.6);
|
||||
}
|
||||
.card-image-icon-container {
|
||||
filter: brightness(0.6);
|
||||
}
|
||||
.card-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@@ -32,23 +32,29 @@ export const CardScroller = ({
|
||||
partialVisibilityGutter: 40,
|
||||
},
|
||||
desktop: {
|
||||
breakpoint: { max: 3000, min: 625 },
|
||||
breakpoint: { max: 3000, min: 925 },
|
||||
items: displayCards,
|
||||
slidesToSlide: displayCards, // optional, default to 1.
|
||||
partialVisibilityGutter: 30,
|
||||
},
|
||||
tablet: {
|
||||
breakpoint: { max: 624, min: 464 },
|
||||
items: displayCards - 2,
|
||||
slidesToSlide: displayCards - 2, // optional, default to 1.
|
||||
breakpoint: { max: 925, min: 600 },
|
||||
items: displayCards - 3,
|
||||
slidesToSlide: displayCards - 3, // optional, default to 1.
|
||||
partialVisibilityGutter: 20,
|
||||
},
|
||||
mobile: {
|
||||
breakpoint: { max: 464, min: 0 },
|
||||
breakpoint: { max: 600, min: 424 },
|
||||
items: displayCards - 5,
|
||||
slidesToSlide: displayCards - 5, // optional, default to 1.
|
||||
partialVisibilityGutter: 10,
|
||||
},
|
||||
smallScreen: {
|
||||
breakpoint: { max: 424, min: 0 },
|
||||
items: 1,
|
||||
slidesToSlide: 1, // optional, default to 1.
|
||||
partialVisibilityGutter: 10,
|
||||
},
|
||||
};
|
||||
|
||||
const [carouselRef, setCarouselRef] = useState();
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
height: 70vh;
|
||||
margin: 4.4em 1.6em 1.6em 1.6em;
|
||||
&-button {
|
||||
position: absolute !important;
|
||||
top: 50%;
|
||||
@@ -12,25 +13,25 @@
|
||||
right: 0.5em;
|
||||
}
|
||||
&.left {
|
||||
left: 0;
|
||||
left: 0.5em;
|
||||
}
|
||||
}
|
||||
&-indicator {
|
||||
height: 2px;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
transition: background $transition-time-fast,
|
||||
height $transition-time-fast;
|
||||
background: rgb(255 255 255 / 0.5);
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
height: 5px;
|
||||
height: 6px;
|
||||
background: rgb(255 255 255 / 0.8) !important;
|
||||
}
|
||||
&-container {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
bottom: 1em;
|
||||
width: calc(100vw - 8em);
|
||||
bottom: -1em;
|
||||
left: 1em;
|
||||
right: 1em;
|
||||
gap: 1em;
|
||||
@@ -38,7 +39,8 @@
|
||||
justify-content: center;
|
||||
}
|
||||
&.active {
|
||||
height: 5px;
|
||||
height: 6px;
|
||||
background: white !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,10 @@ const Carousel = ({ content, onChange }) => {
|
||||
<IconButton
|
||||
className="carousel-button left"
|
||||
onClick={() => {
|
||||
if (currentSlide == 0) {
|
||||
setDirection("left");
|
||||
setCurrentSlide(content.length - 1);
|
||||
}
|
||||
if (currentSlide > 0) {
|
||||
setDirection("left");
|
||||
setCurrentSlide((init) => init - 1);
|
||||
@@ -38,7 +42,7 @@ const Carousel = ({ content, onChange }) => {
|
||||
sx={{
|
||||
background: " rgb(200 200 200 / 0.05)",
|
||||
}}
|
||||
disabled={currentSlide == 0}
|
||||
// disabled={currentSlide == 0}
|
||||
>
|
||||
<div className="material-symbols-rounded">arrow_left</div>
|
||||
</IconButton>
|
||||
@@ -50,7 +54,6 @@ const Carousel = ({ content, onChange }) => {
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
drag={"x"}
|
||||
dragConstraints={{ left: 0, right: 0 }}
|
||||
@@ -72,8 +75,8 @@ const Carousel = ({ content, onChange }) => {
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
height: "100vh",
|
||||
width: "100vw",
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
position: "absolute",
|
||||
}}
|
||||
>
|
||||
@@ -83,12 +86,15 @@ const Carousel = ({ content, onChange }) => {
|
||||
<IconButton
|
||||
className="carousel-button right"
|
||||
onClick={() => {
|
||||
if (currentSlide < content.length - 1) {
|
||||
if (currentSlide == content.length - 1) {
|
||||
setDirection("right");
|
||||
setCurrentSlide(0);
|
||||
} else if (currentSlide < content.length - 1) {
|
||||
setDirection("right");
|
||||
setCurrentSlide((init) => init + 1);
|
||||
}
|
||||
}}
|
||||
disabled={currentSlide == content.length - 1}
|
||||
// disabled={currentSlide == content.length - 1}
|
||||
sx={{
|
||||
background: " rgb(200 200 200 / 0.05)",
|
||||
}}
|
||||
@@ -104,12 +110,6 @@ const Carousel = ({ content, onChange }) => {
|
||||
: "carousel-indicator"
|
||||
}
|
||||
key={index}
|
||||
style={{
|
||||
background:
|
||||
currentSlide == index
|
||||
? "white"
|
||||
: "rgb(255 255 255 / 0.5)",
|
||||
}}
|
||||
onClick={() => {
|
||||
if (currentSlide > index) {
|
||||
setDirection("left");
|
||||
|
||||
@@ -20,6 +20,7 @@ import { useNavigate } from "react-router-dom";
|
||||
import { MediaTypeIconCollection, getTypeIcon } from "../utils/iconsCollection";
|
||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { red } from "@mui/material/colors";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
@@ -79,8 +80,8 @@ const CarouselSlide = ({ item }) => {
|
||||
sx={{
|
||||
background: "transparent",
|
||||
px: 3,
|
||||
boxShadow: "none !important",
|
||||
}}
|
||||
elevation={6}
|
||||
>
|
||||
<div className="hero-carousel-background-container">
|
||||
{!!item.ImageBlurHashes.Backdrop && (
|
||||
@@ -97,8 +98,8 @@ const CarouselSlide = ({ item }) => {
|
||||
]
|
||||
}
|
||||
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||
width="1080"
|
||||
height="720"
|
||||
width="108"
|
||||
height="72"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
className="hero-carousel-background-blurhash"
|
||||
@@ -127,37 +128,61 @@ const CarouselSlide = ({ item }) => {
|
||||
</div>
|
||||
</div>
|
||||
<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)",
|
||||
// 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",
|
||||
}}
|
||||
// opacity: 0,
|
||||
// }}
|
||||
// transition={{
|
||||
// duration: 0.25,
|
||||
// ease: "easeInOut",
|
||||
// }}
|
||||
className="hero-carousel-detail"
|
||||
>
|
||||
<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}
|
||||
variant="h2"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
mb: 2.5,
|
||||
mb: "5px",
|
||||
}}
|
||||
overflow="visible"
|
||||
>
|
||||
@@ -170,12 +195,13 @@ const CarouselSlide = ({ item }) => {
|
||||
api.basePath +
|
||||
"/Items/" +
|
||||
item.Id +
|
||||
"/Images/Logo?quality=80&tag=" +
|
||||
"/Images/Logo?quality=90&tag=" +
|
||||
item.ImageTags.Logo
|
||||
}
|
||||
style={{
|
||||
opacity: 0,
|
||||
transition: "opacity 0.2s",
|
||||
objectFit: "contain",
|
||||
}}
|
||||
onLoad={(e) =>
|
||||
(e.target.style.opacity = 1)
|
||||
@@ -184,23 +210,41 @@ const CarouselSlide = ({ item }) => {
|
||||
)}
|
||||
</Typography>
|
||||
<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"
|
||||
gap={1}
|
||||
divider={
|
||||
<div
|
||||
style={{
|
||||
width: "4px",
|
||||
height: "4px",
|
||||
background: "white",
|
||||
alignSelf: "center",
|
||||
aspectRatio: 1,
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
></div>
|
||||
}
|
||||
gap={2}
|
||||
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
|
||||
: "Unknown"}
|
||||
@@ -209,46 +253,110 @@ const CarouselSlide = ({ item }) => {
|
||||
variant="filled"
|
||||
label={item.OfficialRating ?? "Not Rated"}
|
||||
/>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
{item.CommunityRating ? (
|
||||
<>
|
||||
<MdiStar
|
||||
sx={{
|
||||
color: yellow[700],
|
||||
}}
|
||||
/>
|
||||
<Typography variant="subtitle1">
|
||||
{Math.round(
|
||||
item.CommunityRating *
|
||||
10,
|
||||
) / 10}
|
||||
</Typography>
|
||||
</>
|
||||
) : (
|
||||
<Typography variant="subtitle1">
|
||||
No Community Rating
|
||||
<ErrorBoundary fallback={<></>}>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
// fontSize: "2.2em",
|
||||
color: yellow[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
star
|
||||
</div>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{Math.round(
|
||||
item.CommunityRating * 10,
|
||||
) / 10}
|
||||
</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 && (
|
||||
<Typography variant="subtitle1">
|
||||
<Typography
|
||||
style={{ opacity: "0.8" }}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{getRuntime(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography variant="subtitle1">
|
||||
<Typography
|
||||
style={{ opacity: "0.8" }}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{endsAt(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
</Stack>
|
||||
<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"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
|
||||
@@ -17,6 +17,7 @@ class ErrorBoundary extends React.Component {
|
||||
// in ErrorBoundary (created by App)
|
||||
// in div (created by App)
|
||||
// in App
|
||||
this.setState;
|
||||
console.error(`Err in ${info} - ${error}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 { Card } from "../../card/card";
|
||||
import { MdiStar } from "../../icons/mdiStar";
|
||||
import { yellow } from "@mui/material/colors";
|
||||
import { yellow, red } from "@mui/material/colors";
|
||||
import { endsAt, getRuntime, getRuntimeFull } from "../../../utils/date/time";
|
||||
import LikeButton from "../../buttons/likeButton";
|
||||
import MarkPlayedButton from "../../buttons/markPlayedButton";
|
||||
@@ -25,6 +24,7 @@ import { Blurhash } from "react-blurhash";
|
||||
import TextLink from "../../textLink";
|
||||
|
||||
import { useApi } from "../../../utils/store/api";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
|
||||
@@ -327,7 +327,7 @@ const Hero = ({
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{!!videoTracks[0].VideoRangeType && (
|
||||
{!!videoTracks[0]?.VideoRangeType && (
|
||||
<Chip
|
||||
variant="filled"
|
||||
label={
|
||||
@@ -418,42 +418,69 @@ const Hero = ({
|
||||
item.OfficialRating ?? "Not Rated"
|
||||
}
|
||||
/>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
{item.CommunityRating ? (
|
||||
<>
|
||||
<MdiStar
|
||||
sx={{
|
||||
color: yellow[700],
|
||||
}}
|
||||
/>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{Math.round(
|
||||
item.CommunityRating *
|
||||
10,
|
||||
) / 10}
|
||||
</Typography>
|
||||
</>
|
||||
) : (
|
||||
<ErrorBoundary fallback={<></>}>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
// fontSize: "2.2em",
|
||||
color: yellow[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
star
|
||||
</div>
|
||||
<Typography
|
||||
style={{ opacity: "0.8" }}
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
No Community Rating
|
||||
{Math.round(
|
||||
item.CommunityRating *
|
||||
10,
|
||||
) / 10}
|
||||
</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 && (
|
||||
<Typography
|
||||
style={{ opacity: "0.8" }}
|
||||
|
||||
@@ -11,26 +11,18 @@ $maskPercentage: 40%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
&-backdrop {
|
||||
position: fixed;
|
||||
background-attachment: fixed;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
background-attachment: scroll;
|
||||
width: calc(100vw + 100px);
|
||||
height: calc(100vh + 100px);
|
||||
top: -50px;
|
||||
left: -50px;
|
||||
z-index: -1;
|
||||
filter: brightness(0.4);
|
||||
mask-image: linear-gradient(
|
||||
to bottom,
|
||||
black $maskPercentage,
|
||||
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-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;
|
||||
& > * {
|
||||
@@ -65,7 +57,7 @@ $maskPercentage: 40%;
|
||||
|
||||
&-name-logo {
|
||||
width: 10.4em;
|
||||
height: 2.6em;
|
||||
max-height: 2.6em;
|
||||
object-fit: contain;
|
||||
object-position: left;
|
||||
opacity: 0;
|
||||
|
||||
@@ -17,7 +17,7 @@ import { getTypeIcon } from "../../components/utils/iconsCollection.jsx";
|
||||
import "./sidemenu.module.scss";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
import Icon from "../../assets/icon.png";
|
||||
import Icon from "../../assets/icon.svg";
|
||||
|
||||
const DrawerHeader = styled("div")(({ theme }) => ({
|
||||
display: "flex",
|
||||
|
||||
@@ -1,24 +1,44 @@
|
||||
/** @format */
|
||||
|
||||
import React from "react";
|
||||
import Box from "@mui/material/Box";
|
||||
import { MdiEmoticonCry } from "../../icons/mdiEmoticonCry";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { yellow } from "@mui/material/colors";
|
||||
|
||||
export const EmptyNotice = () => {
|
||||
export const EmptyNotice = ({ extraMsg }) => {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: "100%",
|
||||
height: "100vh",
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
flexFlow: "column",
|
||||
opacity: 0.2,
|
||||
// opacity: 0.2,
|
||||
}}
|
||||
>
|
||||
<MdiEmoticonCry sx={{ fontSize: 200 }} />
|
||||
<Typography variant="h3">Nothing found</Typography>
|
||||
<div
|
||||
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>
|
||||
);
|
||||
};
|
||||
@@ -1,10 +1,12 @@
|
||||
/** @format */
|
||||
|
||||
import React from "react";
|
||||
import Box from "@mui/material/Box";
|
||||
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 (
|
||||
<Box
|
||||
sx={{
|
||||
@@ -14,11 +16,61 @@ export const ErrorNotice = () => {
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
flexFlow: "column",
|
||||
opacity: 0.2,
|
||||
// opacity: 0.2,
|
||||
}}
|
||||
>
|
||||
<MdiEmoticonDead sx={{ fontSize: 200 }} />
|
||||
<Typography variant="h3">Something went wrong</Typography>
|
||||
<div
|
||||
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>
|
||||
);
|
||||
};
|
||||
@@ -4,13 +4,13 @@
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: $clr-background-dark-opacity-0_8;
|
||||
background: rgb(0 0 0 / 0.6);
|
||||
z-index: 10;
|
||||
display: grid;
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
// margin: 1em;
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 10px;
|
||||
// border-radius: 10px;
|
||||
overflow: hidden;
|
||||
gap: 1em;
|
||||
box-shadow: 0 0 20px rgb(0 0 0 / 0.25);
|
||||
|
||||
@@ -212,9 +212,7 @@ const AudioPlayer = () => {
|
||||
transform: "translateY(100%)",
|
||||
}}
|
||||
style={{
|
||||
width: `calc(100vw - ${theme.spacing(
|
||||
13,
|
||||
)} - 10px)`,
|
||||
width: `100%`,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.2,
|
||||
|
||||
@@ -9,6 +9,8 @@ import Paper from "@mui/material/Paper";
|
||||
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -34,6 +36,7 @@ import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import LikeButton from "../../components/buttons/likeButton";
|
||||
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -179,7 +182,18 @@ const MusicAlbumTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -418,7 +432,7 @@ const MusicAlbumTitlePage = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
@@ -32,6 +32,7 @@ import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import MusicTrack from "../../components/musicTrack";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -197,7 +198,18 @@ const ArtistTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -401,7 +413,7 @@ const ArtistTitlePage = () => {
|
||||
</TabPanel>
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
|
||||
@@ -6,6 +6,8 @@ import Box from "@mui/material/Box";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import { useParams, useNavigate } from "react-router-dom";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -149,7 +151,18 @@ const BoxSetTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -312,7 +325,7 @@ const BoxSetTitlePage = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
@@ -7,6 +7,8 @@ import CircularProgress from "@mui/material/CircularProgress";
|
||||
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -27,6 +29,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import { ActorCard } from "../../components/card/actorCards";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -175,7 +178,18 @@ const EpisodeTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY episode"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -270,7 +284,7 @@ const EpisodeTitlePage = () => {
|
||||
)}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
|
||||
@@ -1,20 +1,4 @@
|
||||
/** @format */
|
||||
.home {
|
||||
&-background {
|
||||
&-container {
|
||||
position: fixed !important;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
}
|
||||
&-backdrop {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
& > * {
|
||||
all: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hero-carousel {
|
||||
position: relative;
|
||||
@@ -23,9 +7,11 @@
|
||||
&-slide {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border-radius: 0px !important;
|
||||
width: 100%;
|
||||
border-radius: 10px !important;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
// box-shadow: 0 0 40px red;
|
||||
}
|
||||
&-background {
|
||||
&-blurhash {
|
||||
@@ -33,7 +19,7 @@
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
filter: brightness(0.7);
|
||||
filter: brightness(0.4);
|
||||
}
|
||||
&-container {
|
||||
position: absolute;
|
||||
@@ -42,17 +28,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
opacity: 0.8;
|
||||
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;
|
||||
filter: brightness(0.7);
|
||||
}
|
||||
&-image {
|
||||
position: absolute;
|
||||
@@ -67,23 +43,32 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
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 {
|
||||
position: absolute;
|
||||
background: $clr-gradient-dark;
|
||||
// background: url("/public/assetsStatic//meshbackground.png");
|
||||
// background: $clr-gradient-dark;
|
||||
background: url("/src/assets/herobg.png"), rgb(0 0 0 /0.3);
|
||||
z-index: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-blend-mode: overlay;
|
||||
.material-symbols-rounded {
|
||||
position: absolute;
|
||||
font-size: 15em !important;
|
||||
left: 70%;
|
||||
left: 80%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 50,
|
||||
"opsz" 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,7 +79,7 @@
|
||||
margin-bottom: 0.5em;
|
||||
&-logo {
|
||||
max-width: 9em;
|
||||
height: 3em;
|
||||
max-height: 3em;
|
||||
object-fit: contain;
|
||||
object-position: bottom;
|
||||
}
|
||||
@@ -105,15 +90,14 @@
|
||||
display: flex;
|
||||
height: 100%;
|
||||
width: 80%;
|
||||
padding: 2em;
|
||||
padding: 2.5em;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
padding-bottom: 5em;
|
||||
}
|
||||
&-indicator {
|
||||
&-container {
|
||||
width: calc(100% - 2em) !important;
|
||||
// width: calc(100% - 2em) !important;
|
||||
margin-top: -1em !important;
|
||||
margin-left: 1em !important;
|
||||
margin-right: 1em !important;
|
||||
|
||||
@@ -31,6 +31,7 @@ import ErrorBoundary from "../../components/errorBoundary";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import CarouselSlideError from "../../components/errors/carousel";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import { useSnackbar } from "notistack";
|
||||
|
||||
const Home = () => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
@@ -212,8 +213,10 @@ const Home = () => {
|
||||
<div
|
||||
className="padded-container"
|
||||
style={{
|
||||
padding: "1em",
|
||||
padding: "1.6em",
|
||||
scrollPadding: "4.4em",
|
||||
}}
|
||||
id="libraries"
|
||||
>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
|
||||
@@ -7,6 +7,8 @@ import CircularProgress from "@mui/material/CircularProgress";
|
||||
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -29,6 +31,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import { ActorCard } from "../../components/card/actorCards";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -200,9 +203,21 @@ const ItemDetail = () => {
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -320,7 +335,7 @@ const ItemDetail = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
@@ -369,7 +369,7 @@ const LibraryView = () => {
|
||||
);
|
||||
} else if (currentLib.isSuccess) {
|
||||
return (
|
||||
<main className="scrollY library">
|
||||
<main className="scrollY library padded-top">
|
||||
<div
|
||||
style={{
|
||||
padding: "1em 1em 1em 0.6em",
|
||||
@@ -378,7 +378,7 @@ const LibraryView = () => {
|
||||
zIndex: 10,
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
justifyContent: "flex-start",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
@@ -386,6 +386,7 @@ const LibraryView = () => {
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
width: "fit-content",
|
||||
padding: "0 1em",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
}
|
||||
|
||||
.library {
|
||||
padding: 0 !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -48,12 +49,10 @@
|
||||
align-items: start;
|
||||
}
|
||||
&-items {
|
||||
height: calc(100vh - 4em);
|
||||
height: calc(100vh - 8.4em);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding-bottom: 1em;
|
||||
padding-right: 1em;
|
||||
padding-top: 4.5em;
|
||||
padding: 1.5em 1em;
|
||||
&-header {
|
||||
position: absolute;
|
||||
top: 4.4em;
|
||||
|
||||
@@ -267,7 +267,18 @@ const PersonTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -446,7 +457,7 @@ const PersonTitlePage = () => {
|
||||
})}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { MdiMagnify } from "../../components/icons/mdiMagnify";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
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";
|
||||
|
||||
@@ -179,6 +179,7 @@ const SearchPage = () => {
|
||||
style: {
|
||||
border: "100px !important",
|
||||
},
|
||||
autoFocus: true,
|
||||
startAdornment: (
|
||||
<InputAdornment position="start">
|
||||
<div
|
||||
@@ -479,6 +480,31 @@ const SearchPage = () => {
|
||||
</CardScroller>
|
||||
)}
|
||||
</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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -117,7 +117,7 @@ const SeriesTitlePage = () => {
|
||||
const result = await getTvShowsApi(api).getSeasons({
|
||||
userId: user.data.Id,
|
||||
seriesId: item.data.Id,
|
||||
isSpecialSeason: false,
|
||||
// isSpecialSeason: false,
|
||||
});
|
||||
return result.data;
|
||||
},
|
||||
@@ -228,7 +228,18 @@ const SeriesTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -633,7 +644,7 @@ const SeriesTitlePage = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
+51
-5
@@ -47,9 +47,9 @@ body {
|
||||
width: calc(100% + 100px);
|
||||
height: calc(100% + 100px);
|
||||
position: absolute;
|
||||
top: -100px;
|
||||
left: -100px;
|
||||
z-index: -1;
|
||||
top: -50px;
|
||||
left: -50px;
|
||||
z-index: -2;
|
||||
filter: blur(120px) saturate(130%) contrast(140%);
|
||||
&-container {
|
||||
position: fixed;
|
||||
@@ -57,6 +57,8 @@ body {
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
filter: brightness(0.4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,8 +123,10 @@ h1 {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-left: 1em;
|
||||
padding-right: calc(1em + 14px);
|
||||
padding: 0 1.6em;
|
||||
&.padded-top {
|
||||
padding-top: 4.4em;
|
||||
}
|
||||
}
|
||||
|
||||
.home {
|
||||
@@ -167,3 +171,45 @@ h1 {
|
||||
.MuiListItemIcon-root {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ $clr-background-default: hsl(256, 100%, 6%);
|
||||
$clr-background-opacity-0_5: hsl(256, 100%, 6%, 50%);
|
||||
|
||||
$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-gradient-default: linear-gradient(
|
||||
|
||||
@@ -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%)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
Reference in new issue
Block a user