Changes to Default Performer Images (for Accessibility) (#1489)

* Changes to support custom URL paths
* Refactor image resolver code
* Initialise box files at startup
* Update packr

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
capnrowdy
2021-08-10 13:51:31 +10:00
committed by GitHub
parent 3e78d642a2
commit 404eaa32d2
487 changed files with 24741 additions and 29244 deletions

View File

@@ -126,6 +126,10 @@ export const SettingsConfigurationPanel: React.FC = () => {
const [excludes, setExcludes] = useState<string[]>([]);
const [imageExcludes, setImageExcludes] = useState<string[]>([]);
const [
customPerformerImageLocation,
setCustomPerformerImageLocation,
] = useState<string>();
const [stashBoxes, setStashBoxes] = useState<IStashBoxInstance[]>([]);
const { data, error, loading } = useConfiguration();
@@ -166,6 +170,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
galleryExtensions: commaDelimitedToList(galleryExtensions),
excludes,
imageExcludes,
customPerformerImageLocation,
stashBoxes: stashBoxes.map(
(b) =>
({
@@ -213,6 +218,9 @@ export const SettingsConfigurationPanel: React.FC = () => {
);
setExcludes(conf.general.excludes);
setImageExcludes(conf.general.imageExcludes);
setCustomPerformerImageLocation(
conf.general.customPerformerImageLocation ?? ""
);
setStashBoxes(
conf.general.stashBoxes.map((box, i) => ({
name: box?.name ?? undefined,
@@ -817,6 +825,28 @@ export const SettingsConfigurationPanel: React.FC = () => {
</Form.Group>
</Form.Group>
<Form.Group>
<h4>{intl.formatMessage({ id: "performers" })}</h4>
<Form.Group>
<h6>
{intl.formatMessage({
id: "config.ui.performers.options.image_location.heading",
})}
</h6>
<Form.Control
className="col col-sm-6 text-input"
value={customPerformerImageLocation}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setCustomPerformerImageLocation(e.currentTarget.value);
}}
/>
<Form.Text className="text-muted">
{intl.formatMessage({
id: "config.ui.performers.options.image_location.description",
})}
</Form.Text>
</Form.Group>
</Form.Group>
<hr />
<Form.Group id="stashbox">