Merge pull request 'less obnoxious warning' (#3) from krystalskullofficial/clientSideBadges:main into main
Reviewed-on: #3
This commit is contained in:
commit
530b03f01c
2 changed files with 34 additions and 2 deletions
11
index.tsx
11
index.tsx
|
@ -14,6 +14,8 @@ import { Forms, Toasts, UserStore } from "@webpack/common";
|
||||||
// eslint-disable-next-line unused-imports/no-unused-imports
|
// eslint-disable-next-line unused-imports/no-unused-imports
|
||||||
import { User } from "discord-types/general";
|
import { User } from "discord-types/general";
|
||||||
|
|
||||||
|
import "./style.css";
|
||||||
|
|
||||||
function isCurrentUser(userId: string) {
|
function isCurrentUser(userId: string) {
|
||||||
const u = UserStore.getCurrentUser().id;
|
const u = UserStore.getCurrentUser().id;
|
||||||
return u == userId;
|
return u == userId;
|
||||||
|
@ -27,9 +29,14 @@ export default definePlugin({
|
||||||
{ name: "KrystalSkullOfficial", id: 929208515883569182n }
|
{ name: "KrystalSkullOfficial", id: 929208515883569182n }
|
||||||
],
|
],
|
||||||
settingsAboutComponent: () => <>
|
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 className="vc-badges-warning">
|
||||||
<Forms.FormText>You may need to reload Discord after editing your settings for them to apply.</Forms.FormText>
|
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({
|
settings: definePluginSettings({
|
||||||
discordStaff: {
|
discordStaff: {
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
|
|
25
style.css
Normal file
25
style.css
Normal 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;
|
||||||
|
}
|
Loading…
Reference in a new issue