1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

Fixed: Overflowing release profile terms

Closes #4667
This commit is contained in:
Mark McDowall
2021-12-05 10:07:43 -08:00
parent d80565f6a9
commit b90e25f652
7 changed files with 83 additions and 9 deletions
@@ -17,3 +17,9 @@
font-weight: 300;
font-size: 24px;
}
.label {
composes: label from '~Components/Label.css';
max-width: 100%;
}
@@ -1,6 +1,7 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import MiddleTruncate from 'react-middle-truncate';
import { kinds } from 'Helpers/Props';
import Card from 'Components/Card';
import Label from 'Components/Label';
@@ -96,10 +97,15 @@ class ReleaseProfile extends Component {
return (
<Label
className={styles.label}
key={item}
kind={kinds.SUCCESS}
>
{item}
<MiddleTruncate
text={item}
start={10}
end={10}
/>
</Label>
);
})
@@ -113,10 +119,15 @@ class ReleaseProfile extends Component {
return (
<Label
className={styles.label}
key={item.key}
kind={isPreferred ? kinds.DEFAULT : kinds.WARNING}
>
{item.key} {isPreferred && '+'}{item.value}
<MiddleTruncate
text={`${item.key} ${isPreferred ? '+' : ''}${item.value}`}
start={10}
end={14}
/>
</Label>
);
})
@@ -132,10 +143,15 @@ class ReleaseProfile extends Component {
return (
<Label
className={styles.label}
key={item}
kind={kinds.DANGER}
>
{item}
<MiddleTruncate
text={item}
start={10}
end={10}
/>
</Label>
);
})