mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Fix performer image display (#3767)
* Fix displayed performer image sticking after save * Reset URL before showing dialog in ImageInput
This commit is contained in:
@@ -122,6 +122,11 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
|
|||||||
setRating
|
setRating
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// reset image if performer changed
|
||||||
|
useEffect(() => {
|
||||||
|
setImage(undefined);
|
||||||
|
}, [performer]);
|
||||||
|
|
||||||
// set up hotkeys
|
// set up hotkeys
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Mousetrap.bind("a", () => setActiveTabKey("details"));
|
Mousetrap.bind("a", () => setActiveTabKey("details"));
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ export const ImageInput: React.FC<IImageInput> = ({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showDialog() {
|
||||||
|
setURL("");
|
||||||
|
setIsShowDialog(true);
|
||||||
|
}
|
||||||
|
|
||||||
function onConfirmURL() {
|
function onConfirmURL() {
|
||||||
if (!onImageURL) {
|
if (!onImageURL) {
|
||||||
return;
|
return;
|
||||||
@@ -112,7 +117,7 @@ export const ImageInput: React.FC<IImageInput> = ({
|
|||||||
</Form.Label>
|
</Form.Label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Button className="minimal" onClick={() => setIsShowDialog(true)}>
|
<Button className="minimal" onClick={showDialog}>
|
||||||
<Icon icon={faLink} className="fa-fw" />
|
<Icon icon={faLink} className="fa-fw" />
|
||||||
<span>{intl.formatMessage({ id: "actions.from_url" })}</span>
|
<span>{intl.formatMessage({ id: "actions.from_url" })}</span>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user