Compare 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
Prayag Prajapati 3db6249f71 Add Updater UI #231 2023-12-10 14:21:56 +05:30
renovate[bot] 2926e845d2 fix(deps): update material-ui monorepo (#230)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-10 10:58:52 +05:30
Prayag Prajapati ec6d5850d0 Update version to 0.0.2 in latest.json for testing 2023-12-08 16:57:25 +05:30
Prayag Prajapati 72a9f2cd39 update latest.json 2023-12-08 16:40:10 +05:30
Prayag Prajapati 874646a6dc Update package.json 2023-12-08 15:33:57 +05:30
Prayag Prajapati d84073ee03 Update updater key and versioning 2023-12-08 15:32:56 +05:30
Prayag Prajapati abca22763c Add env to workflow 2023-12-08 15:04:31 +05:30
Prayag Prajapati 2e62d3d2ee fix build.yml 2023-12-08 14:40:13 +05:30
Prayag Prajapati c477f62f69 Add updater #231 2023-12-08 14:35:46 +05:30
Prayag Prajapati 0af246cff2 Report playback end 2023-12-07 18:45:57 +05:30
renovate[bot] e095863afa fix(deps): update material-ui monorepo (#229)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 09:44:52 +05:30
renovate[bot] a290e83c19 fix(deps): update material-ui monorepo (#227)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 09:43:43 +05:30
dependabot[bot] f8545d2182 chore(deps-dev): bump vite from 5.0.0 to 5.0.5 (#228)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.0 to 5.0.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 09:43:32 +05:30
renovate[bot] 2b3c02b261 fix(deps): update rust crate tauri to 1.5.3 (#226)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-05 17:52:37 +05:30
renovate[bot] 9ce5f84fc5 fix(deps): update material-ui monorepo (#224)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-05 17:52:22 +05:30
43 changed files with 2175 additions and 992 deletions

No files matched your search

+4 -1
View File
@@ -14,6 +14,7 @@ jobs:
matrix: matrix:
platform: [macos-latest, ubuntu-22.04, windows-latest] platform: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
environment: TAURI
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -63,10 +64,12 @@ jobs:
run: pnpm install --no-frozen-lockfile && pnpm run build # Change this to npm, yarn or pnpm. run: pnpm install --no-frozen-lockfile && pnpm run build # Change this to npm, yarn or pnpm.
- name: Build the app - name: Build the app
uses: tauri-apps/tauri-action@v0 uses: tauri-apps/tauri-action@dev
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with: with:
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags. 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. releaseName: "App Name v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
+15
View File
@@ -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
View File
@@ -1,7 +1,7 @@
{ {
"name": "jellyplayer", "name": "jellyplayer",
"private": true, "private": true,
"version": "1.0.0", "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.153", "@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.0", "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"
+1180 -728
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 = "1.0.0" 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.2", features = [ "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"] }
+8 -7
View File
@@ -8,7 +8,7 @@
}, },
"package": { "package": {
"productName": "JellyPlayer", "productName": "JellyPlayer",
"version": "1.0.0" "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",
@@ -100,7 +96,12 @@
] ]
}, },
"updater": { "updater": {
"active": false "active": true,
"endpoints": [
"https://raw.githack.com/prayag17/JellyPlayer/main/latest.json"
],
"dialog": false,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDk5QkE0QjMzOEQyRUI5M0MKUldROHVTNk5NMHU2bVMvS3VNRWZHRzhuWE1TRlg3WHI1VHBtZjFvVy80alZ2UHc4T3BqcHVGOWwK"
}, },
"windows": [ "windows": [
{ {
+148 -4
View File
@@ -16,6 +16,11 @@ import {
} from "react-router-dom"; } from "react-router-dom";
import { AnimatePresence, motion } from "framer-motion"; import { AnimatePresence, motion } from "framer-motion";
import {
checkUpdate,
installUpdate,
onUpdaterEvent,
} from "@tauri-apps/api/updater";
import { relaunch } from "@tauri-apps/api/process"; import { relaunch } from "@tauri-apps/api/process";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api"; 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 Button from "@mui/material/Button";
import Slide from "@mui/material/Slide"; import Slide from "@mui/material/Slide";
import LinearProgress from "@mui/material/LinearProgress"; 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 // Routes
import { ServerSetup } from "./routes/setup/server"; import { ServerSetup } from "./routes/setup/server";
@@ -49,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";
@@ -91,6 +101,9 @@ import { useQuery } from "@tanstack/react-query";
import { CircularProgress } from "@mui/material"; 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 { ErrorBoundary } from "react-error-boundary";
import { ErrorNotice } from "./components/notices/errorNotice/errorNotice.jsx";
const anim = { const anim = {
initial: { 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() { function App() {
const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [ const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [
state.isPending, state.isPending,
@@ -204,6 +225,43 @@ function App() {
"a", "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]); 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 <Dialog
open={easterEgg} open={easterEgg}
onClose={() => setEasterEgg(false)} onClose={() => setEasterEgg(false)}
@@ -318,14 +459,15 @@ function App() {
}} }}
> >
<CssBaseline /> <CssBaseline />
<SideMenu /> {/* <SideMenu /> */}
<AppBar /> <AppBar />
<AudioPlayer key={audioPlayerVisible} /> <AudioPlayer key={audioPlayerVisible} />
<ErrorBoundary FallbackComponent={ErrorNotice}>
<Routes location={location}> <Routes location={location}>
<Route {/* <Route
// key={location.key} // key={location.key}
element={<AnimationWrapper />} element={<AnimationWrapper />}
> > */}
<Route <Route
path="/" path="/"
exact exact
@@ -423,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
@@ -473,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>
+153 -12
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,28 +160,127 @@ 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%",
}}
>
<div
className="flex flex-row flex-center"
style={{
gap: "1.2em", gap: "1.2em",
justifySelf: "start",
}} }}
> >
<IconButton <IconButton
onClick={() => navigate(-1)} onClick={() => navigate(-1)}
disabled={!backButtonVisible} disabled={!backButtonVisible}
style={{
justifySelf: "left",
}}
> >
<div className="material-symbols-rounded"> <div className="material-symbols-rounded">
arrow_back arrow_back
</div> </div>
</IconButton> </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")}> <IconButton onClick={() => navigate("/search")}>
<div className="material-symbols-rounded"> <div className="material-symbols-rounded">
search search
@@ -155,9 +291,13 @@ export const AppBar = () => {
favorite favorite
</div> </div>
</IconButton> </IconButton>
<IconButton sx={{ p: 0 }} onClick={handleMenuOpen}> <IconButton
sx={{ p: 0 }}
onClick={handleMenuOpen}
>
{user.isSuccess && {user.isSuccess &&
(user.data.PrimaryImageTag == undefined ? ( (user.data.PrimaryImageTag ==
undefined ? (
<Avatar <Avatar
className="appBar-avatar" className="appBar-avatar"
alt={user.data.Name} alt={user.data.Name}
@@ -183,7 +323,7 @@ export const AppBar = () => {
anchorEl={anchorEl} anchorEl={anchorEl}
open={openMenu} open={openMenu}
onClose={handleMenuClose} onClose={handleMenuClose}
sx={{ mt: 1 }} sx={{ mt: 2 }}
disableScrollLock disableScrollLock
> >
<MenuItem <MenuItem
@@ -226,6 +366,7 @@ export const AppBar = () => {
Select Server Select Server
</MenuItem> </MenuItem>
</Menu> </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) => {
+2
View File
@@ -8,6 +8,7 @@ import LinearProgress from "@mui/material/LinearProgress";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import { import {
setItem,
usePlaybackDataLoadStore, usePlaybackDataLoadStore,
usePlaybackStore, usePlaybackStore,
} from "../../utils/store/playback"; } from "../../utils/store/playback";
@@ -210,6 +211,7 @@ const PlayButton = ({
setSubtitleStreamIndex(currentSubTrack); setSubtitleStreamIndex(currentSubTrack);
setMediaSourceId(item.Items[0].Id); setMediaSourceId(item.Items[0].Id);
setItem(item.Items[0]);
switch (item.Items[0].Type) { switch (item.Items[0].Type) {
case BaseItemKind.Movie: case BaseItemKind.Movie:
+18 -25
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,21 +88,17 @@ 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],
}} }}
> >
{/* {!!item.UserData && ( <ErrorBoundary fallback={<></>}>
<>
<div <div
className="card-indicator check" className="card-indicator check"
style={{ style={{
opacity: item.UserData?.Played opacity: item.UserData?.Played ? 1 : 0,
? 1
: 0,
}} }}
> >
<div className="material-symbols-rounded"> <div className="material-symbols-rounded">
@@ -118,8 +108,7 @@ export const Card = ({
<div <div
className={`card-indicator text`} className={`card-indicator text`}
style={{ style={{
opacity: item.UserData opacity: item.UserData?.UnplayedItemCount
?.UnplayedItemCount
? 1 ? 1
: 0, : 0,
}} }}
@@ -132,8 +121,7 @@ export const Card = ({
{item.UserData?.UnplayedItemCount} {item.UserData?.UnplayedItemCount}
</Typography> </Typography>
</div> </div>
</> </ErrorBoundary>
)} */}
{/* {!!imageBlurhash && ( {/* {!!imageBlurhash && (
<Blurhash <Blurhash
hash={imageBlurhash} hash={imageBlurhash}
@@ -161,9 +149,14 @@ export const Card = ({
: item.Id, : item.Id,
imageType, imageType,
{ {
quality: 85, quality: 90,
fillHeight: 462, fillHeight: 226,
fillWidth: 462, fillWidth: Math.floor(
226 /
cardImageAspectRatios[
cardType
],
),
}, },
) )
} }
@@ -176,8 +169,9 @@ export const Card = ({
onLoad={(e) => (e.target.style.opacity = 1)} onLoad={(e) => (e.target.style.opacity = 1)}
className="card-image" className="card-image"
/> />
{!disableOverlay && (
<div className="card-overlay"> <div className="card-overlay">
{!disableOverlay && (
<>
<PlayButton <PlayButton
itemId={item.Id} itemId={item.Id}
userId={userId} userId={userId}
@@ -217,8 +211,9 @@ export const Card = ({
queryKey={queryKey} queryKey={queryKey}
userId={userId} userId={userId}
/> />
</div> </>
)} )}
</div>
{item.UserData?.PlaybackPositionTicks > 0 && ( {item.UserData?.PlaybackPositionTicks > 0 && (
<LinearProgress <LinearProgress
variant="determinate" variant="determinate"
@@ -230,8 +225,7 @@ export const Card = ({
bottom: 0, bottom: 0,
zIndex: 2, zIndex: 2,
height: "6px", height: "6px",
background: background: "rgb(5 5 5 / 0.5) !important",
"rgb(5 5 5 / 0.5) !important",
backdropFilter: "blur(5px)", backdropFilter: "blur(5px)",
}} }}
color="primary" color="primary"
@@ -262,6 +256,5 @@ export const Card = ({
</Typography> </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");
+147 -39
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,6 +128,33 @@ const CarouselSlide = ({ item }) => {
</div> </div>
</div> </div>
<motion.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)",
// opacity: 0,
// }}
// transition={{
// duration: 0.25,
// ease: "easeInOut",
// }}
className="hero-carousel-detail"
>
<Typography
component={motion.div}
initial={{ initial={{
transform: transform:
animationDirection == "right" animationDirection == "right"
@@ -150,14 +178,11 @@ const CarouselSlide = ({ item }) => {
duration: 0.25, duration: 0.25,
ease: "easeInOut", ease: "easeInOut",
}} }}
className="hero-carousel-detail"
>
<Typography
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
direction="row" component={motion.div}
gap={1} initial={{
divider={ transform:
<div animationDirection == "right"
style={{ ? "translateX(20px)"
width: "4px", : "translateX(-20px)",
height: "4px", opacity: 0,
background: "white",
alignSelf: "center",
aspectRatio: 1,
borderRadius: "10px",
}} }}
></div> 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={2}
className="hero-carousel-info" className="hero-carousel-info"
mt={1}
justifyItems="flex-start"
alignItems="center"
>
<Typography
style={{ opacity: "0.8" }}
variant="subtitle1"
> >
<Typography variant="subtitle1">
{item.ProductionYear {item.ProductionYear
? item.ProductionYear ? item.ProductionYear
: "Unknown"} : "Unknown"}
@@ -209,6 +253,7 @@ const CarouselSlide = ({ item }) => {
variant="filled" variant="filled"
label={item.OfficialRating ?? "Not Rated"} label={item.OfficialRating ?? "Not Rated"}
/> />
<ErrorBoundary fallback={<></>}>
<div <div
style={{ style={{
display: "flex", display: "flex",
@@ -217,38 +262,101 @@ const CarouselSlide = ({ item }) => {
}} }}
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
{item.CommunityRating ? ( <div
<> className="material-symbols-rounded "
<MdiStar style={{
sx={{ // fontSize: "2.2em",
color: yellow[700], color: yellow[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
/> >
<Typography variant="subtitle1"> star
</div>
<Typography
style={{
opacity: "0.8",
}}
variant="subtitle1"
>
{Math.round( {Math.round(
item.CommunityRating * item.CommunityRating * 10,
10,
) / 10} ) / 10}
</Typography> </Typography>
</>
) : (
<Typography variant="subtitle1">
No Community Rating
</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}`);
} }
+41 -14
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,6 +418,7 @@ const Hero = ({
item.OfficialRating ?? "Not Rated" item.OfficialRating ?? "Not Rated"
} }
/> />
<ErrorBoundary fallback={<></>}>
<div <div
style={{ style={{
display: "flex", display: "flex",
@@ -426,13 +427,17 @@ const Hero = ({
}} }}
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
{item.CommunityRating ? ( <div
<> className="material-symbols-rounded "
<MdiStar style={{
sx={{ // fontSize: "2.2em",
color: yellow[700], color: yellow[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
/> >
star
</div>
<Typography <Typography
style={{ style={{
opacity: "0.8", opacity: "0.8",
@@ -444,16 +449,38 @@ const Hero = ({
10, 10,
) / 10} ) / 10}
</Typography> </Typography>
</> </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 <Typography
style={{ opacity: "0.8" }} style={{
opacity: "0.8",
}}
variant="subtitle1" variant="subtitle1"
> >
No Community Rating {item.CriticRating}
</Typography> </Typography>
)}
</div> </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) {
+13
View File
@@ -83,6 +83,7 @@ export const VideoPlayer = () => {
setMediaSourceId, setMediaSourceId,
setUserId, setUserId,
setSeriesId, setSeriesId,
item,
] = usePlaybackStore((state) => [ ] = usePlaybackStore((state) => [
state.url, state.url,
state.startPosition, state.startPosition,
@@ -104,6 +105,7 @@ export const VideoPlayer = () => {
state.setMediaSourceId, state.setMediaSourceId,
state.setUserId, state.setUserId,
state.setSeriesId, state.setSeriesId,
state.item,
]); ]);
const mediaInfo = useQuery({ const mediaInfo = useQuery({
@@ -504,6 +506,17 @@ export const VideoPlayer = () => {
const handleExit = async () => { const handleExit = async () => {
// Remove app from fullscreen // Remove app from fullscreen
await appWindow.setFullscreen(false); await appWindow.setFullscreen(false);
// Send playback end report
await getPlaystateApi(api).reportPlaybackStopped({
playbackStopInfo: {
Failed: false,
Item: item,
ItemId: itemId,
MediaSourceId: mediaInfo.data?.MediaSources[0].Id,
PlaySessionId: mediaInfo.data?.PlaySessionId,
PositionTicks: currentTime,
},
});
navigate(-1); navigate(-1);
// Reset playback store // Reset playback store
+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%)",
},
},
},
}, },
}); });
+6
View File
@@ -19,6 +19,10 @@ export const usePlaybackStore = create((set) => ({
seriesId: "", seriesId: "",
queue: [], queue: [],
episodeIndex: 0, episodeIndex: 0,
/**
* @type {import("@jellyfin/sdk/lib/generated-client/models/base-item-dto").BaseItemDto}
*/
item: {},
setUrl: (aurl) => set((state) => ({ ...state, url: aurl })), setUrl: (aurl) => set((state) => ({ ...state, url: aurl })),
setPosition: (apos) => set((state) => ({ ...state, startPosition: apos })), setPosition: (apos) => set((state) => ({ ...state, startPosition: apos })),
setDuration: (adur) => set((state) => ({ ...state, duration: adur })), setDuration: (adur) => set((state) => ({ ...state, duration: adur })),
@@ -47,6 +51,8 @@ export const usePlaybackStore = create((set) => ({
setEpisodeIndex: (aitem) => setEpisodeIndex: (aitem) =>
set((state) => ({ ...state, episodeIndex: aitem })), set((state) => ({ ...state, episodeIndex: aitem })),
})); }));
export const setItem = (item) =>
usePlaybackStore.setState((state) => ({ ...state, item: item }));
export const usePlaybackDataLoadStore = create((set) => ({ export const usePlaybackDataLoadStore = create((set) => ({
isPending: false, isPending: false,