mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-24 22:07:03 -04:00
Update To Devs and Badges Sys
This commit is contained in:
parent
e4425ca98f
commit
44109d9979
58 changed files with 295 additions and 240 deletions
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { addDecoration, removeDecoration } from "@api/MessageDecorations";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { isPluginDev } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
|
@ -46,6 +46,19 @@ function CheckBadge({ badge, author }: { badge: string; author: any; }): JSX.Ele
|
|||
))}
|
||||
</span>
|
||||
);
|
||||
case "EquicordDonor":
|
||||
return (
|
||||
<span style={{ order: settings.store.VencordDonorPosition }}>
|
||||
{badges.getEquicordDonorBadges(author.id)?.map((badge: any) => (
|
||||
<RoleIconComponent
|
||||
className={roleIconClassName}
|
||||
name={badge.description}
|
||||
size={20}
|
||||
src={badge.image}
|
||||
/>
|
||||
))}
|
||||
</span>
|
||||
);
|
||||
case "VencordContributer":
|
||||
return isPluginDev(author.id) ? (
|
||||
<span style={{ order: settings.store.VencordContributorPosition }}>
|
||||
|
@ -96,6 +109,7 @@ function ChatBadges({ author }: any) {
|
|||
return (
|
||||
<span style={{ display: "inline-flex", marginLeft: 2, verticalAlign: "top" }}>
|
||||
{settings.store.showVencordDonor && <CheckBadge badge={"VencordDonor"} author={author} />}
|
||||
{settings.store.showVencordDonor && <CheckBadge badge={"EquicordDonor"} author={author} />}
|
||||
{settings.store.showVencordContributor && <CheckBadge badge={"VencordContributer"} author={author} />}
|
||||
{settings.store.showDiscordProfile && <CheckBadge badge={"DiscordProfile"} author={author} />}
|
||||
{settings.store.showDiscordNitro && <CheckBadge badge={"DiscordNitro"} author={author} />}
|
||||
|
@ -105,7 +119,7 @@ function ChatBadges({ author }: any) {
|
|||
|
||||
export default definePlugin({
|
||||
name: "ShowBadgesInChat",
|
||||
authors: [Devs.Inbestigator, Devs.KrystalSkull],
|
||||
authors: [Devs.Inbestigator, EquicordDevs.KrystalSkull],
|
||||
description: "Shows the message author's badges beside their name in chat.",
|
||||
dependencies: ["MessageDecorationsAPI"],
|
||||
patches: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue