Skip to content

Commit

Permalink
fix fullWidth logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cj12312021 committed Jul 31, 2023
1 parent be219eb commit bfad6f0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
5 changes: 4 additions & 1 deletion ui/v2.5/src/components/Movies/MovieDetails/Movie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,10 @@ const MoviePage: React.FC<IProps> = ({ movie }) => {
function maybeRenderDetails() {
if (!isEditing) {
return (
<MovieDetailsPanel movie={movie} fullWidth={!compactExpandedDetails} />
<MovieDetailsPanel
movie={movie}
fullWidth={!collapsed && !compactExpandedDetails}
/>
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
<PerformerDetailsPanel
performer={performer}
collapsed={collapsed}
fullWidth={!compactExpandedDetails}
fullWidth={!collapsed && !compactExpandedDetails}
/>
);
}
Expand Down Expand Up @@ -552,7 +552,9 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
<div className="detail-container">
<div className="detail-header-image">
{encodingImage ? (
<LoadingIndicator message={`${intl.formatMessage({ id: "encoding_image" })}...`} />
<LoadingIndicator
message={`${intl.formatMessage({ id: "encoding_image" })}...`}
/>
) : (
renderImage()
)}
Expand Down
2 changes: 1 addition & 1 deletion ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const StudioPage: React.FC<IProps> = ({ studio }) => {
<StudioDetailsPanel
studio={studio}
collapsed={collapsed}
fullWidth={!compactExpandedDetails}
fullWidth={!collapsed && !compactExpandedDetails}
/>
);
}
Expand Down
7 changes: 6 additions & 1 deletion ui/v2.5/src/components/Tags/TagDetails/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,12 @@ const TagPage: React.FC<IProps> = ({ tag }) => {

function maybeRenderDetails() {
if (!isEditing) {
return <TagDetailsPanel tag={tag} fullWidth={!compactExpandedDetails} />;
return (
<TagDetailsPanel
tag={tag}
fullWidth={!collapsed && !compactExpandedDetails}
/>
);
}
}

Expand Down

0 comments on commit bfad6f0

Please sign in to comment.