mirror of
https://github.com/stashapp/stash.git
synced 2025-12-07 17:02:38 +01:00
add divider on more details pages (#3514)
This commit is contained in:
parent
579c5ad8b9
commit
b7183900ac
6 changed files with 131 additions and 9 deletions
|
|
@ -281,11 +281,13 @@ export const GalleryPage: React.FC<IProps> = ({ gallery }) => {
|
||||||
Mousetrap.bind("a", () => setActiveTabKey("gallery-details-panel"));
|
Mousetrap.bind("a", () => setActiveTabKey("gallery-details-panel"));
|
||||||
Mousetrap.bind("e", () => setActiveTabKey("gallery-edit-panel"));
|
Mousetrap.bind("e", () => setActiveTabKey("gallery-edit-panel"));
|
||||||
Mousetrap.bind("f", () => setActiveTabKey("gallery-file-info-panel"));
|
Mousetrap.bind("f", () => setActiveTabKey("gallery-file-info-panel"));
|
||||||
|
Mousetrap.bind(",", () => setCollapsed(!collapsed));
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
Mousetrap.unbind("a");
|
Mousetrap.unbind("a");
|
||||||
Mousetrap.unbind("e");
|
Mousetrap.unbind("e");
|
||||||
Mousetrap.unbind("f");
|
Mousetrap.unbind("f");
|
||||||
|
Mousetrap.unbind(",");
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const { tab = "details" } = useParams<IPerformerParams>();
|
const { tab = "details" } = useParams<IPerformerParams>();
|
||||||
|
|
||||||
|
const [collapsed, setCollapsed] = useState(false);
|
||||||
|
|
||||||
// Configuration settings
|
// Configuration settings
|
||||||
const { configuration } = React.useContext(ConfigurationContext);
|
const { configuration } = React.useContext(ConfigurationContext);
|
||||||
const abbreviateCounter =
|
const abbreviateCounter =
|
||||||
|
|
@ -116,6 +118,7 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
|
||||||
Mousetrap.bind("g", () => setActiveTabKey("galleries"));
|
Mousetrap.bind("g", () => setActiveTabKey("galleries"));
|
||||||
Mousetrap.bind("m", () => setActiveTabKey("movies"));
|
Mousetrap.bind("m", () => setActiveTabKey("movies"));
|
||||||
Mousetrap.bind("f", () => setFavorite(!performer.favorite));
|
Mousetrap.bind("f", () => setFavorite(!performer.favorite));
|
||||||
|
Mousetrap.bind(",", () => setCollapsed(!collapsed));
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
Mousetrap.unbind("a");
|
Mousetrap.unbind("a");
|
||||||
|
|
@ -123,6 +126,7 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
|
||||||
Mousetrap.unbind("c");
|
Mousetrap.unbind("c");
|
||||||
Mousetrap.unbind("f");
|
Mousetrap.unbind("f");
|
||||||
Mousetrap.unbind("o");
|
Mousetrap.unbind("o");
|
||||||
|
Mousetrap.unbind(",");
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -380,13 +384,21 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function getCollapseButtonText() {
|
||||||
|
return collapsed ? ">" : "<";
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="performer-page" className="row">
|
<div id="performer-page" className="row">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{performer.name}</title>
|
<title>{performer.name}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
|
|
||||||
<div className="performer-image-container col-md-4 text-center">
|
<div
|
||||||
|
className={`performer-image-container details-tab text-center text-center ${
|
||||||
|
collapsed ? "collapsed" : ""
|
||||||
|
}`}
|
||||||
|
>
|
||||||
{encodingImage ? (
|
{encodingImage ? (
|
||||||
<LoadingIndicator message="Encoding image..." />
|
<LoadingIndicator message="Encoding image..." />
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -399,7 +411,12 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-md-8">
|
<div className="details-divider d-none d-xl-block">
|
||||||
|
<Button onClick={() => setCollapsed(!collapsed)}>
|
||||||
|
{getCollapseButtonText()}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className={`content-container ${collapsed ? "expanded" : ""}`}>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="performer-head col">
|
<div className="performer-head col">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Tabs, Tab } from "react-bootstrap";
|
import { Button, Tabs, Tab } from "react-bootstrap";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useParams, useHistory } from "react-router-dom";
|
import { useParams, useHistory } from "react-router-dom";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
@ -44,6 +44,8 @@ const StudioPage: React.FC<IProps> = ({ studio }) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const { tab = "details" } = useParams<IStudioParams>();
|
const { tab = "details" } = useParams<IStudioParams>();
|
||||||
|
|
||||||
|
const [collapsed, setCollapsed] = useState(false);
|
||||||
|
|
||||||
// Configuration settings
|
// Configuration settings
|
||||||
const { configuration } = React.useContext(ConfigurationContext);
|
const { configuration } = React.useContext(ConfigurationContext);
|
||||||
const abbreviateCounter =
|
const abbreviateCounter =
|
||||||
|
|
@ -66,10 +68,12 @@ const StudioPage: React.FC<IProps> = ({ studio }) => {
|
||||||
Mousetrap.bind("d d", () => {
|
Mousetrap.bind("d d", () => {
|
||||||
onDelete();
|
onDelete();
|
||||||
});
|
});
|
||||||
|
Mousetrap.bind(",", () => setCollapsed(!collapsed));
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
Mousetrap.unbind("e");
|
Mousetrap.unbind("e");
|
||||||
Mousetrap.unbind("d d");
|
Mousetrap.unbind("d d");
|
||||||
|
Mousetrap.unbind(",");
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -174,9 +178,15 @@ const StudioPage: React.FC<IProps> = ({ studio }) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getCollapseButtonText() {
|
||||||
|
return collapsed ? ">" : "<";
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="studio-details col-md-4">
|
<div
|
||||||
|
className={`studio-details details-tab ${collapsed ? "collapsed" : ""}`}
|
||||||
|
>
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
{encodingImage ? (
|
{encodingImage ? (
|
||||||
<LoadingIndicator message="Encoding image..." />
|
<LoadingIndicator message="Encoding image..." />
|
||||||
|
|
@ -215,7 +225,12 @@ const StudioPage: React.FC<IProps> = ({ studio }) => {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col col-md-8">
|
<div className="details-divider d-none d-xl-block">
|
||||||
|
<Button onClick={() => setCollapsed(!collapsed)}>
|
||||||
|
{getCollapseButtonText()}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className={`col content-container ${collapsed ? "expanded" : ""}`}>
|
||||||
<Tabs
|
<Tabs
|
||||||
id="studio-tabs"
|
id="studio-tabs"
|
||||||
mountOnEnter
|
mountOnEnter
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Tabs, Tab, Dropdown } from "react-bootstrap";
|
import { Button, Tabs, Tab, Dropdown } from "react-bootstrap";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useParams, useHistory } from "react-router-dom";
|
import { useParams, useHistory } from "react-router-dom";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
@ -49,6 +49,8 @@ const TagPage: React.FC<IProps> = ({ tag }) => {
|
||||||
const Toast = useToast();
|
const Toast = useToast();
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
|
const [collapsed, setCollapsed] = useState(false);
|
||||||
|
|
||||||
// Configuration settings
|
// Configuration settings
|
||||||
const { configuration } = React.useContext(ConfigurationContext);
|
const { configuration } = React.useContext(ConfigurationContext);
|
||||||
const abbreviateCounter =
|
const abbreviateCounter =
|
||||||
|
|
@ -88,6 +90,7 @@ const TagPage: React.FC<IProps> = ({ tag }) => {
|
||||||
Mousetrap.bind("d d", () => {
|
Mousetrap.bind("d d", () => {
|
||||||
onDelete();
|
onDelete();
|
||||||
});
|
});
|
||||||
|
Mousetrap.bind(",", () => setCollapsed(!collapsed));
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
if (isEditing) {
|
if (isEditing) {
|
||||||
|
|
@ -96,6 +99,7 @@ const TagPage: React.FC<IProps> = ({ tag }) => {
|
||||||
|
|
||||||
Mousetrap.unbind("e");
|
Mousetrap.unbind("e");
|
||||||
Mousetrap.unbind("d d");
|
Mousetrap.unbind("d d");
|
||||||
|
Mousetrap.unbind(",");
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -245,13 +249,19 @@ const TagPage: React.FC<IProps> = ({ tag }) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCollapseButtonText() {
|
||||||
|
return collapsed ? ">" : "<";
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{tag.name}</title>
|
<title>{tag.name}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="tag-details col-md-4">
|
<div
|
||||||
|
className={`tag-details details-tab ${collapsed ? "collapsed" : ""}`}
|
||||||
|
>
|
||||||
<div className="text-center logo-container">
|
<div className="text-center logo-container">
|
||||||
{encodingImage ? (
|
{encodingImage ? (
|
||||||
<LoadingIndicator message="Encoding image..." />
|
<LoadingIndicator message="Encoding image..." />
|
||||||
|
|
@ -290,7 +300,12 @@ const TagPage: React.FC<IProps> = ({ tag }) => {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col col-md-8">
|
<div className="details-divider d-none d-xl-block">
|
||||||
|
<Button onClick={() => setCollapsed(!collapsed)}>
|
||||||
|
{getCollapseButtonText()}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className={`col content-container ${collapsed ? "expanded" : ""}`}>
|
||||||
<Tabs
|
<Tabs
|
||||||
id="tag-tabs"
|
id="tag-tabs"
|
||||||
mountOnEnter
|
mountOnEnter
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
### 🎨 Improvements
|
### 🎨 Improvements
|
||||||
* Improved Images wall view layout and added Interface settings to adjust the layout. ([#3511](https://github.com/stashapp/stash/pull/3511))
|
* Improved Images wall view layout and added Interface settings to adjust the layout. ([#3511](https://github.com/stashapp/stash/pull/3511))
|
||||||
* Added collapsible divider to Gallery page. ([#3508](https://github.com/stashapp/stash/pull/3508))
|
* Added collapsible divider to Gallery, Performer, Studio and Tag pages. ([#3508](https://github.com/stashapp/stash/pull/3508), [#3514](https://github.com/stashapp/stash/pull/3514))
|
||||||
* Overhauled and improved HLS streaming. ([#3274](https://github.com/stashapp/stash/pull/3274))
|
* Overhauled and improved HLS streaming. ([#3274](https://github.com/stashapp/stash/pull/3274))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 Bug fixes
|
||||||
|
|
|
||||||
|
|
@ -767,6 +767,79 @@ div.dropdown-menu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$detailTabWidth: calc(100% / 3);
|
||||||
|
|
||||||
|
.content-container,
|
||||||
|
.details-tab {
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.details-tab {
|
||||||
|
flex: 0 0 $detailTabWidth;
|
||||||
|
max-width: $detailTabWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-container {
|
||||||
|
flex: 0 0 calc(100% - #{$detailTabWidth});
|
||||||
|
max-width: calc(100% - #{$detailTabWidth});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.details-tab {
|
||||||
|
flex: 0 0 $detailTabWidth;
|
||||||
|
max-height: calc(100vh - 4rem);
|
||||||
|
max-width: $detailTabWidth;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
&.collapsed {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-divider {
|
||||||
|
flex: 0 0 15px;
|
||||||
|
height: calc(100vh - 4rem);
|
||||||
|
max-width: 15px;
|
||||||
|
|
||||||
|
button {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
color: $link-color;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: 800;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
&:active:not(:hover),
|
||||||
|
&:focus:not(:hover) {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-container {
|
||||||
|
flex: 0 0 calc(100% - #{$detailTabWidth} - 15px);
|
||||||
|
max-height: calc(100vh - 4rem);
|
||||||
|
max-width: calc(100% - #{$detailTabWidth} - 15px);
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
&.expanded {
|
||||||
|
flex: 0 0 calc(100% - 15px);
|
||||||
|
max-width: calc(100% - 15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.pre {
|
.pre {
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue