stuff
This commit is contained in:
parent
673dfc90fe
commit
874057919c
|
@ -4474,6 +4474,7 @@ module.exports = (_ => {
|
||||||
className: BDFDB.disCN._repoheader,
|
className: BDFDB.disCN._repoheader,
|
||||||
style: {overflow: "visible"},
|
style: {overflow: "visible"},
|
||||||
children: [
|
children: [
|
||||||
|
isBeta && this.props.icon,
|
||||||
BDFDB.ReactUtils.createElement("span", {
|
BDFDB.ReactUtils.createElement("span", {
|
||||||
className: BDFDB.disCN._repoheadertitle,
|
className: BDFDB.disCN._repoheadertitle,
|
||||||
children: [
|
children: [
|
||||||
|
@ -7255,7 +7256,7 @@ module.exports = (_ => {
|
||||||
if (!shown && !e.currentTarget.BDFDBtooltipShown) {
|
if (!shown && !e.currentTarget.BDFDBtooltipShown) {
|
||||||
e.currentTarget.BDFDBtooltipShown = shown = true;
|
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({
|
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, {
|
}, this.props.tooltipConfig, {
|
||||||
onHide: (tooltip, anker) => {
|
onHide: (tooltip, anker) => {
|
||||||
delete anker.BDFDBtooltipShown;
|
delete anker.BDFDBtooltipShown;
|
||||||
|
@ -7307,19 +7308,16 @@ module.exports = (_ => {
|
||||||
BDFDB.LibraryComponents = Object.assign({}, InternalComponents.LibraryComponents);
|
BDFDB.LibraryComponents = Object.assign({}, InternalComponents.LibraryComponents);
|
||||||
|
|
||||||
InternalBDFDB.createCustomControl = function (data) {
|
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)}"></${isBeta ? "button" : "div"}>`);
|
||||||
|
BDFDB.ReactUtils.render(BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SvgIcon, {
|
||||||
className: !isBeta && BDFDB.disCN._repoicon,
|
className: !isBeta && BDFDB.disCN._repoicon,
|
||||||
nativeClass: true,
|
nativeClass: true,
|
||||||
name: data.svgName,
|
name: data.svgName,
|
||||||
width: isBeta ? "20" : "24",
|
width: isBeta ? "20" : "24",
|
||||||
height: isBeta ? "20" : "24"
|
height: isBeta ? "20" : "24"
|
||||||
})
|
}), controlButton);
|
||||||
let controlButton = BDFDB.DOMUtils.create(`<${isBeta ? "button" : "div"} class="${BDFDB.DOMUtils.formatClassName(isBeta && BDFDB.disCN._repobutton, BDFDB.disCN._repocontrolsbutton)}"></${isBeta ? "button" : "div"}>`);
|
|
||||||
BDFDB.ReactUtils.render(data.tooltipText ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, {
|
|
||||||
text: data.tooltipText,
|
|
||||||
children: child
|
|
||||||
}) : child, controlButton);
|
|
||||||
controlButton.addEventListener("click", _ => {if (typeof data.onClick == "function") data.onClick();});
|
controlButton.addEventListener("click", _ => {if (typeof data.onClick == "function") data.onClick();});
|
||||||
|
if (data.tooltipText) controlButton.addEventListener("mouseenter", _ => {BDFDB.TooltipUtils.create(controlButton, data.tooltipText);});
|
||||||
return controlButton;
|
return controlButton;
|
||||||
};
|
};
|
||||||
InternalBDFDB.appendCustomControls = function (card) {
|
InternalBDFDB.appendCustomControls = function (card) {
|
||||||
|
|
Loading…
Reference in New Issue