setting to disable role colors

This commit is contained in:
MathMan05 2025-04-02 11:10:14 -05:00
parent ea7769ce85
commit 4b087cb98b
3 changed files with 19 additions and 0 deletions

View file

@ -1630,6 +1630,18 @@ class Localuser {
};
genSecurity();
}
{
const accessibility = settings.addButton(I18n.accessibility.name());
accessibility.addCheckboxInput(
I18n.accessibility.roleColors(),
(t) => {
this.perminfo.user.disableColors = !t;
},
{
initState: !this.perminfo.user.disableColors,
},
);
}
{
const connections = settings.addButton(I18n.getTranslation("localuser.connections"));
const connectionContainer = document.createElement("div");

View file

@ -442,6 +442,9 @@ class Member extends SnowFlake {
return false;
}
getColor() {
if (!this.localuser.perminfo.user.disableColors) {
return "";
}
for (const thing of this.roles) {
const color = thing.getColor();
if (color) {

View file

@ -145,6 +145,10 @@
"noMessages": "No messages appear to be here, be the first to say something!",
"blankMessage": "Blank Message",
"spoiler": "Spoiler",
"accessibility": {
"name": "Accessibility",
"roleColors": "Disable role colors"
},
"channel": {
"name": "Channel",
"copyId": "Copy channel id",