Improve home-carousel display for smaller displays
This commit is contained in:
8 files changed
+324
-134
No files matched your search
+44
-47
@@ -1,52 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Jellyplayer</title>
|
||||
<script src="http://localhost:8097"></script>
|
||||
<style>
|
||||
.app-loading {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: hsl(256, 100%, 4%);
|
||||
z-index: 100000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
transition: opacity 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
.app-loading.hidden {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Jellyplayer</title>
|
||||
<style>
|
||||
.app-loading {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: hsl(256, 100%, 4%);
|
||||
z-index: 100000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
transition: opacity 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
.app-loading-logo {
|
||||
width: 65vw;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
.app-loading.hidden {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
<body>
|
||||
<div class="app-loading">
|
||||
<img src="./assetsStatic/LogoBig.svg" class="app-loading-logo" />
|
||||
</div>
|
||||
<div id="root"></div>
|
||||
<svg
|
||||
style="width: 0; height: 0; position: absolute"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
>
|
||||
<linearGradient id="clr-gradient-default" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="hsl(337, 96%, 56%)" />
|
||||
<stop offset="100%" stop-color="hsl(273, 100%, 36%)" />
|
||||
</linearGradient>
|
||||
</svg>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
.app-loading-logo {
|
||||
width: 65vw;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="app-loading">
|
||||
<img src="./assetsStatic/LogoBig.svg" class="app-loading-logo" />
|
||||
</div>
|
||||
<div id="root"></div>
|
||||
<svg style="width: 0; height: 0; position: absolute" aria-hidden="true" focusable="false">
|
||||
<linearGradient id="clr-gradient-default" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="hsl(337, 96%, 56%)" />
|
||||
<stop offset="100%" stop-color="hsl(273, 100%, 36%)" />
|
||||
</linearGradient>
|
||||
</svg>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -42,6 +42,7 @@
|
||||
"react-player": "^2.14.1",
|
||||
"react-router-dom": "^6.21.1",
|
||||
"react-use-konami": "^1.1.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||
"typescript": "^5.3.3",
|
||||
|
||||
Generated
+183
@@ -95,6 +95,9 @@ dependencies:
|
||||
react-use-konami:
|
||||
specifier: ^1.1.0
|
||||
version: 1.1.0(react-dom@18.2.0)(react@18.2.0)
|
||||
remark-gfm:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
tauri-plugin-log-api:
|
||||
specifier: github:tauri-apps/tauri-plugin-log#v1
|
||||
version: github.com/tauri-apps/tauri-plugin-log/19f5dcc0425e9127d2c591780e5047b83e77a7c2
|
||||
@@ -2222,6 +2225,11 @@ packages:
|
||||
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
/escape-string-regexp@5.0.0:
|
||||
resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
|
||||
engines: {node: '>=12'}
|
||||
dev: false
|
||||
|
||||
/eslint-plugin-react-refresh@0.4.5(eslint@8.56.0):
|
||||
resolution: {integrity: sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==}
|
||||
peerDependencies:
|
||||
@@ -3023,10 +3031,23 @@ packages:
|
||||
dependencies:
|
||||
yallist: 3.1.1
|
||||
|
||||
/markdown-table@3.0.3:
|
||||
resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==}
|
||||
dev: false
|
||||
|
||||
/material-symbols@0.14.4:
|
||||
resolution: {integrity: sha512-a4gUxar/H+enN+hc5b/XE3Sroqyb9eT9hqkoTl6HXoW2mIajQ9mLW1T1tgjfq6KX6zqU1aLOV27mddUSHrgYAA==}
|
||||
dev: false
|
||||
|
||||
/mdast-util-find-and-replace@3.0.1:
|
||||
resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
escape-string-regexp: 5.0.0
|
||||
unist-util-is: 6.0.0
|
||||
unist-util-visit-parents: 6.0.1
|
||||
dev: false
|
||||
|
||||
/mdast-util-from-markdown@2.0.0:
|
||||
resolution: {integrity: sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==}
|
||||
dependencies:
|
||||
@@ -3046,6 +3067,75 @@ packages:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/mdast-util-gfm-autolink-literal@2.0.0:
|
||||
resolution: {integrity: sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
ccount: 2.0.1
|
||||
devlop: 1.1.0
|
||||
mdast-util-find-and-replace: 3.0.1
|
||||
micromark-util-character: 2.0.1
|
||||
dev: false
|
||||
|
||||
/mdast-util-gfm-footnote@2.0.0:
|
||||
resolution: {integrity: sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
devlop: 1.1.0
|
||||
mdast-util-from-markdown: 2.0.0
|
||||
mdast-util-to-markdown: 2.1.0
|
||||
micromark-util-normalize-identifier: 2.0.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/mdast-util-gfm-strikethrough@2.0.0:
|
||||
resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
mdast-util-from-markdown: 2.0.0
|
||||
mdast-util-to-markdown: 2.1.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/mdast-util-gfm-table@2.0.0:
|
||||
resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
devlop: 1.1.0
|
||||
markdown-table: 3.0.3
|
||||
mdast-util-from-markdown: 2.0.0
|
||||
mdast-util-to-markdown: 2.1.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/mdast-util-gfm-task-list-item@2.0.0:
|
||||
resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
devlop: 1.1.0
|
||||
mdast-util-from-markdown: 2.0.0
|
||||
mdast-util-to-markdown: 2.1.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/mdast-util-gfm@3.0.0:
|
||||
resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==}
|
||||
dependencies:
|
||||
mdast-util-from-markdown: 2.0.0
|
||||
mdast-util-gfm-autolink-literal: 2.0.0
|
||||
mdast-util-gfm-footnote: 2.0.0
|
||||
mdast-util-gfm-strikethrough: 2.0.0
|
||||
mdast-util-gfm-table: 2.0.0
|
||||
mdast-util-gfm-task-list-item: 2.0.0
|
||||
mdast-util-to-markdown: 2.1.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/mdast-util-mdx-expression@2.0.0:
|
||||
resolution: {integrity: sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==}
|
||||
dependencies:
|
||||
@@ -3156,6 +3246,78 @@ packages:
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-extension-gfm-autolink-literal@2.0.0:
|
||||
resolution: {integrity: sha512-rTHfnpt/Q7dEAK1Y5ii0W8bhfJlVJFnJMHIPisfPK3gpVNuOP0VnRl96+YJ3RYWV/P4gFeQoGKNlT3RhuvpqAg==}
|
||||
dependencies:
|
||||
micromark-util-character: 2.0.1
|
||||
micromark-util-sanitize-uri: 2.0.0
|
||||
micromark-util-symbol: 2.0.0
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-extension-gfm-footnote@2.0.0:
|
||||
resolution: {integrity: sha512-6Rzu0CYRKDv3BfLAUnZsSlzx3ak6HAoI85KTiijuKIz5UxZxbUI+pD6oHgw+6UtQuiRwnGRhzMmPRv4smcz0fg==}
|
||||
dependencies:
|
||||
devlop: 1.1.0
|
||||
micromark-core-commonmark: 2.0.0
|
||||
micromark-factory-space: 2.0.0
|
||||
micromark-util-character: 2.0.1
|
||||
micromark-util-normalize-identifier: 2.0.0
|
||||
micromark-util-sanitize-uri: 2.0.0
|
||||
micromark-util-symbol: 2.0.0
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-extension-gfm-strikethrough@2.0.0:
|
||||
resolution: {integrity: sha512-c3BR1ClMp5fxxmwP6AoOY2fXO9U8uFMKs4ADD66ahLTNcwzSCyRVU4k7LPV5Nxo/VJiR4TdzxRQY2v3qIUceCw==}
|
||||
dependencies:
|
||||
devlop: 1.1.0
|
||||
micromark-util-chunked: 2.0.0
|
||||
micromark-util-classify-character: 2.0.0
|
||||
micromark-util-resolve-all: 2.0.0
|
||||
micromark-util-symbol: 2.0.0
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-extension-gfm-table@2.0.0:
|
||||
resolution: {integrity: sha512-PoHlhypg1ItIucOaHmKE8fbin3vTLpDOUg8KAr8gRCF1MOZI9Nquq2i/44wFvviM4WuxJzc3demT8Y3dkfvYrw==}
|
||||
dependencies:
|
||||
devlop: 1.1.0
|
||||
micromark-factory-space: 2.0.0
|
||||
micromark-util-character: 2.0.1
|
||||
micromark-util-symbol: 2.0.0
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-extension-gfm-tagfilter@2.0.0:
|
||||
resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==}
|
||||
dependencies:
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-extension-gfm-task-list-item@2.0.1:
|
||||
resolution: {integrity: sha512-cY5PzGcnULaN5O7T+cOzfMoHjBW7j+T9D2sucA5d/KbsBTPcYdebm9zUd9zzdgJGCwahV+/W78Z3nbulBYVbTw==}
|
||||
dependencies:
|
||||
devlop: 1.1.0
|
||||
micromark-factory-space: 2.0.0
|
||||
micromark-util-character: 2.0.1
|
||||
micromark-util-symbol: 2.0.0
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-extension-gfm@3.0.0:
|
||||
resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==}
|
||||
dependencies:
|
||||
micromark-extension-gfm-autolink-literal: 2.0.0
|
||||
micromark-extension-gfm-footnote: 2.0.0
|
||||
micromark-extension-gfm-strikethrough: 2.0.0
|
||||
micromark-extension-gfm-table: 2.0.0
|
||||
micromark-extension-gfm-tagfilter: 2.0.0
|
||||
micromark-extension-gfm-task-list-item: 2.0.1
|
||||
micromark-util-combine-extensions: 2.0.0
|
||||
micromark-util-types: 2.0.0
|
||||
dev: false
|
||||
|
||||
/micromark-factory-destination@2.0.0:
|
||||
resolution: {integrity: sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==}
|
||||
dependencies:
|
||||
@@ -3728,6 +3890,19 @@ packages:
|
||||
set-function-name: 2.0.1
|
||||
dev: true
|
||||
|
||||
/remark-gfm@4.0.0:
|
||||
resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
mdast-util-gfm: 3.0.0
|
||||
micromark-extension-gfm: 3.0.0
|
||||
remark-parse: 11.0.0
|
||||
remark-stringify: 11.0.0
|
||||
unified: 11.0.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/remark-parse@11.0.0:
|
||||
resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==}
|
||||
dependencies:
|
||||
@@ -3749,6 +3924,14 @@ packages:
|
||||
vfile: 6.0.1
|
||||
dev: false
|
||||
|
||||
/remark-stringify@11.0.0:
|
||||
resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==}
|
||||
dependencies:
|
||||
'@types/mdast': 4.0.3
|
||||
mdast-util-to-markdown: 2.1.0
|
||||
unified: 11.0.4
|
||||
dev: false
|
||||
|
||||
/requires-port@1.0.0:
|
||||
resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==}
|
||||
dev: false
|
||||
|
||||
+48
-58
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import React, { useState, useEffect, useLayoutEffect } from "react";
|
||||
|
||||
import { ThemeProvider } from "@mui/material/styles";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
@@ -27,15 +27,17 @@ import LoadingButton from "@mui/lab/LoadingButton";
|
||||
import Button from "@mui/material/Button";
|
||||
|
||||
// MUI
|
||||
import Dialog from "@mui/material/Dialog";
|
||||
import DialogActions from "@mui/material/DialogActions";
|
||||
import DialogContent from "@mui/material/DialogContent";
|
||||
import DialogContentText from "@mui/material/DialogContentText";
|
||||
import DialogTitle from "@mui/material/DialogTitle";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import {
|
||||
Chip,
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogTitle,
|
||||
IconButton,
|
||||
LinearProgress,
|
||||
SvgIcon,
|
||||
} from "@mui/material";
|
||||
|
||||
// Routes
|
||||
import About from "./routes/about";
|
||||
@@ -63,6 +65,7 @@ import { ServerSetup } from "./routes/setup/server";
|
||||
import ServerList from "./routes/setup/serverList/index.jsx";
|
||||
|
||||
import Markdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
|
||||
// Fonts
|
||||
import "@fontsource-variable/jetbrains-mono";
|
||||
@@ -99,12 +102,12 @@ import { setInitialRoute, useCentralStore } from "./utils/store/central.js";
|
||||
import { usePlaybackDataLoadStore } from "./utils/store/playback";
|
||||
|
||||
// 3rd Party
|
||||
import { Api } from "@jellyfin/sdk";
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { CircularProgress } from "@mui/material";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
|
||||
import { EasterEgg } from "./components/utils/easterEgg.jsx";
|
||||
import { handleRelaunch } from "./utils/misc/relaunch";
|
||||
import {
|
||||
@@ -117,38 +120,6 @@ import {
|
||||
import { UserStore, delUser, getUser } from "./utils/storage/user";
|
||||
import { createApi, useApi } from "./utils/store/api";
|
||||
|
||||
// const anim = {
|
||||
// initial: {
|
||||
// transform: "scale(0.98)",
|
||||
// opacity: 0,
|
||||
// },
|
||||
// animate: {
|
||||
// transform: "scale(1)",
|
||||
// opacity: 1,
|
||||
// },
|
||||
// exit: {
|
||||
// transform: "sscale(1.02)",
|
||||
// opacity: 0,
|
||||
// },
|
||||
// };
|
||||
// const AnimationWrapper = () => {
|
||||
// return (
|
||||
// <motion.div
|
||||
// className="root-page"
|
||||
// variants={anim}
|
||||
// initial="initial"
|
||||
// animate="animate"
|
||||
// exit="exit"
|
||||
// transition={{
|
||||
// duration: 0.25,
|
||||
// ease: "easeInOut",
|
||||
// }}
|
||||
// >
|
||||
// <Outlet />
|
||||
// </motion.div>
|
||||
// );
|
||||
// };
|
||||
|
||||
const handleAuthError = async () => {
|
||||
await delUser();
|
||||
setInitialRoute("/login/index");
|
||||
@@ -273,7 +244,7 @@ function AppReady() {
|
||||
window.scrollTo(0, 0);
|
||||
}, [location.key]);
|
||||
|
||||
useEffect(() => {
|
||||
useLayoutEffect(() => {
|
||||
async function checkForUpdates() {
|
||||
try {
|
||||
const { shouldUpdate, manifest } = await checkUpdate();
|
||||
@@ -289,7 +260,7 @@ function AppReady() {
|
||||
}
|
||||
}
|
||||
checkForUpdates();
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!initialRoute) {
|
||||
return (
|
||||
@@ -322,27 +293,42 @@ function AppReady() {
|
||||
/>
|
||||
)}
|
||||
<Dialog
|
||||
// open={true}
|
||||
open={updateDialog}
|
||||
// onClose={}
|
||||
// maxWidth="md"
|
||||
fullWidth
|
||||
PaperProps={{
|
||||
style: {
|
||||
borderRadius: "14px",
|
||||
background: "rgb(0 0 0 / 0.5)",
|
||||
backdropFilter: "blur(10px)",
|
||||
border: "1px solid rgb(255 255 255 / 0.2)",
|
||||
},
|
||||
}}
|
||||
>
|
||||
{updateInfo !== undefined && (
|
||||
<>
|
||||
<DialogTitle>
|
||||
<DialogTitle
|
||||
variant="h5"
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "flex-start",
|
||||
gap: "0.4em",
|
||||
}}
|
||||
>
|
||||
Update Available!
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.5",
|
||||
}}
|
||||
>
|
||||
v{updateInfo.version}
|
||||
</Typography>
|
||||
<Chip
|
||||
icon={
|
||||
<span className="material-symbols-rounded">update</span>
|
||||
}
|
||||
label={`v${updateInfo.version}`}
|
||||
color="success"
|
||||
/>
|
||||
</DialogTitle>
|
||||
<DialogContent dividers>
|
||||
<DialogContentText>
|
||||
<Markdown>{updateInfo.body}</Markdown>
|
||||
<Markdown remarkPlugins={[remarkGfm]}>
|
||||
{updateInfo.body}
|
||||
</Markdown>
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions
|
||||
@@ -350,7 +336,11 @@ function AppReady() {
|
||||
padding: "1em",
|
||||
}}
|
||||
>
|
||||
<IconButton disabled={updateDialogButton}>
|
||||
<IconButton
|
||||
disabled={updateDialogButton}
|
||||
target="_blank"
|
||||
href={`https://github.com/prayag17/JellyPlayer/releases/${updateInfo.version}`}
|
||||
>
|
||||
<SvgIcon>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.carousel {
|
||||
position: relative;
|
||||
height: 70vh;
|
||||
margin: 4.4em 1.6em 1.6em 1.6em;
|
||||
margin: 0.6em 1.6em 1.6em 1.6em;
|
||||
&-button {
|
||||
position: absolute !important;
|
||||
top: 50%;
|
||||
|
||||
@@ -24,7 +24,7 @@ const Carousel = ({ content, onChange }) => {
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
||||
useEffect(() => {
|
||||
onChange(currentSlide);
|
||||
}, [content[currentSlide].key]);
|
||||
}, [content[currentSlide]?.key]);
|
||||
|
||||
return (
|
||||
<div className="carousel">
|
||||
|
||||
@@ -113,3 +113,23 @@
|
||||
$clr-background-light
|
||||
);
|
||||
}
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
.carousel{
|
||||
height: 60vh !important;
|
||||
}
|
||||
.hero-carousel{
|
||||
&-background-image{
|
||||
width: 100%;
|
||||
}
|
||||
&-text {
|
||||
-webkit-line-clamp: 2 !important;
|
||||
&-logo {
|
||||
max-width: 7em;
|
||||
max-height: 2em;
|
||||
object-fit: contain;
|
||||
object-position: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+26
-27
@@ -26,9 +26,10 @@ import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import { BaseItemKind, ItemFields } from "@jellyfin/sdk/lib/generated-client";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
import CarouselSlide from "../../components/carouselSlide";
|
||||
import ErrorBoundary from "../../components/errorBoundary";
|
||||
import CarouselSlideError from "../../components/errors/carousel";
|
||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
const Home = () => {
|
||||
@@ -70,13 +71,13 @@ const Home = () => {
|
||||
ItemFields.MediaStreams,
|
||||
ItemFields.MediaSources,
|
||||
],
|
||||
// limit: 16,
|
||||
enableUserData: true,
|
||||
enableImages: true,
|
||||
});
|
||||
return media.data;
|
||||
},
|
||||
enabled: !!user.data,
|
||||
networkMode: "always",
|
||||
});
|
||||
|
||||
const resumeItemsVideo = useQuery({
|
||||
@@ -92,7 +93,6 @@ const Home = () => {
|
||||
return resumeItems.data;
|
||||
},
|
||||
enabled: !!user.data,
|
||||
networkMode: "always",
|
||||
});
|
||||
|
||||
const resumeItemsAudio = useQuery({
|
||||
@@ -108,7 +108,6 @@ const Home = () => {
|
||||
return resumeItems.data;
|
||||
},
|
||||
enabled: !!user.data,
|
||||
networkMode: "always",
|
||||
});
|
||||
|
||||
const upNextItems = useQuery({
|
||||
@@ -129,7 +128,6 @@ const Home = () => {
|
||||
return upNext.data;
|
||||
},
|
||||
enabled: !!user.data,
|
||||
networkMode: "always",
|
||||
});
|
||||
|
||||
const [latestMediaLibs, setLatestMediaLibs] = useState([]);
|
||||
@@ -166,37 +164,38 @@ const Home = () => {
|
||||
return (
|
||||
<>
|
||||
<main
|
||||
className="scrollY home"
|
||||
className="scrollY home padded-top"
|
||||
style={{
|
||||
flexGrow: 1,
|
||||
// paddingBottom: "3em",
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
<ErrorBoundary fallback={<CarouselSlideError />}>
|
||||
<ErrorBoundary FallbackComponent={ErrorNotice}>
|
||||
{latestMedia.isPending ? (
|
||||
<CarouselSkeleton />
|
||||
) : (
|
||||
<Carousel
|
||||
content={latestMedia.data?.map((item) => (
|
||||
<CarouselSlide item={item} key={item.Id} />
|
||||
))}
|
||||
onChange={(now) => {
|
||||
if (latestMedia.isSuccess) {
|
||||
if (latestMedia.data[now].ParentBackdropImageTags) {
|
||||
setAppBackdrop(
|
||||
`${api.basePath}/Items/${latestMedia.data[now].ParentBackdropItemId}/Images/Backdrop`,
|
||||
latestMedia.data[now].Id,
|
||||
);
|
||||
} else {
|
||||
setAppBackdrop(
|
||||
`${api.basePath}/Items/${latestMedia.data[now].Id}/Images/Backdrop`,
|
||||
latestMedia.data[now].Id,
|
||||
);
|
||||
latestMedia.data.length > 0 && (
|
||||
<Carousel
|
||||
content={latestMedia.data?.map((item) => (
|
||||
<CarouselSlide item={item} key={item.Id} />
|
||||
))}
|
||||
onChange={(now) => {
|
||||
if (latestMedia.isSuccess && latestMedia.data.length > 0) {
|
||||
if (latestMedia.data[now]?.ParentBackdropImageTags) {
|
||||
setAppBackdrop(
|
||||
`${api.basePath}/Items/${latestMedia.data[now].ParentBackdropItemId}/Images/Backdrop`,
|
||||
latestMedia.data[now].Id,
|
||||
);
|
||||
} else {
|
||||
setAppBackdrop(
|
||||
`${api.basePath}/Items/${latestMedia.data[now].Id}/Images/Backdrop`,
|
||||
latestMedia.data[now].Id,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
}}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
|
||||
|
||||
Reference in new issue
Block a user