From 422f4c9806fa944bc12e746c9356263a1edc598f Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Mon, 28 Feb 2022 19:47:24 +0100 Subject: [PATCH] stuff --- Library/_res/0BDFDB.data.json | 11 +++++------ Library/_res/0BDFDB.raw.css | 3 +++ Plugins/BetterFriendList/BetterFriendList.plugin.js | 6 +++--- Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js | 7 ++++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index 80d580208c..bcc7881d7a 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -163,10 +163,8 @@ "UserSettingsCog", "UserProfileActions", "Event", - "UserGeneric", "GroupDMUser", "GroupDM", - "DM", "User", "Developer", "Slate", @@ -181,13 +179,12 @@ "Channel" ], "ContextMenuTypesMap": { - "GroupDMUserContextMenu": "DMContextMenu", - "UserGenericContextMenu": "DMContextMenu" + "GroupDMUserContextMenu": "UserContextMenu" }, "ContextMenuSubItemsMap": { "UserContextMenu": { - "key": "user", - "items": ["useHideNoVideoParticipantsItem", "useHideSelfVideoItem", "usePreviewVideoItem", "useChangeIdentityItem", "useMoveToAudienceItem", "useAddFriendNicknameItem", "useAddNoteItem", "useBlockUserItem", "useUserRelationshipItems", "useCallUserItem", "useFocusVideoItem", "useInviteUserToGuildItems", "useMentionUserItem", "useMessageUserItem", "useUserProfileItem", "useUserRolesItems", "useUserVolumeItem", "useWatchStreamItem"] + "keys": ["user", "channel"], + "items": ["useHideNoVideoParticipantsItem", "useHideSelfVideoItem", "usePreviewVideoItem", "useChangeIdentityItem", "useMoveToAudienceItem", "useAddFriendNicknameItem", "useAddNoteItem", "useBlockUserItem", "useUserRelationshipItems", "useUserManagementItems", "useCallUserItem", "useFocusVideoItem", "useInviteUserToGuildItems", "useMentionUserItem", "useMessageUserItem", "useUserProfileItem", "useUserRolesItems", "useUserVolumeItem", "useWatchStreamItem", "useCloseDMItem", "useMuteChannelItem"] } }, "PatchTypes": [ @@ -212,6 +209,8 @@ "QuickSwitchResult": "Result" }, "Finder": { + "useMuteChannelItem": {"strings": ["DM", "MenuItem", "Messages.MUTE_CHANNEL"], "lazyLoaded": true}, + "useUserManagementItems": {"strings": ["canManageUser", "MenuItem", "Messages.BAN_USER"], "lazyLoaded": true}, "useUserRelationshipItems": {"strings": ["ContextMenu", "isFriend", "addRelationship", "Messages.REMOVE_FRIEND"], "lazyLoaded": true}, "Account": {"class": "accountinfo"}, "App": {"class": "app"}, diff --git a/Library/_res/0BDFDB.raw.css b/Library/_res/0BDFDB.raw.css index a1036e1007..e4f850b97d 100644 --- a/Library/_res/0BDFDB.raw.css +++ b/Library/_res/0BDFDB.raw.css @@ -926,6 +926,9 @@ img:not([src]), img[src=""], img[src="null"] { [REPLACE_CLASS_inputnumberbuttons]:hover + [REPLACE_CLASS_input]:not([REPLACE_CLASS_inputfocused]):not([REPLACE_CLASS_inputerror]):not([REPLACE_CLASS_inputsuccess]):not([REPLACE_CLASS_inputdisabled]):not(:focus) { border-color: #040405; } +[REPLACE_CLASS_inputnumberwrapper] [REPLACE_CLASS_input] { + text-align: right; +} [REPLACE_CLASS_inputnumberwrapperdefault] [REPLACE_CLASS_input] { padding-right: 25px; } diff --git a/Plugins/BetterFriendList/BetterFriendList.plugin.js b/Plugins/BetterFriendList/BetterFriendList.plugin.js index ed6a48ad9c..0e44b99681 100644 --- a/Plugins/BetterFriendList/BetterFriendList.plugin.js +++ b/Plugins/BetterFriendList/BetterFriendList.plugin.js @@ -2,7 +2,7 @@ * @name BetterFriendList * @author DevilBro * @authorId 278543574059057154 - * @version 1.4.4 + * @version 1.4.5 * @description Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -17,7 +17,7 @@ module.exports = (_ => { "info": { "name": "BetterFriendList", "author": "DevilBro", - "version": "1.4.4", + "version": "1.4.5", "description": "Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount" } }; @@ -184,7 +184,7 @@ module.exports = (_ => { } onUserContextMenu (e) { - if (e.instance.props.user && e.subType == "useUserRelationshipItems") { + if (e.instance.props.user && e.subType == "useUserRelationshipItems" && BDFDB.LibraryModules.RelationshipStore.isFriend(e.instance.props.user.id)) { let favorized = favorizedFriends.indexOf(e.instance.props.user.id) > -1; let hidden = hiddenFriends.indexOf(e.instance.props.user.id) > -1; e.returnvalue.push(this.settings.general.addFavorizedCategory && BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { diff --git a/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js b/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js index 3c0c70e157..363f1428e7 100644 --- a/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js +++ b/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js @@ -2,7 +2,7 @@ * @name BetterNsfwTag * @author DevilBro * @authorId 278543574059057154 - * @version 1.2.8 + * @version 1.2.9 * @description Adds a more noticeable Tag to NSFW Channels * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -17,7 +17,7 @@ module.exports = (_ => { "info": { "name": "BetterNsfwTag", "author": "DevilBro", - "version": "1.2.8", + "version": "1.2.9", "description": "Adds a more noticeable Tag to NSFW Channels" } }; @@ -83,7 +83,8 @@ module.exports = (_ => { } processChannelItem (e) { - if (e.instance.props.channel && e.instance.props.channel.nsfw) e.instance.props.children.push(BDFDB.ReactUtils.createElement("div", { + if (e.instance.props.channel && e.instance.props.channel.nsfw && !BDFDB.ReactUtils.findChild(e.instance.props.children, {key: "NFSW_TAG"})) e.instance.props.children.push(BDFDB.ReactUtils.createElement("div", { + key: "NFSW_TAG", className: BDFDB.disCNS._betternsfwtagtag + BDFDB.disCN.channelchildiconbase, children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.TextBadge, { style: {borderRadius: "3px"},