From 874057919cbddff079289e8e7eef1a3a551a84ae Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 12 Nov 2020 17:11:25 +0100 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 2df45b479f..7840d3776c 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -4474,6 +4474,7 @@ module.exports = (_ => { className: BDFDB.disCN._repoheader, style: {overflow: "visible"}, children: [ + isBeta && this.props.icon, BDFDB.ReactUtils.createElement("span", { className: BDFDB.disCN._repoheadertitle, children: [ @@ -7255,7 +7256,7 @@ module.exports = (_ => { if (!shown && !e.currentTarget.BDFDBtooltipShown) { e.currentTarget.BDFDBtooltipShown = shown = true; this.tooltip = BDFDB.TooltipUtils.create(e.currentTarget, typeof this.props.text == "function" ? this.props.text(this) : this.props.text, Object.assign({ - delay: this.props.delayĆ¼ + delay: this.props.delay }, this.props.tooltipConfig, { onHide: (tooltip, anker) => { delete anker.BDFDBtooltipShown; @@ -7307,19 +7308,16 @@ module.exports = (_ => { BDFDB.LibraryComponents = Object.assign({}, InternalComponents.LibraryComponents); InternalBDFDB.createCustomControl = function (data) { - let child = BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SvgIcon, { + let controlButton = BDFDB.DOMUtils.create(`<${isBeta ? "button" : "div"} class="${BDFDB.DOMUtils.formatClassName(isBeta && BDFDB.disCN._repobutton, BDFDB.disCN._repocontrolsbutton)}">`); + BDFDB.ReactUtils.render(BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SvgIcon, { className: !isBeta && BDFDB.disCN._repoicon, nativeClass: true, name: data.svgName, width: isBeta ? "20" : "24", height: isBeta ? "20" : "24" - }) - let controlButton = BDFDB.DOMUtils.create(`<${isBeta ? "button" : "div"} class="${BDFDB.DOMUtils.formatClassName(isBeta && BDFDB.disCN._repobutton, BDFDB.disCN._repocontrolsbutton)}">`); - BDFDB.ReactUtils.render(data.tooltipText ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, { - text: data.tooltipText, - children: child - }) : child, controlButton); + }), controlButton); controlButton.addEventListener("click", _ => {if (typeof data.onClick == "function") data.onClick();}); + if (data.tooltipText) controlButton.addEventListener("mouseenter", _ => {BDFDB.TooltipUtils.create(controlButton, data.tooltipText);}); return controlButton; }; InternalBDFDB.appendCustomControls = function (card) {