mirror of
https://github.com/stashapp/stash.git
synced 2026-05-05 02:52:32 +02:00
Fix "Clear Image" button (#1249)
* Fix "Clear Image" button (Performer Edit) * Fix "Clear Image" button (New Performer) * Fix "Clear Image" button (Edit Studio) * Fix "Clear Image" button (Edit Tag)
This commit is contained in:
parent
4462b3cc8e
commit
60af076fff
4 changed files with 4 additions and 3 deletions
|
|
@ -11,5 +11,6 @@
|
|||
* Change performer text query to search by name and alias only.
|
||||
|
||||
### 🐛 Bug fixes
|
||||
* Fix `Clear Image` button not updating image preview.
|
||||
* Fix processing some webp files.
|
||||
* Fix incorrect performer age calculation in UI.
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export const Performer: React.FC = () => {
|
|||
const activeImage =
|
||||
imagePreview === undefined
|
||||
? performer.image_path ?? ""
|
||||
: imagePreview ?? `${performer.image_path}?default=true`;
|
||||
: imagePreview ?? (isNew ? "" : `${performer.image_path}&default=true`);
|
||||
const lightboxImages = useMemo(
|
||||
() => [{ paths: { thumbnail: activeImage, image: activeImage } }],
|
||||
[activeImage]
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ export const Studio: React.FC = () => {
|
|||
function onClearImage() {
|
||||
setImage(null);
|
||||
setImagePreview(
|
||||
studio.image_path ? `${studio.image_path}?default=true` : undefined
|
||||
studio.image_path ? `${studio.image_path}&default=true` : undefined
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ export const Tag: React.FC = () => {
|
|||
function onClearImage() {
|
||||
setImage(null);
|
||||
setImagePreview(
|
||||
tag?.image_path ? `${tag.image_path}?default=true` : undefined
|
||||
tag?.image_path ? `${tag.image_path}&default=true` : undefined
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue