diff --git a/package.json b/package.json index b6cf047d0..4c2e450b2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "equicord", "private": "true", - "version": "1.14.13.3", + "version": "1.14.14.0", "description": "The other cutest Discord client mod", "homepage": "https://github.com/Equicord/Equicord#readme", "bugs": { @@ -104,4 +104,4 @@ "engines": { "node": ">=18" } -} +} \ No newline at end of file diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx index d0d7fe1aa..e07ef55bd 100644 --- a/src/plugins/_api/badges/index.tsx +++ b/src/plugins/_api/badges/index.tsx @@ -26,7 +26,7 @@ import { copyWithToast } from "@utils/discord"; import { Logger } from "@utils/Logger"; import { shouldShowContributorBadge, shouldShowEquicordContributorBadge } from "@utils/misc"; import definePlugin from "@utils/types"; -import { ContextMenuApi, Menu, Toasts, UserStore } from "@webpack/common"; +import { ContextMenuApi, Forms, Menu, Modal, openModal, Toasts, UserStore } from "@webpack/common"; import Plugins, { PluginMeta } from "~plugins"; @@ -140,9 +140,15 @@ export default definePlugin({ match: /alt:" ","aria-hidden":!0,src:.{0,50}(\i).iconSrc/, replace: "...$1.props,$&" }, + // Path with 2026-04-badge-discovery OFF { match: /(?<=forceOpen:.{0,40}?ariaHidden:!0,)children:(?=.{0,50}?(\i)\.id)/, - replace: "children:$1.component?$self.renderBadgeComponent({...$1}) :" + replace: "children:$1.component?$self.renderBadgeComponent({...$1}):" + }, + // Path with 2026-04-badge-discovery ON + { + match: /(?<=fallbackIconSrc:.{0,50}?)children:(?=.{0,50}?(\i)\.id)/, + replace: "children:$1.component?$self.renderBadgeComponent({...$1}):" }, // handle onClick and onContextMenu { diff --git a/src/plugins/characterCounter/index.tsx b/src/plugins/characterCounter/index.tsx index bd4beb922..bde157298 100644 --- a/src/plugins/characterCounter/index.tsx +++ b/src/plugins/characterCounter/index.tsx @@ -34,7 +34,7 @@ function getCounterColor(percentage: number) { export default definePlugin({ name: "CharacterCounter", description: "Adds a character counter to the chat input", - authors: [Devs.thororen, EquicordDevs.creations], + authors: [Devs.thororen, Devs.creations], tags: ["Utility"], settings, patches: [ diff --git a/src/plugins/characterCounter/style.css b/src/plugins/characterCounter/style.css index fc6d873dc..5fbe2ee91 100644 --- a/src/plugins/characterCounter/style.css +++ b/src/plugins/characterCounter/style.css @@ -15,5 +15,5 @@ } .vc-charCounter-selected { - color: var(--vc-char-count-selected-color, --brand-500); -} \ No newline at end of file + color: var(--brand-500); +} 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 798f03be0..000000000 --- a/src/plugins/friendsSince/index.tsx +++ /dev/null @@ -1,83 +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 { BaseText } from "@components/BaseText"; -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 } 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:"); - -const FriendsSinceSection = 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 }); - -export default definePlugin({ - name: "FriendsSince", - description: "Shows when you became friends with someone in the user popout", - tags: ["Friends"], - authors: [Devs.Elvyra, Devs.Antti], - dependencies: ["ProfileSectionsAPI"], - renderProfileSection: { - render: FriendsSinceSection, - priority: 0, - }, -}); 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 diff --git a/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx b/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx index 9c2edce94..7e573c54d 100644 --- a/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx +++ b/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx @@ -29,7 +29,7 @@ import { findByCodeLazy } from "@webpack"; import { ContextMenuApi, FluxDispatcher, GuildMemberStore, GuildRoleStore, i18n, Menu, Modal, openModalLazy, PermissionsBits, ScrollerThin, Text, Tooltip, useEffect, useMemo, useRef, UserStore, useState, useStateFromStores } from "@webpack/common"; import { settings } from ".."; -import { PermissionAllowedIcon, PermissionDefaultIcon, PermissionDeniedIcon } from "./icons"; +import { PermissionAllowedIcon, PermissionDeniedIcon } from "./icons"; type GetRoleIconData = (role: Role, size: number) => { customIconSrc?: string; unicodeEmoji?: UnicodeEmoji; }; const getRoleIconData: GetRoleIconData = findByCodeLazy("convertSurrogateToName", "customIconSrc", "unicodeEmoji"); @@ -160,37 +160,44 @@ function RolesAndUsersPermissionsComponent({ permissions, guild, modalProps, hea
- {Object.values(PermissionsBits).map(bit => ( -
-
- {(() => { - const { permissions, overwriteAllow, overwriteDeny } = selectedItem; + {Object.values(PermissionsBits).map(bit => { + const overrideType = (() => { + const { permissions, overwriteAllow, overwriteDeny } = selectedItem; - if (permissions) - return (permissions & bit) === bit - ? PermissionAllowedIcon() - : PermissionDeniedIcon(); + if (permissions != null) + return (permissions & bit) === bit + ? "allowed" + : "denied"; - if (overwriteAllow && (overwriteAllow & bit) === bit) - return PermissionAllowedIcon(); - if (overwriteDeny && (overwriteDeny & bit) === bit) - return PermissionDeniedIcon(); + if (overwriteAllow && (overwriteAllow & bit) === bit) + return "allowed"; + if (overwriteDeny && (overwriteDeny & bit) === bit) + return "denied"; - return PermissionDefaultIcon(); - })()} + return "default"; + })(); + + if (overrideType === "default") return null; + + return ( +
+
+ {overrideType === "allowed" && } + {overrideType === "denied" && } +
+ {guildPermissionSpecMap[String(bit)].title} + + { + const { description } = guildPermissionSpecMap[String(bit)]; + return typeof description === "function" ? i18n.intl.format(description, {}) : description; + })() + }> + {props => } +
- {guildPermissionSpecMap[String(bit)].title} - - { - const { description } = guildPermissionSpecMap[String(bit)]; - return typeof description === "function" ? i18n.intl.format(description, {}) : description; - })() - }> - {props => } - -
- ))} + ); + })}
)} diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 9e61c4f69..322960c9a 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -658,6 +658,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "prism", id: 390884143749136386n, }, + creations: { + name: "creations", + id: 209830981060788225n + }, nightmaresan: { name: "NightmareSan", id: 304239816466235392n