mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
refactor
This commit is contained in:
@@ -22,7 +22,6 @@ import {
|
|||||||
DialogContentGrid,
|
DialogContentGrid,
|
||||||
TorrentMainSection,
|
TorrentMainSection,
|
||||||
Poster,
|
Poster,
|
||||||
TorrentData,
|
|
||||||
SectionTitle,
|
SectionTitle,
|
||||||
SectionSubName,
|
SectionSubName,
|
||||||
StatisticsWrapper,
|
StatisticsWrapper,
|
||||||
@@ -116,17 +115,15 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
|||||||
<TorrentMainSection>
|
<TorrentMainSection>
|
||||||
<Poster poster={poster}>{poster ? <img alt='poster' src={poster} /> : <NoImageIcon />}</Poster>
|
<Poster poster={poster}>{poster ? <img alt='poster' src={poster} /> : <NoImageIcon />}</Poster>
|
||||||
|
|
||||||
<TorrentData>
|
<div>
|
||||||
<div>
|
{name && name !== title ? (
|
||||||
{name && name !== title ? (
|
<>
|
||||||
<>
|
<SectionTitle>{shortenText(name, 50)}</SectionTitle>
|
||||||
<SectionTitle>{shortenText(name, 50)}</SectionTitle>
|
<SectionSubName mb={20}>{shortenText(title, 160)}</SectionSubName>
|
||||||
<SectionSubName>{shortenText(title, 160)}</SectionSubName>
|
</>
|
||||||
</>
|
) : (
|
||||||
) : (
|
<SectionTitle mb={20}>{shortenText(title, 50)}</SectionTitle>
|
||||||
<SectionTitle>{shortenText(title, 50)}</SectionTitle>
|
)}
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<StatisticsWrapper>
|
<StatisticsWrapper>
|
||||||
<StatisticsField
|
<StatisticsField
|
||||||
@@ -161,12 +158,12 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
|||||||
icon={ViewAgendaIcon}
|
icon={ViewAgendaIcon}
|
||||||
/>
|
/>
|
||||||
</StatisticsWrapper>
|
</StatisticsWrapper>
|
||||||
</TorrentData>
|
</div>
|
||||||
</TorrentMainSection>
|
</TorrentMainSection>
|
||||||
|
|
||||||
<CacheSection>
|
<CacheSection>
|
||||||
<SectionHeader>
|
<SectionHeader>
|
||||||
<SectionTitle>Buffer</SectionTitle>
|
<SectionTitle mb={20}>Buffer</SectionTitle>
|
||||||
{!settings?.PreloadBuffer && (
|
{!settings?.PreloadBuffer && (
|
||||||
<SectionSubName>Enable "Preload Buffer" in settings to change buffer size</SectionSubName>
|
<SectionSubName>Enable "Preload Buffer" in settings to change buffer size</SectionSubName>
|
||||||
)}
|
)}
|
||||||
@@ -209,7 +206,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
|||||||
</ButtonSection>
|
</ButtonSection>
|
||||||
|
|
||||||
<TorrentFilesSection>
|
<TorrentFilesSection>
|
||||||
<SectionTitle>Torrent Content</SectionTitle>
|
<SectionTitle mb={20}>Torrent Content</SectionTitle>
|
||||||
|
|
||||||
{!playableFileList?.length
|
{!playableFileList?.length
|
||||||
? 'No playable files in this torrent'
|
? 'No playable files in this torrent'
|
||||||
|
|||||||
@@ -43,12 +43,6 @@ export const TorrentMainSection = styled.section`
|
|||||||
background: linear-gradient(145deg, #e4f6ed, #b5dec9);
|
background: linear-gradient(145deg, #e4f6ed, #b5dec9);
|
||||||
`
|
`
|
||||||
|
|
||||||
export const TorrentData = styled.div`
|
|
||||||
> :not(:last-child) {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
export const CacheSection = styled.section`
|
export const CacheSection = styled.section`
|
||||||
grid-area: cache;
|
grid-area: cache;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
@@ -100,14 +94,20 @@ export const TorrentFilesSection = styled.div`
|
|||||||
`
|
`
|
||||||
|
|
||||||
export const SectionSubName = styled.div`
|
export const SectionSubName = styled.div`
|
||||||
color: #7c7b7c;
|
${({ mb }) => css`
|
||||||
|
${mb && `margin-bottom: ${mb}px`};
|
||||||
|
color: #7c7b7c;
|
||||||
|
`}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SectionTitle = styled.div`
|
export const SectionTitle = styled.div`
|
||||||
font-size: 35px;
|
${({ mb }) => css`
|
||||||
font-weight: 200;
|
${mb && `margin-bottom: ${mb}px`};
|
||||||
line-height: 1;
|
font-size: 35px;
|
||||||
word-break: break-word;
|
font-weight: 200;
|
||||||
|
line-height: 1;
|
||||||
|
word-break: break-word;
|
||||||
|
`}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SectionHeader = styled.div`
|
export const SectionHeader = styled.div`
|
||||||
|
|||||||
Reference in New Issue
Block a user