diff --git a/src/plugins/friendsSince/README.md b/src/plugins/friendsSince/README.md deleted file mode 100644 index ccbb09b67..000000000 --- a/src/plugins/friendsSince/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# FriendsSince - -Shows when you became friends with someone in the user popout - -![](https://github.com/Vendicated/Vencord/assets/45497981/bb258188-ab48-4c4d-9858-1e90ba41e926) diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx deleted file mode 100644 index 3886cbff1..000000000 --- a/src/plugins/friendsSince/index.tsx +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2024 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import "./styles.css"; - -import ErrorBoundary from "@components/ErrorBoundary"; -import { Devs } from "@utils/constants"; -import { getCurrentChannel } from "@utils/discord"; -import definePlugin from "@utils/types"; -import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; -import { RelationshipStore, Text } from "@webpack/common"; - -const WrapperClasses = findCssClassesLazy("memberSinceWrapper"); -const ContainerClasses = findCssClassesLazy("memberSince"); -const getCreatedAtDate = findByCodeLazy('month:"short",day:"numeric"'); -const locale = findByPropsLazy("getLocale"); -const Section = findComponentByCodeLazy("headingVariant:", '"section"', "headingIcon:"); - -export default definePlugin({ - name: "FriendsSince", - description: "Shows when you became friends with someone in the user popout", - tags: ["Friends"], - authors: [Devs.Elvyra, Devs.Antti], - patches: [ - // DM User Sidebar - { - find: "#{intl::PROVISIONAL_ACCOUNT}),headingIcon:", - replacement: { - match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/, - replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})" - } - }, - // User Profile Modal - { - find: ",applicationRoleConnection:", - replacement: { - match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/, - replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false})," - } - }, - // User Profile Modal v2 - { - find: ".MODAL_V2,onClose:", - replacement: { - match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/, - replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false})," - } - } - ], - - FriendsSinceComponent: ErrorBoundary.wrap(({ userId, isSidebar }: { userId: string; isSidebar: boolean; }) => { - if (!RelationshipStore.isFriend(userId)) return null; - - const friendsSince = RelationshipStore.getSince(userId); - if (!friendsSince) return null; - - if (isSidebar) { - return ( -
- - {getCreatedAtDate(friendsSince, locale.getLocale())} - -
- ); - } - - return ( -
-
-
- {!!getCurrentChannel()?.guild_id && ( - - )} - - {getCreatedAtDate(friendsSince, locale.getLocale())} - -
-
-
- ); - }, { noop: true }), -}); diff --git a/src/plugins/friendsSince/styles.css b/src/plugins/friendsSince/styles.css deleted file mode 100644 index 0e404c1b6..000000000 --- a/src/plugins/friendsSince/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -.vc-friendsSince-profile-section { - gap: 4px; -} \ No newline at end of file