feat(settings): enhance user tag settings with additional options

This commit is contained in:
Rayanzay 2025-05-31 15:56:59 +10:00
parent 7a545ce83d
commit e02a25ef52
3 changed files with 35 additions and 20 deletions

View file

@ -28,6 +28,7 @@ export default definePlugin({
guild_id !== SelectedGuildStore.getGuildId() && <Popout
position="top"
renderPopout={() => <ServerProfileComponent guildId={guild_id} />}
targetElementRef={{} as any} // Add ref to satisfy type checking
>
{popoutProps => <div className={cl("footer-element")} {...popoutProps}>
{

View file

@ -17,5 +17,20 @@ export const settings = definePluginSettings({
type: OptionType.STRING,
description: "Text to display for special users",
default: "Special",
},
dontShowBotTag: {
type: OptionType.BOOLEAN,
description: "Don't show bot tag",
default: false
},
dontShowForBots: {
type: OptionType.BOOLEAN,
description: "Don't show tags for bots",
default: false
},
tagSettings: {
type: OptionType.COMPONENT,
description: "Tag Settings",
component: () => null // This will be handled by the SettingsComponent in settings.tsx
}
});

View file

@ -85,30 +85,29 @@ function SettingsComponent() {
}
export const settings = definePluginSettings({
dontShowForBots: {
description: "Don't show extra tags for bots (excluding webhooks)",
type: OptionType.BOOLEAN,
default: false
},
dontShowBotTag: {
description: "Only show extra tags for bots / Hide [APP] text",
type: OptionType.BOOLEAN,
default: false,
restartNeeded: true
},
tagSettings: {
type: OptionType.COMPONENT,
component: SettingsComponent,
description: "fill me"
},
specialUsers: {
type: OptionType.STRING,
description: "List of special user IDs (comma separated)",
default: "878151241769820173",
description: "Special users (comma-separated user IDs)",
default: ""
},
specialTag: {
type: OptionType.STRING,
description: "Text to display for special users",
default: "Special",
description: "Tag for special users",
default: "SPECIAL"
},
dontShowBotTag: {
type: OptionType.BOOLEAN,
description: "Don't show bot tag",
default: false
},
dontShowForBots: {
type: OptionType.BOOLEAN,
description: "Don't show tags for bots",
default: false
},
tagSettings: {
type: OptionType.COMPONENT,
description: "Tag Settings",
component: SettingsComponent
}
});