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(); 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 connections = settings.addButton(I18n.getTranslation("localuser.connections"));
const connectionContainer = document.createElement("div"); const connectionContainer = document.createElement("div");

View file

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

View file

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