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) {