mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-26 06:38:24 -04:00
fixes
This commit is contained in:
parent
74177ea025
commit
130af33415
7 changed files with 72 additions and 17 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { addDecoration, removeDecoration } from "@api/MessageDecorations";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { isPluginDev } from "@utils/misc";
|
||||
import { isEquicordPluginDev, isPluginDev } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
|
||||
|
@ -35,7 +35,7 @@ function CheckBadge({ badge, author }: { badge: string; author: any; }): JSX.Ele
|
|||
switch (badge) {
|
||||
case "EquicordDonor":
|
||||
return (
|
||||
<span style={{ order: settings.store.VencordDonorPosition }}>
|
||||
<span style={{ order: settings.store.EquicordDonorPosition }}>
|
||||
{badges.getEquicordDonorBadges(author.id)?.map((badge: any) => (
|
||||
<RoleIconComponent
|
||||
className={roleIconClassName}
|
||||
|
@ -46,6 +46,17 @@ function CheckBadge({ badge, author }: { badge: string; author: any; }): JSX.Ele
|
|||
))}
|
||||
</span>
|
||||
);
|
||||
case "EquicordContributer":
|
||||
return isEquicordPluginDev(author.id) ? (
|
||||
<span style={{ order: settings.store.EquicordContributorPosition }}>
|
||||
<RoleIconComponent
|
||||
className={roleIconClassName}
|
||||
name={"Equicord Contributor"}
|
||||
size={20}
|
||||
src={"https://github.com/Equicord/Ignore/blob/main/icon.png?raw=true"}
|
||||
/>
|
||||
</span>
|
||||
) : null;
|
||||
case "VencordDonor":
|
||||
return (
|
||||
<span style={{ order: settings.store.VencordDonorPosition }}>
|
||||
|
@ -64,7 +75,7 @@ function CheckBadge({ badge, author }: { badge: string; author: any; }): JSX.Ele
|
|||
<span style={{ order: settings.store.VencordContributorPosition }}>
|
||||
<RoleIconComponent
|
||||
className={roleIconClassName}
|
||||
name={"Vencord/Equicord Contributor"}
|
||||
name={"Vencord Contributor"}
|
||||
size={20}
|
||||
src={"https://i.imgur.com/OypoHrV.png"}
|
||||
/>
|
||||
|
@ -108,7 +119,8 @@ function CheckBadge({ badge, author }: { badge: string; author: any; }): JSX.Ele
|
|||
function ChatBadges({ author }: any) {
|
||||
return (
|
||||
<span style={{ display: "inline-flex", marginLeft: 2, verticalAlign: "top" }}>
|
||||
{settings.store.showVencordDonor && <CheckBadge badge={"EquicordDonor"} author={author} />}
|
||||
{settings.store.showEquicordDonor && <CheckBadge badge={"EquicordDonor"} author={author} />}
|
||||
{settings.store.showEquicordContributor && <CheckBadge badge={"EquicordContributor"} author={author} />}
|
||||
{settings.store.showVencordDonor && <CheckBadge badge={"VencordDonor"} author={author} />}
|
||||
{settings.store.showVencordContributor && <CheckBadge badge={"VencordContributer"} author={author} />}
|
||||
{settings.store.showDiscordProfile && <CheckBadge badge={"DiscordProfile"} author={author} />}
|
||||
|
|
|
@ -13,7 +13,7 @@ import { Text, useEffect, UserStore, useState } from "@webpack/common";
|
|||
const settings = definePluginSettings({
|
||||
showEquicordDonor: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Enable to show Vencord donor badges in chat.",
|
||||
description: "Enable to show Equicord donor badges in chat.",
|
||||
hidden: true,
|
||||
default: true
|
||||
},
|
||||
|
@ -23,6 +23,18 @@ const settings = definePluginSettings({
|
|||
hidden: true,
|
||||
default: 0
|
||||
},
|
||||
showEquicordContributor: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Enable to show Equicord contributor badges in chat.",
|
||||
hidden: true,
|
||||
default: true
|
||||
},
|
||||
EquicordContributorPosition: {
|
||||
type: OptionType.NUMBER,
|
||||
description: "The position of the Equicord Contributor badge.",
|
||||
hidden: true,
|
||||
default: 1
|
||||
},
|
||||
showVencordDonor: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Enable to show Vencord donor badges in chat.",
|
||||
|
@ -33,7 +45,7 @@ const settings = definePluginSettings({
|
|||
type: OptionType.NUMBER,
|
||||
description: "The position of the Vencord Donor badges.",
|
||||
hidden: true,
|
||||
default: 1
|
||||
default: 2
|
||||
},
|
||||
showVencordContributor: {
|
||||
type: OptionType.BOOLEAN,
|
||||
|
@ -45,7 +57,7 @@ const settings = definePluginSettings({
|
|||
type: OptionType.NUMBER,
|
||||
description: "The position of the Vencord Contributor badge.",
|
||||
hidden: true,
|
||||
default: 2
|
||||
default: 3
|
||||
},
|
||||
showDiscordProfile: {
|
||||
type: OptionType.BOOLEAN,
|
||||
|
@ -57,7 +69,7 @@ const settings = definePluginSettings({
|
|||
type: OptionType.NUMBER,
|
||||
description: "The position of the Discord profile badges.",
|
||||
hidden: true,
|
||||
default: 3
|
||||
default: 4
|
||||
},
|
||||
showDiscordNitro: {
|
||||
type: OptionType.BOOLEAN,
|
||||
|
@ -69,7 +81,7 @@ const settings = definePluginSettings({
|
|||
type: OptionType.NUMBER,
|
||||
description: "The position of the Discord Nitro badge.",
|
||||
hidden: true,
|
||||
default: 4
|
||||
default: 5
|
||||
},
|
||||
badgeSettings: {
|
||||
type: OptionType.COMPONENT,
|
||||
|
@ -83,6 +95,7 @@ export default settings;
|
|||
const BadgeSettings = () => {
|
||||
const [images, setImages] = useState([
|
||||
{ src: "https://i.imgur.com/KsxHlbD.png", shown: settings.store.showEquicordDonor, title: "Equicord donor badges", key: "EquicordDonor", position: settings.store.EquicordDonorPosition },
|
||||
{ src: "https://github.com/Equicord/Ignore/blob/main/icon.png?raw=true", shown: settings.store.showEquicordContributor, title: "Equicord donor badges", key: "EquicordDonor", position: settings.store.EquicordContributorPosition },
|
||||
{ src: "https://cdn.discordapp.com/emojis/1026533070955872337.png", shown: settings.store.showVencordDonor, title: "Vencord donor badges", key: "VencordDonor", position: settings.store.VencordDonorPosition },
|
||||
{ src: "https://i.imgur.com/OypoHrV.png", shown: settings.store.showVencordContributor, title: "Vencord/Equicord contributor badge", key: "VencordContributer", position: settings.store.VencordContributorPosition },
|
||||
{ src: "https://cdn.discordapp.com/badge-icons/bf01d1073931f921909045f3a39fd264.png", shown: settings.store.showDiscordProfile, title: "Discord profile badges (HypeSquad, Discord Staff, Active Developer, etc.)", key: "DiscordProfile", position: settings.store.DiscordProfilePosition },
|
||||
|
@ -96,6 +109,10 @@ const BadgeSettings = () => {
|
|||
settings.store.EquicordDonorPosition = image.position;
|
||||
settings.store.showEquicordDonor = image.shown;
|
||||
break;
|
||||
case "EquiordContributer":
|
||||
settings.store.EquicordContributorPosition = image.position;
|
||||
settings.store.showEquicordContributor = image.shown;
|
||||
break;
|
||||
case "VencordDonor":
|
||||
settings.store.VencordDonorPosition = image.position;
|
||||
settings.store.showVencordDonor = image.shown;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue