GlobalBadges & UserPFP: onChange -> isValid
This commit is contained in:
parent
078914a40f
commit
0ecb34d49f
3 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue