diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index ecbc0a3ea7..46f9a70619 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 1.4.8 + * @version 1.4.9 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -22,18 +22,10 @@ module.exports = (_ => { "info": { "name": "BDFDB", "author": "DevilBro", - "version": "1.4.8", + "version": "1.4.9", "description": "Required Library for DevilBro's Plugins" }, - "rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`, - "changeLog": { - "added": { - "Date Input Component": "Added new Internal Component for Plugins like CreationDate, CompleteTimestamps etc." - }, - "fixed": { - "Date Input Component 12h Mode": "" - } - } + "rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js` }; const DiscordObjects = {}; @@ -4679,7 +4671,7 @@ module.exports = (_ => { InternalComponents.LibraryComponents.Badges.IconBadge = reactInitialized && class BDFDB_IconBadge extends LibraryModules.React.Component { render() { return BDFDB.ReactUtils.createElement("div", { - className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.badgeiconbadge, this.props.className), + className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.badgeiconbadge, this.props.shape && InternalComponents.LibraryComponents.Badges.BadgeShapes[this.props.shape] || InternalComponents.LibraryComponents.Badges.BadgeShapes.ROUND), style: Object.assign({ backgroundColor: this.props.disableColor ? null : (this.props.color || BDFDB.DiscordConstants.Colors.STATUS_RED) }, this.props.style), @@ -4697,7 +4689,7 @@ module.exports = (_ => { handleMouseLeave(e) {if (typeof this.props.onMouseLeave == "function") this.props.onMouseLeave(e, this);} render() { return BDFDB.ReactUtils.createElement("div", { - className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.badgenumberbadge, this.props.left ? BDFDB.disCN.badgeshaperoundleft : BDFDB.disCN.badgeshaperound), + className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.badgenumberbadge, this.props.shape && InternalComponents.LibraryComponents.Badges.BadgeShapes[this.props.shape] || InternalComponents.LibraryComponents.Badges.BadgeShapes.ROUND), style: Object.assign({ backgroundColor: !this.props.disableColor && (this.props.color || BDFDB.DiscordConstants.Colors.STATUS_RED), width: InternalComponents.LibraryComponents.Badges.getBadgeWidthForValue(this.props.count), @@ -5725,7 +5717,7 @@ module.exports = (_ => { InternalComponents.LibraryComponents.DateInput.getDefaultString = function () { const language = BDFDB.LanguageUtils.getLanguage().id; const date = new Date(); - return date.toLocaleString(language).replace(date.toLocaleDateString(language), "$date").replace(date.toLocaleTimeString(language), "$time"); + return date.toLocaleString(language).replace(date.toLocaleDateString(language), "$date").replace(date.toLocaleTimeString(language, {hourCycle: "h12"}), "$time12").replace(date.toLocaleTimeString(language, {hourCycle: "h11"}), "$time12").replace(date.toLocaleTimeString(language, {hourCycle: "h24"}), "$time").replace(date.toLocaleTimeString(language, {hourCycle: "h23"}), "$time"); }; InternalComponents.LibraryComponents.DateInput.parseDate = function (date) { let timeObj = typeof date == "string" || typeof date == "number" ? new Date(date) : date; @@ -5745,7 +5737,7 @@ module.exports = (_ => { return (strings.formatString || InternalComponents.LibraryComponents.DateInput.getDefaultString()) .replace(/\$date/g, date) .replace(/\$time12/g, strings.timeString && typeof strings.timeString == "string" ? InternalComponents.LibraryComponents.DateInput.formatTime(strings.timeString, timeObj, true) : timeObj.toLocaleTimeString(language, {hourCycle: "h12"})) - .replace(/\$time/g, strings.timeString && typeof strings.timeString == "string" ? InternalComponents.LibraryComponents.DateInput.formatTime(strings.timeString, timeObj) : timeObj.toLocaleTimeString(language, {hourCycle: "h24"})) + .replace(/\$time/g, strings.timeString && typeof strings.timeString == "string" ? InternalComponents.LibraryComponents.DateInput.formatTime(strings.timeString, timeObj) : timeObj.toLocaleTimeString(language, {hourCycle: "h23"})) .replace(/\$monthS/g, timeObj.toLocaleDateString(language, {month: "short"})) .replace(/\$month/g, timeObj.toLocaleDateString(language, {month: "long"})) .replace(/\$dayS/g, timeObj.toLocaleDateString(language, {weekday: "short"})) diff --git a/Library/_res/BDFDB.data.json b/Library/_res/BDFDB.data.json index 2e0a2f45de..42bcb75af4 100644 --- a/Library/_res/BDFDB.data.json +++ b/Library/_res/BDFDB.data.json @@ -1486,8 +1486,9 @@ "badgeicon": ["Badge", "icon"], "badgeiconbadge": ["Badge", "iconBadge"], "badgenumberbadge": ["Badge", "numberBadge"], - "badgeshaperound": ["Badge", ["baseShapeRound", "base"]], - "badgeshaperoundleft": ["Badge", ["baseShapeRoundLeft", "base"]], + "badgeshaperound": ["Badge", "baseShapeRound"], + "badgeshaperoundleft": ["Badge", "baseShapeRoundLeft"], + "badgeshaperoundright": ["Badge", "baseShapeRoundRight"], "badgetextbadge": ["Badge", "textBadge"], "badgewrapper": ["NotFound", "badgeWrapper"], "bdfdbbadge": ["BDFDB", "badge"],