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
* @author DevilBro
* @authorId 278543574059057154
* @version 1.6.8
* @version 1.6.9
* @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -19,7 +19,7 @@ module.exports = (_ => {
"info": {
"name": "BDFDB",
"author": "DevilBro",
"version": "1.6.8",
"version": "1.6.9",
"description": "Required Library for DevilBro's Plugins"
},
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
@ -7773,7 +7773,7 @@ module.exports = (_ => {
MemberListItem: ["componentDidMount", "componentDidUpdate"],
PrivateChannel: ["componentDidMount", "componentDidUpdate"],
UserPopout: ["componentDidMount", "componentDidUpdate"],
UserProfile: ["componentDidMount", "componentDidUpdate"],
AnalyticsContext: ["componentDidMount", "componentDidUpdate"],
SettingsView: "componentDidMount",
Shakeable: "render"
}
@ -7898,9 +7898,12 @@ module.exports = (_ => {
InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), e.node);
InternalBDFDB._processUserInfoNode(e.instance.props.user, e.node);
};
InternalBDFDB.processUserProfile = function (e) {
InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), e.node);
InternalBDFDB._processUserInfoNode(e.instance.props.user, e.node);
InternalBDFDB.processAnalyticsContext = function (e) {
if (e.instance.props.section != BDFDB.DiscordConstants.AnalyticsSections.PROFILE_MODAL) return;
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) {
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
* @author DevilBro
* @authorId 278543574059057154
* @version 2.3.1
* @version 2.3.2
* @description Allows you to locally edit Servers
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,13 +17,8 @@ module.exports = (_ => {
"info": {
"name": "EditServers",
"author": "DevilBro",
"version": "2.3.1",
"version": "2.3.2",
"description": "Allows you to locally edit Servers"
},
"changeLog": {
"fixed": {
"Settings": "Shown again"
}
}
};
@ -88,7 +83,7 @@ module.exports = (_ => {
before: {
Guild: "render",
GuildIconWrapper: "render",
MutualGuilds: "render",
MutualGuilds: "default",
QuickSwitcher: "render",
QuickSwitchChannelResult: "render",
GuildSidebar: "render",
@ -317,7 +312,10 @@ module.exports = (_ => {
}
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) {

View File

@ -2,7 +2,7 @@
* @name EditUsers
* @author DevilBro
* @authorId 278543574059057154
* @version 4.2.8
* @version 4.2.9
* @description Allows you to locally edit Users
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "EditUsers",
"author": "DevilBro",
"version": "4.2.8",
"version": "4.2.9",
"description": "Allows you to locally edit Users"
},
"changeLog": {
@ -92,6 +92,7 @@ module.exports = (_ => {
activity: {value: true, description: "Activity Page"},
userPopout: {value: true, description: "User Popouts"},
userProfile: {value: true, description: "User Profile Modal"},
mutualFriends: {value: true, description: "Mutual Friends"},
autcocompletes: {value: true, description: "Autocomplete Menu"},
guildSettings: {value: true, description: "Server Settings"},
quickSwitcher: {value: true, description: "Quick Switcher"},
@ -141,6 +142,7 @@ module.exports = (_ => {
DiscordTag: "default",
NameTag: "default",
UserPopoutInfo: "default",
MutualFriends: "default",
NowPlayingHeader: "Header",
VoiceUser: "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) {
if (e.instance.props.user && this.settings.places.friendList) {
e.instance.props.user = this.getUserData(e.instance.props.user.id);

View File

@ -1006,7 +1006,6 @@ module.exports = (_ => {
}
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 => {
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, {