This commit is contained in:
Mirco Wittrien 2021-06-09 21:43:27 +02:00
parent 575e7cc43d
commit 7dfce1d825
4 changed files with 27 additions and 18 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB * @name BDFDB
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 1.6.8 * @version 1.6.9
* @description Required Library for DevilBro's Plugins * @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -19,7 +19,7 @@ module.exports = (_ => {
"info": { "info": {
"name": "BDFDB", "name": "BDFDB",
"author": "DevilBro", "author": "DevilBro",
"version": "1.6.8", "version": "1.6.9",
"description": "Required Library for DevilBro's Plugins" "description": "Required Library for DevilBro's Plugins"
}, },
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js` "rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
@ -7773,7 +7773,7 @@ module.exports = (_ => {
MemberListItem: ["componentDidMount", "componentDidUpdate"], MemberListItem: ["componentDidMount", "componentDidUpdate"],
PrivateChannel: ["componentDidMount", "componentDidUpdate"], PrivateChannel: ["componentDidMount", "componentDidUpdate"],
UserPopout: ["componentDidMount", "componentDidUpdate"], UserPopout: ["componentDidMount", "componentDidUpdate"],
UserProfile: ["componentDidMount", "componentDidUpdate"], AnalyticsContext: ["componentDidMount", "componentDidUpdate"],
SettingsView: "componentDidMount", SettingsView: "componentDidMount",
Shakeable: "render" Shakeable: "render"
} }
@ -7898,9 +7898,12 @@ module.exports = (_ => {
InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), e.node); InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), e.node);
InternalBDFDB._processUserInfoNode(e.instance.props.user, e.node); InternalBDFDB._processUserInfoNode(e.instance.props.user, e.node);
}; };
InternalBDFDB.processUserProfile = function (e) { InternalBDFDB.processAnalyticsContext = function (e) {
InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), e.node); if (e.instance.props.section != BDFDB.DiscordConstants.AnalyticsSections.PROFILE_MODAL) return;
InternalBDFDB._processUserInfoNode(e.instance.props.user, e.node); const user = BDFDB.ReactUtils.findValue(e.instance, "user");
const wrapper = e.node.querySelector(BDFDB.dotCN.userprofile) || e.node;
InternalBDFDB._processAvatarMount(user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), wrapper);
InternalBDFDB._processUserInfoNode(user, wrapper);
}; };
InternalBDFDB.processDiscordTag = function (e) { InternalBDFDB.processDiscordTag = function (e) {
if (e.instance && e.instance.props && e.returnvalue && e.instance.props.user) e.returnvalue.props.user = e.instance.props.user; if (e.instance && e.instance.props && e.returnvalue && e.instance.props.user) e.returnvalue.props.user = e.instance.props.user;

View File

@ -2,7 +2,7 @@
* @name EditServers * @name EditServers
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 2.3.1 * @version 2.3.2
* @description Allows you to locally edit Servers * @description Allows you to locally edit Servers
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -17,13 +17,8 @@ module.exports = (_ => {
"info": { "info": {
"name": "EditServers", "name": "EditServers",
"author": "DevilBro", "author": "DevilBro",
"version": "2.3.1", "version": "2.3.2",
"description": "Allows you to locally edit Servers" "description": "Allows you to locally edit Servers"
},
"changeLog": {
"fixed": {
"Settings": "Shown again"
}
} }
}; };
@ -88,7 +83,7 @@ module.exports = (_ => {
before: { before: {
Guild: "render", Guild: "render",
GuildIconWrapper: "render", GuildIconWrapper: "render",
MutualGuilds: "render", MutualGuilds: "default",
QuickSwitcher: "render", QuickSwitcher: "render",
QuickSwitchChannelResult: "render", QuickSwitchChannelResult: "render",
GuildSidebar: "render", GuildSidebar: "render",
@ -317,7 +312,10 @@ module.exports = (_ => {
} }
processMutualGuilds (e) { processMutualGuilds (e) {
if (this.settings.places.mutualGuilds) for (let i in e.instance.props.mutualGuilds) e.instance.props.mutualGuilds[i].guild = this.getGuildData(e.instance.props.mutualGuilds[i].guild.id); if (this.settings.places.mutualGuilds) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "GuildRow"});
if (index > -1) for (let row of children) if (row && row.props && row.props.guild) row.props.guild = this.getGuildData(row.props.guild.id);
}
} }
processQuickSwitcher (e) { processQuickSwitcher (e) {

View File

@ -2,7 +2,7 @@
* @name EditUsers * @name EditUsers
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 4.2.8 * @version 4.2.9
* @description Allows you to locally edit Users * @description Allows you to locally edit Users
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": { "info": {
"name": "EditUsers", "name": "EditUsers",
"author": "DevilBro", "author": "DevilBro",
"version": "4.2.8", "version": "4.2.9",
"description": "Allows you to locally edit Users" "description": "Allows you to locally edit Users"
}, },
"changeLog": { "changeLog": {
@ -92,6 +92,7 @@ module.exports = (_ => {
activity: {value: true, description: "Activity Page"}, activity: {value: true, description: "Activity Page"},
userPopout: {value: true, description: "User Popouts"}, userPopout: {value: true, description: "User Popouts"},
userProfile: {value: true, description: "User Profile Modal"}, userProfile: {value: true, description: "User Profile Modal"},
mutualFriends: {value: true, description: "Mutual Friends"},
autcocompletes: {value: true, description: "Autocomplete Menu"}, autcocompletes: {value: true, description: "Autocomplete Menu"},
guildSettings: {value: true, description: "Server Settings"}, guildSettings: {value: true, description: "Server Settings"},
quickSwitcher: {value: true, description: "Quick Switcher"}, quickSwitcher: {value: true, description: "Quick Switcher"},
@ -141,6 +142,7 @@ module.exports = (_ => {
DiscordTag: "default", DiscordTag: "default",
NameTag: "default", NameTag: "default",
UserPopoutInfo: "default", UserPopoutInfo: "default",
MutualFriends: "default",
NowPlayingHeader: "Header", NowPlayingHeader: "Header",
VoiceUser: "render", VoiceUser: "render",
Account: "render", Account: "render",
@ -531,6 +533,13 @@ module.exports = (_ => {
} }
} }
processMutualFriends (e) {
if (this.settings.places.mutualFriends) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "FriendRow"});
if (index > -1) for (let row of children) if (row && row.props && row.props.user) row.props.user = this.getUserData(row.props.user.id);
}
}
processUserInfo (e) { processUserInfo (e) {
if (e.instance.props.user && this.settings.places.friendList) { if (e.instance.props.user && this.settings.places.friendList) {
e.instance.props.user = this.getUserData(e.instance.props.user.id); e.instance.props.user = this.getUserData(e.instance.props.user.id);

View File

@ -1006,7 +1006,6 @@ module.exports = (_ => {
} }
processUserBanner (e) { processUserBanner (e) {
if (e.instance.props.user && this.settings.places.userAvatars && BDFDB.UserUtils.getBanner(e.instance.props.user.id)) console.log(e, );
if (e.instance.props.user && this.settings.places.userAvatars && BDFDB.UserUtils.getBanner(e.instance.props.user.id)) e.returnvalue.props.onContextMenu = event => { if (e.instance.props.user && this.settings.places.userAvatars && BDFDB.UserUtils.getBanner(e.instance.props.user.id)) e.returnvalue.props.onContextMenu = event => {
let validUrls = this.filterUrls((e.instance.props.user.getBannerURL() || "").replace(/\.webp|\.gif/, ".png"), BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.user.banner) && e.instance.props.user.getBannerURL(true)); let validUrls = this.filterUrls((e.instance.props.user.getBannerURL() || "").replace(/\.webp|\.gif/, ".png"), BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.user.banner) && e.instance.props.user.getBannerURL(true));
if (validUrls.length) BDFDB.ContextMenuUtils.open(this, event, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, { if (validUrls.length) BDFDB.ContextMenuUtils.open(this, event, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, {