Merge branch 'details-in-card-and-add-dialog-title-change' of https://github.com/YouROK/TorrServer into details-in-card-and-add-dialog-title-change

This commit is contained in:
Daniel Shleifman
2021-06-16 11:41:31 +03:00
8 changed files with 34 additions and 66 deletions

View File

@@ -4,9 +4,9 @@ export const pieceSizeForMiniMap = 23
export const gapBetweenPieces = 3
export const miniCacheMaxHeight = 340
export const defaultBorderColor = '#eef2f4'
export const defaultBorderColor = '#dbf2e8'
export const defaultBackgroundColor = '#fff'
export const completeColor = '#00a572'
export const progressColor = '#ffa724'
export const activeColor = '#000'
export const rangeColor = '#9a9aff'
export const rangeColor = '#ffa724'

View File

@@ -62,5 +62,5 @@ export const SnakeWrapper = styled.div`
export const PercentagePiece = styled.div`
background: ${completeColor};
height: ${({ percentage }) => (percentage / 100) * 12}px;
height: ${({ percentage }) => (percentage)}%;
`

View File

@@ -1,5 +1,5 @@
import { NoImageIcon } from 'icons'
import { humanizeSize, shortenText } from 'utils/Utils'
import { humanizeSize } from 'utils/Utils'
import { useEffect, useState } from 'react'
import { Button, ButtonGroup } from '@material-ui/core'
import ptt from 'parse-torrent-title'
@@ -110,10 +110,10 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
newNameStrings.push(title)
} else if (torrentParsedName?.title) newNameStrings.push(torrentParsedName?.title)
if (torrentParsedName?.year) newNameStrings.push(torrentParsedName?.year)
if (torrentParsedName?.resolution) newNameStrings.push(torrentParsedName?.resolution)
// if (torrentParsedName?.year) newNameStrings.push(torrentParsedName?.year)
// if (torrentParsedName?.resolution) newNameStrings.push(torrentParsedName?.resolution)
return newNameStrings.join('. ')
return newNameStrings.join(' ')
}
return (
@@ -146,11 +146,11 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
<div>
{title && name !== title ? (
<>
<SectionTitle>{shortenText(getParsedTitle(), 55)}</SectionTitle>
<SectionSubName mb={20}>{shortenText(ptt.parse(name).title, 110)}</SectionSubName>
<SectionTitle>{ptt.parse(name).title}</SectionTitle>
<SectionSubName mb={20}>{getParsedTitle()}</SectionSubName>
</>
) : (
<SectionTitle mb={20}>{shortenText(getParsedTitle(), 55)}</SectionTitle>
<SectionTitle mb={20}>{getParsedTitle()}</SectionTitle>
)}
<WidgetWrapper>