setting to disable role colors
This commit is contained in:
@@ -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");
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user