This commit is contained in:
Mirco Wittrien 2021-02-20 13:41:20 +01:00
parent e494dda85c
commit 30bd2b4ad1
7 changed files with 12 additions and 15 deletions

View File

@ -7173,7 +7173,7 @@ module.exports = (_ => {
if (this.tooltip) this.tooltip.update(text);
}
render() {
let child = (BDFDB.ArrayUtils.is(this.props.children) ? this.props.children[0] : this.props.children) || BDFDB.ReactUtils.createElement("div", {});
let child = (typeof this.props.children == "function" ? this.props.children() : (BDFDB.ArrayUtils.is(this.props.children) ? this.props.children[0] : this.props.children)) || BDFDB.ReactUtils.createElement("div", {});
child.props.className = BDFDB.DOMUtils.formatClassName(child.props.className, this.props.className);
let childProps = Object.assign({}, child.props);
let shown = false;

View File

@ -14,12 +14,12 @@ module.exports = (_ => {
"info": {
"name": "CompleteTimestamps",
"author": "DevilBro",
"version": "1.5.1",
"version": "1.5.2",
"description": "Replace all timestamps with complete timestamps"
},
"changeLog": {
"added": {
"Format for Tooltips": "Added an option to set up and select a custom format for timestamps inside tooltips"
"fixed": {
"Mini Stamp Tooltip": "Fixes the issue where tooltips for mini time stamps wouldn't show, smh this is discord's own fault for their shitty css"
}
}
};
@ -101,25 +101,22 @@ module.exports = (_ => {
SystemMessage: "default"
}
};
this.css = `
${BDFDB.dotCN.messagetimestamp} {
z-index: 1;
}
`;
}
onStart () {
languages = BDFDB.ObjectUtils.deepAssign({
own: {
"name": "Own",
name: "Own",
id: "own"
}
}, BDFDB.LanguageUtils.languages);
// REMOVE 21.12.2020
let oC = BDFDB.DataUtils.load(this, "choices"), oF = BDFDB.DataUtils.load(this, "formats");
if (!oC.timestampToolLang || !oF.ownFormatTool) {
oC.timestampToolLang = oC.timestampLang;
oF.ownFormatTool = oF.ownFormat;
BDFDB.DataUtils.save(oC, this, "choices");
BDFDB.DataUtils.save(oF, this, "formats");
}
this.forceUpdateAll();
}
@ -158,7 +155,7 @@ module.exports = (_ => {
label: this.defaults.choices[key].description,
basis: "65%",
value: choices[key],
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(languages, (lang, id) => {return {value: id, label: lang.name}})),
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(languages, (lang, id) => ({value: id, label: lang.name}))),
searchable: true,
optionRenderer: lang => {
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 KiB