Merge pull request 'less obnoxious warning' (#3) from krystalskullofficial/clientSideBadges:main into main

Reviewed-on: #3
This commit is contained in:
nin0dev 2025-01-11 19:52:16 -05:00
commit 530b03f01c
2 changed files with 34 additions and 2 deletions

View file

@ -14,6 +14,8 @@ import { Forms, Toasts, UserStore } from "@webpack/common";
// eslint-disable-next-line unused-imports/no-unused-imports
import { User } from "discord-types/general";
import "./style.css";
function isCurrentUser(userId: string) {
const u = UserStore.getCurrentUser().id;
return u == userId;
@ -27,9 +29,14 @@ export default definePlugin({
{ name: "KrystalSkullOfficial", id: 929208515883569182n }
],
settingsAboutComponent: () => <>
<Forms.FormTitle style={{ color: "red", fontSize: "2rem", fontWeight: "bold" }}>Only you can view the badges. No, this can't and won't be changed.</Forms.FormTitle>
<Forms.FormText>You may need to reload Discord after editing your settings for them to apply.</Forms.FormText>
<Forms.FormText className="vc-badges-warning">
Only you can view the badges. No, this can't and won't be changed.
</Forms.FormText>
<Forms.FormText className="vc-badges-notice">
You may need to reload Discord after editing your settings for them to apply.
</Forms.FormText>
</>,
settings: definePluginSettings({
discordStaff: {
type: OptionType.BOOLEAN,

25
style.css Normal file
View file

@ -0,0 +1,25 @@
.vc-badges-warning {
font-size: 16px !important;
background-color: rgb(240 71 71 / 10%) !important;
color: rgb(240 71 71) !important;
border: 1px solid rgb(240 71 71 / 60%) !important;
border-radius: 5px !important;
font-weight: 500;
padding: 6px 10px;
text-align: center;
margin-top: 10px;
font-style: bold;
}
.vc-badges-notice {
font-size: 16px !important;
background-color: var(--info-warning-background) !important;
color: var(--info-warning-text) !important;
border: 1px solid var(--info-warning-foreground) !important;
border-radius: 5px !important;
font-weight: 500;
padding: 6px 10px;
text-align: center;
margin-top: 10px;
font-style: bold;
}