mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-23 21:37:03 -04:00
Fixes
This commit is contained in:
commit
9bdb8a88a8
7 changed files with 37 additions and 59 deletions
|
@ -100,12 +100,12 @@ export default definePlugin({
|
|||
<><Forms.FormTitle>
|
||||
<Forms.FormTitle>How to use?</Forms.FormTitle>
|
||||
</Forms.FormTitle>
|
||||
<Forms.FormText>
|
||||
<Forms.FormText>Go to <Link href="/settings/appearance" onClick={e => { e.preventDefault(); closeAllModals(); FluxDispatcher.dispatch({ type: "USER_SETTINGS_MODAL_SET_SECTION", section: "Appearance" }); }}>Appearance Settings</Link> tab.</Forms.FormText>
|
||||
<Forms.FormText>Scroll down to "In-app Icons" and click on "Preview App Icon".</Forms.FormText>
|
||||
<Forms.FormText>And upload your own custom icon!</Forms.FormText>
|
||||
<Forms.FormText>You can only use links when you are uploading your Custom Icon.</Forms.FormText>
|
||||
</Forms.FormText></>
|
||||
<Forms.FormText>
|
||||
<Forms.FormText>Go to <Link href="/settings/appearance" onClick={e => { e.preventDefault(); closeAllModals(); FluxDispatcher.dispatch({ type: "USER_SETTINGS_MODAL_SET_SECTION", section: "Appearance" }); }}>Appearance Settings</Link> tab.</Forms.FormText>
|
||||
<Forms.FormText>Scroll down to "In-app Icons" and click on "Preview App Icon".</Forms.FormText>
|
||||
<Forms.FormText>And upload your own custom icon!</Forms.FormText>
|
||||
<Forms.FormText>You can only use links when you are uploading your Custom Icon.</Forms.FormText>
|
||||
</Forms.FormText></>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -121,9 +121,9 @@ function getBadgesToApply() {
|
|||
description: rank.title,
|
||||
component: () => getBadgeComponent(rank),
|
||||
shouldShow: (info: BadgeUserArgs) => {
|
||||
if (!RelationshipStore.isFriend(info.user.id)) { return false; }
|
||||
if (!RelationshipStore.isFriend(info.userId)) { return false; }
|
||||
|
||||
const days = daysSince(RelationshipStore.getSince(info.user.id));
|
||||
const days = daysSince(RelationshipStore.getSince(info.userId));
|
||||
|
||||
if (self[index + 1] == null) {
|
||||
return days > rank.requirement;
|
||||
|
|
|
@ -20,7 +20,6 @@ import { addBadge, BadgePosition, ProfileBadge, removeBadge } from "@api/Badges"
|
|||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { React, Tooltip } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
type CustomBadge = string | {
|
||||
name: string;
|
||||
|
@ -67,9 +66,9 @@ const BadgeComponent = ({ name, img }: { name: string, img: string; }) => {
|
|||
);
|
||||
};
|
||||
|
||||
const GlobalBadges = ({ user }: { user: User; }) => {
|
||||
const GlobalBadges = ({ userId }: { userId: string; }) => {
|
||||
const [badges, setBadges] = React.useState<BadgeCache["badges"]>({});
|
||||
React.useEffect(() => setBadges(fetchBadges(user.id) ?? {}), [user.id]);
|
||||
React.useEffect(() => setBadges(fetchBadges(userId) ?? {}), [userId]);
|
||||
|
||||
if (!badges) return null;
|
||||
const globalBadges: JSX.Element[] = [];
|
||||
|
@ -104,7 +103,7 @@ const GlobalBadges = ({ user }: { user: User; }) => {
|
|||
const Badge: ProfileBadge = {
|
||||
component: b => <GlobalBadges {...b} />,
|
||||
position: BadgePosition.START,
|
||||
shouldShow: userInfo => !!Object.keys(fetchBadges(userInfo.user.id) ?? {}).length,
|
||||
shouldShow: userInfo => !!Object.keys(fetchBadges(userInfo.userId) ?? {}).length,
|
||||
key: "GlobalBadges"
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue