From 013836d532f06a6c9f1858bbb9a32aa470162aa3 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Mon, 6 Feb 2023 16:21:17 +0100 Subject: [PATCH] stuff --- Library/_res/0BDFDB.data.json | 6 ++++++ Plugins/ImageUtilities/ImageUtilities.plugin.js | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index de5a956bf5..05d61fe50f 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -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"], diff --git a/Plugins/ImageUtilities/ImageUtilities.plugin.js b/Plugins/ImageUtilities/ImageUtilities.plugin.js index dcebb2d58d..5cae2aacb7 100644 --- a/Plugins/ImageUtilities/ImageUtilities.plugin.js +++ b/Plugins/ImageUtilities/ImageUtilities.plugin.js @@ -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"); }