mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Details page redesign (#3946)
* mobile improvements to performer page * updated remaining details pages * fixes tag page on mobile * implemented show hide for performer details * fixes card width cutoff on mobile(not related to redesign) * added background image option plus more improvements * add tooltip for age field * translate encoding message string
This commit is contained in:
@@ -70,6 +70,17 @@ const ImageUtils = {
|
||||
onImageChange,
|
||||
usePasteImage,
|
||||
imageToDataURL,
|
||||
verifyImageSize,
|
||||
};
|
||||
|
||||
function verifyImageSize(e: React.UIEvent<HTMLImageElement>) {
|
||||
const img = e.target as HTMLImageElement;
|
||||
// set width = 200px if zero-sized image (SVG w/o intrinsic size)
|
||||
if (img.width === 0 && img.height === 0) {
|
||||
img.setAttribute("width", "200");
|
||||
} else {
|
||||
img.removeAttribute("width");
|
||||
}
|
||||
}
|
||||
|
||||
export default ImageUtils;
|
||||
|
||||
Reference in New Issue
Block a user