GlobalBadges & UserPFP: onChange -> isValid

This commit is contained in:
thororen1234 2025-11-25 11:14:27 -05:00
parent 078914a40f
commit 0ecb34d49f
No known key found for this signature in database
3 changed files with 8 additions and 8 deletions

View file

@ -27,13 +27,13 @@ const Badge: ProfileBadge = {
export default definePlugin({
name: "GlobalBadges",
description: "Adds global badges from other client mods",
authors: [Devs.HypedDomi, EquicordDevs.Wolfie],
authors: [Devs.HypedDomi, EquicordDevs.Wolfie, Devs.thororen],
settings,
settingsAboutComponent: () => (
<>
<Button
className={cl("settings-button")}
variant="link"
className={cl("settings-button")}
onClick={() => openInviteModal(INVITE_LINK)}
>
Join GlobalBadges Server

View file

@ -89,9 +89,9 @@ export const settings = definePluginSettings({
description: "API to use",
default: "https://badges.equicord.org/",
restartNeeded: false,
onChange: (e => {
if (!e) return settings.store.apiUrl = "https://badges.equicord.org/";
return e;
isValid: (value => {
if (!value) return false;
return true;
})
}
});

View file

@ -32,9 +32,9 @@ const settings = definePluginSettings({
description: "URL to load database from",
type: OptionType.STRING,
default: "https://userpfp.github.io/UserPFP/source/data.json",
onChange: (e => {
if (!e) return settings.store.databaseSource = "https://userpfp.github.io/UserPFP/source/data.json";
return e;
isValid: (value => {
if (!value) return false;
return true;
})
}
});