mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
feat(serverProfilesToolbox): save bio/themeColors/banner
Untested as I don't have Nitro
This commit is contained in:
parent
267b27c022
commit
b1dd141496
1 changed files with 18 additions and 2 deletions
|
@ -13,11 +13,18 @@ const SummaryItem = findComponentByCodeLazy("borderType", "showBorder", "hideDiv
|
||||||
|
|
||||||
let savedNick: string | null = null;
|
let savedNick: string | null = null;
|
||||||
let savedPronouns: string | null = null;
|
let savedPronouns: string | null = null;
|
||||||
|
let savedBio: string | undefined = undefined;
|
||||||
|
let savedThemeColors: number[] | undefined = undefined;
|
||||||
|
let savedBanner: string | undefined = undefined;
|
||||||
|
|
||||||
const { setPendingNickname, setPendingPronouns }: {
|
const { setPendingAvatar, setPendingBanner, setPendingBio, setPendingNickname, setPendingPronouns, setPendingThemeColors }: {
|
||||||
|
setPendingAvatar: (a: string | null) => void;
|
||||||
|
setPendingBanner: (a: string | undefined) => void;
|
||||||
|
setPendingBio: (a: string | undefined) => void;
|
||||||
setPendingNickname: (a: string | null) => void;
|
setPendingNickname: (a: string | null) => void;
|
||||||
setPendingPronouns: (a: string | null) => void;
|
setPendingPronouns: (a: string | null) => void;
|
||||||
} = findByPropsLazy("setPendingNickname");
|
setPendingThemeColors: (a: number[] | undefined) => void;
|
||||||
|
} = findByPropsLazy("setPendingNickname", "setPendingPronouns");
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "ServerProfilesToolbox",
|
name: "ServerProfilesToolbox",
|
||||||
|
@ -33,6 +40,9 @@ export default definePlugin({
|
||||||
const nick = GuildMemberStore.getNick(guildId, currentUser.id);
|
const nick = GuildMemberStore.getNick(guildId, currentUser.id);
|
||||||
savedNick = nick ?? "";
|
savedNick = nick ?? "";
|
||||||
savedPronouns = profile.pronouns;
|
savedPronouns = profile.pronouns;
|
||||||
|
savedBio = profile.bio;
|
||||||
|
savedThemeColors = profile.themeColors;
|
||||||
|
savedBanner = profile.banner;
|
||||||
}}>
|
}}>
|
||||||
Copy profile
|
Copy profile
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -40,6 +50,9 @@ export default definePlugin({
|
||||||
// set pending
|
// set pending
|
||||||
setPendingNickname(savedNick);
|
setPendingNickname(savedNick);
|
||||||
setPendingPronouns(savedPronouns);
|
setPendingPronouns(savedPronouns);
|
||||||
|
setPendingBio(savedBio);
|
||||||
|
setPendingThemeColors(savedThemeColors);
|
||||||
|
setPendingBanner(savedBanner);
|
||||||
}}>
|
}}>
|
||||||
Paste profile
|
Paste profile
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -47,6 +60,9 @@ export default definePlugin({
|
||||||
// reset
|
// reset
|
||||||
setPendingNickname("");
|
setPendingNickname("");
|
||||||
setPendingPronouns("");
|
setPendingPronouns("");
|
||||||
|
setPendingBio(undefined);
|
||||||
|
setPendingThemeColors(undefined);
|
||||||
|
setPendingBanner(undefined);
|
||||||
}}>
|
}}>
|
||||||
Reset profile
|
Reset profile
|
||||||
</Button>
|
</Button>
|
||||||
|
|
Loading…
Reference in a new issue