mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
Fixed: Series toolbar button collapsing
This commit is contained in:
parent
9b99ad27cd
commit
e1639d35a2
@ -1,6 +1,6 @@
|
||||
.sectionContainer {
|
||||
display: flex;
|
||||
flex: 1 1 10%;
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,6 @@ import styles from './PageToolbarSection.css';
|
||||
const BUTTON_WIDTH = parseInt(dimensions.toolbarButtonWidth);
|
||||
const SEPARATOR_MARGIN = parseInt(dimensions.toolbarSeparatorMargin);
|
||||
const SEPARATOR_WIDTH = 2 * SEPARATOR_MARGIN + 1;
|
||||
const SEPARATOR_NAME = 'PageToolbarSeparator';
|
||||
|
||||
function calculateOverflowItems(children, isMeasured, width, collapseButtons) {
|
||||
let buttonCount = 0;
|
||||
@ -23,9 +22,7 @@ function calculateOverflowItems(children, isMeasured, width, collapseButtons) {
|
||||
const validChildren = [];
|
||||
|
||||
forEach(children, (child) => {
|
||||
const name = child.type.name;
|
||||
|
||||
if (name === SEPARATOR_NAME) {
|
||||
if (Object.keys(child.props).length === 0) {
|
||||
separatorCount++;
|
||||
} else {
|
||||
buttonCount++;
|
||||
@ -68,12 +65,14 @@ function calculateOverflowItems(children, isMeasured, width, collapseButtons) {
|
||||
}
|
||||
|
||||
validChildren.forEach((child, index) => {
|
||||
const isSeparator = Object.keys(child.props).length === 0;
|
||||
|
||||
if (actualButtons < maxButtons) {
|
||||
if (child.type.name !== SEPARATOR_NAME) {
|
||||
if (!isSeparator) {
|
||||
buttons.push(child);
|
||||
actualButtons++;
|
||||
}
|
||||
} else if (child.type.name !== SEPARATOR_NAME) {
|
||||
} else if (!isSeparator) {
|
||||
overflowItems.push(child.props);
|
||||
}
|
||||
});
|
||||
|
@ -255,10 +255,7 @@ class SeriesIndex extends Component {
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
(view === 'posters' || view === 'overview') &&
|
||||
<PageToolbarSeparator />
|
||||
}
|
||||
|
||||
<SeriesIndexViewMenu
|
||||
view={view}
|
||||
|
@ -19,7 +19,7 @@ export function getSeriesStatusDetails(status) {
|
||||
statusDetails = {
|
||||
icon: icons.SERIES_ENDED,
|
||||
title: 'Ended',
|
||||
message: 'No additional episodes or or another season is expected'
|
||||
message: 'No additional episodes or seasons are expected'
|
||||
};
|
||||
} else if (status === 'upcoming') {
|
||||
statusDetails = {
|
||||
|
Loading…
Reference in New Issue
Block a user