stuff
This commit is contained in:
parent
0d45f5f815
commit
acee10f777
|
@ -152,6 +152,42 @@
|
||||||
"ZoomUtils": {"props": ["setZoom", "setFontSize"]}
|
"ZoomUtils": {"props": ["setZoom", "setFontSize"]}
|
||||||
},
|
},
|
||||||
"ModuleUtilsConfig": {
|
"ModuleUtilsConfig": {
|
||||||
|
"QueuedComponents": [
|
||||||
|
"GuildHeaderContextMenu",
|
||||||
|
"SystemMessageOptionContextMenu",
|
||||||
|
"SystemMessageOptionToolbar",
|
||||||
|
"MessageOptionContextMenu",
|
||||||
|
"MessageOptionToolbar"
|
||||||
|
],
|
||||||
|
"ContextMenuTypes": [
|
||||||
|
"UserSettingsCog",
|
||||||
|
"UserProfileActions",
|
||||||
|
"Event",
|
||||||
|
"GroupDMUser",
|
||||||
|
"GroupDM",
|
||||||
|
"DM",
|
||||||
|
"User",
|
||||||
|
"Developer",
|
||||||
|
"Slate",
|
||||||
|
"GuildSettingsRole",
|
||||||
|
"GuildDirectoryEntry",
|
||||||
|
"GuildFolder",
|
||||||
|
"SystemMessage",
|
||||||
|
"Message",
|
||||||
|
"Native",
|
||||||
|
"Role",
|
||||||
|
"Guild",
|
||||||
|
"Channel"
|
||||||
|
],
|
||||||
|
"ContextMenuTypesMap": {
|
||||||
|
"GroupDMUserContextMenu": "DMContextMenu"
|
||||||
|
},
|
||||||
|
"ContextMenuSubItemsMap": {
|
||||||
|
"UserContextMenu": {
|
||||||
|
"key": "user",
|
||||||
|
"items": ["useHideNoVideoParticipantsItem", "useHideSelfVideoItem", "usePreviewVideoItem", "useChangeIdentityItem", "useMoveToAudienceItem", "useAddFriendNicknameItem", "useAddNoteItem", "useBlockUserItem", "useCallUserItem", "useFocusVideoItem", "useInviteUserToGuildItems", "useMentionUserItem", "useMessageUserItem", "useUserProfileItem", "useUserRolesItems", "useUserVolumeItem", "useWatchStreamItem"]
|
||||||
|
}
|
||||||
|
},
|
||||||
"PatchTypes": [
|
"PatchTypes": [
|
||||||
"before",
|
"before",
|
||||||
"instead",
|
"instead",
|
||||||
|
@ -264,6 +300,7 @@
|
||||||
"QuickSwitchUserResult": "LibraryComponents.QuickSwitchItems.User"
|
"QuickSwitchUserResult": "LibraryComponents.QuickSwitchItems.User"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ForceLoadedComponents": {},
|
||||||
"NativeSubComponents": {
|
"NativeSubComponents": {
|
||||||
"Button": {"props": ["Colors", "Hovers", "Looks"]},
|
"Button": {"props": ["Colors", "Hovers", "Looks"]},
|
||||||
"Checkbox": {"name": "Checkbox"},
|
"Checkbox": {"name": "Checkbox"},
|
||||||
|
|
|
@ -184,10 +184,6 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onDMContextMenu (e) {
|
onDMContextMenu (e) {
|
||||||
this.onUserContextMenu(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
onUserContextMenu (e) {
|
|
||||||
if (e.instance.props.user) {
|
if (e.instance.props.user) {
|
||||||
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "remove-friend"});
|
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "remove-friend"});
|
||||||
let favorized = favorizedFriends.indexOf(e.instance.props.user.id) > -1;
|
let favorized = favorizedFriends.indexOf(e.instance.props.user.id) > -1;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name ImageUtilities
|
* @name ImageUtilities
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 4.5.5
|
* @version 4.5.6
|
||||||
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
|
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
|
||||||
* @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": "ImageUtilities",
|
"name": "ImageUtilities",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "4.5.5",
|
"version": "4.5.6",
|
||||||
"description": "Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)"
|
"description": "Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -508,7 +508,17 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onUserContextMenu (e) {
|
onUserContextMenu (e) {
|
||||||
if (e.instance.props.user && this.settings.places.userAvatars) this.injectItem(e, (e.instance.props.user.getAvatarURL(e.instance.props.guildId, 4096) || "").replace(/\.webp|\.gif/, ".png"), BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.user.avatar) && e.instance.props.user.getAvatarURL(e.instance.props.guildId, 4096, true));
|
if (e.instance.props.user && this.settings.places.userAvatars && e.subType == "useUserRolesItems") {
|
||||||
|
let validUrls = this.filterUrls((e.instance.props.user.getAvatarURL(e.instance.props.guildId, 4096) || "").replace(/\.webp|\.gif/, ".png"), BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.user.avatar) && e.instance.props.user.getAvatarURL(e.instance.props.guildId, 4096, true));
|
||||||
|
if (!validUrls.length) return;
|
||||||
|
|
||||||
|
if (e.returnvalue.length) e.returnvalue.push(BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuSeparator, {}));
|
||||||
|
e.returnvalue.push(BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||||
|
label: this.isValid(validUrls[0].file, "video") ? BDFDB.LanguageUtils.LanguageStrings.VIDEO : BDFDB.LanguageUtils.LanguageStrings.IMAGE + " " + BDFDB.LanguageUtils.LanguageStrings.ACTIONS,
|
||||||
|
id: BDFDB.ContextMenuUtils.createItemId(this.name, "main-subitem"),
|
||||||
|
children: this.createSubMenus(e.instance, validUrls)
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onGroupDMContextMenu (e) {
|
onGroupDMContextMenu (e) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name UserNotes
|
* @name UserNotes
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.0.7
|
* @version 1.0.8
|
||||||
* @description Allows you to write User Notes locally
|
* @description Allows you to write User Notes locally
|
||||||
* @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": "UserNotes",
|
"name": "UserNotes",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"description": "Allows you to write User Notes locally"
|
"description": "Allows you to write User Notes locally"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -106,14 +106,12 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onUserContextMenu (e) {
|
onUserContextMenu (e) {
|
||||||
if (e.instance.props.user) {
|
if (e.instance.props.user && e.subType == "useUserRolesItems") {
|
||||||
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "devmode-copy-id", group: true});
|
if (e.returnvalue.length) e.returnvalue.push(BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuSeparator, {}));
|
||||||
children.splice(index > -1 ? index : children.length, 0, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, {
|
e.returnvalue.push(BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||||
children: BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
label: this.labels.user_note,
|
||||||
label: this.labels.user_note,
|
id: BDFDB.ContextMenuUtils.createItemId(this.name, "user-note"),
|
||||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "user-note"),
|
action: _ => this.openNotesModal(e.instance.props.user)
|
||||||
action: _ => this.openNotesModal(e.instance.props.user)
|
|
||||||
})
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue