This commit is contained in:
Mirco Wittrien 2023-02-06 16:21:17 +01:00
parent fcdd6c25d0
commit 013836d532
2 changed files with 19 additions and 3 deletions

View File

@ -1147,6 +1147,7 @@
"detailsWrapper": "detailsWrapper-TE1mu5",
"gallery": "gallery-JViwKR",
"imageDetails": "imageDetails-1t6Zms",
"imageDetailsAdded": "imageDetailsAdded-sda9Fa",
"lens": "zoomLens-uOK8xV",
"lensBackdrop": "lensBackdrop-yEm7Om",
"next": "next-SHEZrz",
@ -1479,6 +1480,7 @@
"ImageAssets": {"props": ["pngImage", "stickerAsset"]},
"ImageModal": {"props": ["image", "modal"], "length": 4, "smaller": true},
"ImageModalNavigation": {"props": ["nav", "navPrev", "navNext"]},
"ImageMosaic": {"props": ["lazyImg", "oneByOneGridSingle"]},
"ImageWrapper": {"props": ["clickable", "imageWrapperBackground"]},
"Input": {"props": ["inputMini", "inputDefault"]},
"InviteModal": {"props": ["inviteRow", "modal"]},
@ -1680,6 +1682,7 @@
"_imageutilitiesdetailswrapper": ["ImageUtilities", "detailsWrapper"],
"_imageutilitiesgallery": ["ImageUtilities", "gallery"],
"_imageutilitiesimagedetails": ["ImageUtilities", "imageDetails"],
"_imageutilitiesimagedetailsadded": ["ImageUtilities", "imageDetailsAdded"],
"_imageutilitieslense": ["ImageUtilities", "lens"],
"_imageutilitieslensebackdrop": ["ImageUtilities", "lensBackdrop"],
"_imageutilitiesnext": ["ImageUtilities", "next"],
@ -2519,6 +2522,7 @@
"iconwrapperactive": ["EmbedActions", "iconWrapperActive"],
"imageaccessory": ["ImageWrapper", "imageAccessory"],
"imagealttext": ["MessageElements", "altText"],
"imagealttextcontainer": ["MessageElements", "mediaMosaicAltTextContainer"],
"imageclickable": ["ImageWrapper", "clickable"],
"imageerror": ["ImageWrapper", "imageError"],
"imageoriginallink": ["ImageWrapper", "originalLink"],
@ -2528,6 +2532,8 @@
"imagemodalnavbutton": ["ImageModalNavigation", "nav"],
"imagemodalnavbuttonprev": ["ImageModalNavigation", "navPrev"],
"imagemodalnavbuttonnext": ["ImageModalNavigation", "navNext"],
"imagemosaicattachmentscontainer": ["ImageMosaic", "mediaAttachmentsContainer"],
"imagemosaiconebyonegridsingle": ["ImageMosaic", "oneByOneGridSingle"],
"imagesticker": ["ImageAssets", "stickerAsset"],
"imagewrapper": ["ImageWrapper", "imageWrapper"],
"imagewrapperbackground": ["ImageWrapper", "imageWrapperBackground"],

View File

@ -2,7 +2,7 @@
* @name ImageUtilities
* @author DevilBro
* @authorId 278543574059057154
* @version 5.1.2
* @version 5.1.3
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -138,6 +138,7 @@ module.exports = (_ => {
}
componentDidUpdate() {
if ((!this.props.attachment || !this.props.attachment.size) && !this.props.loaded) {
BDFDB.DOMUtils.addClass(BDFDB.DOMUtils.getParent(BDFDB.dotCN.imagemosaiconebyonegridsingle, BDFDB.ReactUtils.findDOMNode(this)), BDFDB.disCN._imageutilitiesimagedetailsadded);
this.props.loaded = true;
this.props.attachment = BDFDB.ReactUtils.findValue(BDFDB.ObjectUtils.get(this, `${BDFDB.ReactUtils.instanceKey}.return`), "attachment", {up: true});
BDFDB.ReactUtils.forceUpdate(this);
@ -146,7 +147,6 @@ module.exports = (_ => {
render() {
return !this.props.attachment ? null : BDFDB.ReactUtils.createElement("span", {
className: BDFDB.disCN._imageutilitiesimagedetails,
style: this.props.attachment.description ? {"margin-bottom": 0} : {},
children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Anchor, {
title: this.props.original,
@ -277,6 +277,16 @@ module.exports = (_ => {
};
this.css = `
${BDFDB.dotCN._imageutilitiesimagedetailsadded} {
height: calc(100% - 1rem - 16px) !important;
max-height: unset !important;
}
${BDFDB.dotCN._imageutilitiesimagedetailsadded + BDFDB.dotCNS.imagemosaiconebyonegridsingle + BDFDB.dotCN.imagewrapper} {
border-radius: 8px; !important;
}
${BDFDB.dotCNS._imageutilitiesimagedetailsadded + BDFDB.dotCN.imagealttextcontainer} {
bottom: calc(1rem + 16px) !important;
}
${BDFDB.dotCN._imageutilitiesimagedetails} {
display: inline-flex;
font-weight: 500;
@ -1162,7 +1172,7 @@ module.exports = (_ => {
processLazyImage (e) {
if (e.node) {
if (e.instance.props.resized) {
for (let selector of ["embedfull", "embedinlinemedia", "embedgridcontainer"]) {
for (let selector of ["embedfull", "embedinlinemedia", "embedgridcontainer", "imagemosaicattachmentscontainer"]) {
let parent = BDFDB.DOMUtils.getParent(BDFDB.dotCN[selector], e.node);
if (parent) parent.style.setProperty("max-width", "unset", "important");
}