fix: subtitles not being rendered #401

This commit is contained in:
Prayag Prajapati committed 2024-11-15 19:53:40 +05:30
1 parent e91834ad6d
commit d641ddfc98
16 files changed
+591 -652

No files matched your search

+2 -9
View File
@@ -1,4 +1,3 @@
import useDebounce from "@/utils/hooks/useDebounce";
import React, {
type ReactNode,
useCallback,
@@ -11,12 +10,7 @@ import { useSpring } from "@react-spring/web";
import { debounce } from "lodash";
import "./style.scss";
import { Button, IconButton } from "@mui/material";
enum Direction {
RIGHT = 0,
LEFT = 1,
}
import { IconButton } from "@mui/material";
const Slider = ({
content,
@@ -148,13 +142,13 @@ const Slider = ({
className="slider-button left"
onClick={slideLeft}
disabled={scrollPos.isStart}
variant="contained"
>
<span className="material-symbols-rounded">chevron_left</span>
</IconButton>
<div className="slider-track" ref={containerRef} onScroll={onScroll}>
{content?.map((item, index) => (
<div
//biome-ignore lint/suspicious/noArrayIndexKey: item does not have a unique key
key={index}
className={
currentSlide === index
@@ -170,7 +164,6 @@ const Slider = ({
className="slider-button right"
onClick={slideRight}
disabled={scrollPos.isEnd}
variant="contained"
>
<span className="material-symbols-rounded">chevron_right</span>
</IconButton>
+1 -1
View File
@@ -76,7 +76,7 @@ const QueueButton = () => {
position: "relative",
}}
>
{queueItems[currentItemIndex].Id && (
{queueItems[currentItemIndex]?.Id && (
<>
<Typography px="1em" mb={2} variant="h5" fontWeight={300}>
Currently Playing:
+2 -2
View File
@@ -26,6 +26,8 @@
aspect-ratio: 1;
position: relative;
width: 4em;
box-shadow: 0 0 10px rgb(0 0 0 / 0.2);
transition: opacity $transition-time-default;
&-overlay {
position: absolute;
top: 0;
@@ -39,8 +41,6 @@
opacity: 0;
transition: opacity $transition-time-fast;
}
box-shadow: 0 0 10px rgb(0 0 0 / 0.2);
transition: opacity $transition-time-default;
}
&-info {
justify-self: start;
+7 -23
View File
@@ -10,21 +10,16 @@ import {
DialogContent,
DialogTitle,
Fab,
FormControlLabel,
IconButton,
LinearProgress,
Link,
Skeleton,
Switch,
Tab,
Tabs,
TextField,
Typography,
styled,
withStyles,
} from "@mui/material";
import { AnimatePresence, motion, transform } from "framer-motion";
import React, { useEffect, useState, useMemo, useCallback } from "react";
import { AnimatePresence, motion } from "framer-motion";
import React, { useState, useMemo, useCallback } from "react";
import logo from "@/assets/logo.png";
@@ -41,14 +36,14 @@ import {
setDefaultServer,
setServer,
} from "@/utils/storage/servers";
import { allSettings, getSetting, setSetting } from "@/utils/storage/settings";
import { allSettings } from "@/utils/storage/settings";
import { delUser } from "@/utils/storage/user";
import type { RecommendedServerInfo } from "@jellyfin/sdk";
import { LoadingButton } from "@mui/lab";
import { red, yellow } from "@mui/material/colors";
import { useNavigate, useRouteContext } from "@tanstack/react-router";
import { red } from "@mui/material/colors";
import { useNavigate } from "@tanstack/react-router";
import { relaunch } from "@tauri-apps/plugin-process";
import { type Update, check } from "@tauri-apps/plugin-updater";
import { check } from "@tauri-apps/plugin-updater";
import { useSnackbar } from "notistack";
import SettingOption from "../settingOption";
@@ -82,10 +77,7 @@ const Settings = () => {
const navigate = useNavigate();
const { enqueueSnackbar } = useSnackbar();
const [applicationVersion, serversOnDiskFn] = useCentralStore((state) => [
state.clientVersion,
state.allServersOnDisk,
]);
const [applicationVersion] = useCentralStore((state) => [state.clientVersion]);
const serversOnDisk = useQuery({
queryKey: ["settings", "serversOnDisk"],
@@ -524,14 +516,6 @@ const Settings = () => {
{systemInfo.data?.Version}
</Typography>
</div>
<div className="settings-info">
<Typography variant="subtitle2">
Operating System:
</Typography>
<Typography variant="subtitle2">
{systemInfo.data?.OperatingSystemDisplayName}
</Typography>
</div>
<div className="settings-info">
<Typography variant="subtitle2">
Server Architecture:
+26 -35
View File
@@ -1,28 +1,27 @@
.settings{
.settings {
display: grid !important;
grid-template-columns: 20% 1fr;
height: 60vh;
overflow: hidden !important;
.MuiTabs-flexContainerVertical{
.MuiTabs-flexContainerVertical {
height: 100%;
}
&-container{
&-container {
margin: 14px 0 14px 14px;
}
&-tab{
&-tab {
display: grid !important;
grid-template-columns: 2em 1fr;
align-items: center;
justify-items: start !important;
gap:1em;
& .material-symbols-rounded{
gap: 1em;
& .material-symbols-rounded {
justify-self: center !important;
}
}
&-scroll{
&-scroll {
overflow-y: auto;
scrollbar-gutter:stable ;
scrollbar-gutter: stable;
overscroll-behavior: contain;
// Magic scrollbar
&::-webkit-scrollbar {
@@ -37,14 +36,13 @@
}
}
}
// About page
&-grid{
&-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap:1em;
gap: 1em;
}
&-logo{
&-logo {
width: 100%;
background: rgb(255 255 255 / 1);
padding: 0em;
@@ -53,7 +51,7 @@
border-radius: $border-radius-default;
object-fit: contain;
}
&-info{
&-info {
display: grid;
grid-template-columns: 40% 1fr;
gap: 1em;
@@ -61,13 +59,13 @@
align-items: center;
border-bottom: 1px solid rgb(255 255 255 / 0.1);
padding-bottom: 0.5em;
&-container{
&-container {
background: rgb(0 0 0 / 0.3);
padding: 1em;
border-radius: $border-radius-default;
display: flex;
flex-direction: column;
gap:0.6em;
gap: 0.6em;
width: 100%;
}
&:last-child {
@@ -78,9 +76,8 @@
opacity: 0.8;
}
}
//settings
&-option{
&-option {
display: flex;
align-items: center;
justify-content: space-between;
@@ -88,21 +85,12 @@
padding: 0 !important;
margin: 0 !important;
margin-bottom: 0.6em !important;
&-info-caption{
&-info-caption {
opacity: 0.6;
}
}
//serverList
&-server{
&-container{
display: flex;
flex-direction: column;
gap: 1em;
align-items: center;
padding-bottom: 4.6em;
}
&-server {
display: grid;
grid-template-columns: 3.4em 1fr auto;
justify-items: start;
@@ -112,7 +100,13 @@
padding: 1em;
width: 100%;
border-radius: $border-radius-default;
&-container {
display: flex;
flex-direction: column;
gap: 1em;
align-items: center;
padding-bottom: 4.6em;
}
&-icon {
font-size: 3.4em !important;
font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 10, "opsz" 40;
@@ -124,7 +118,7 @@
&-version {
display: flex;
align-items: center;
gap:0.4em;
gap: 0.4em;
}
}
&-buttons {
@@ -134,7 +128,6 @@
// width: 100%;
overflow: hidden;
}
&-fab-container {
display: flex;
position: absolute;
@@ -144,7 +137,6 @@
justify-content: center;
gap: 0.8em;
}
// Dialog
&-add {
display: flex;
@@ -154,7 +146,6 @@
}
}
}
.Mui-selected .material-symbols-rounded{
.Mui-selected .material-symbols-rounded {
font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40;
}