disable gradient colors setting

This commit is contained in:
MathMan05 committed 2026-02-11 12:02:06 -06:00
1 parent 84b54b1300
commit bf66d5363e
4 files changed
+21 -3

No files matched your search

+2
View File
@@ -86,7 +86,9 @@ if (window.location.pathname.startsWith("/channels")) {
regSwap(thisUser);
thisUser.initwebsocket().then(async () => {
thisUser.loaduser();
console.warn("huh");
await thisUser.init();
console.warn("huh2");
const loading = document.getElementById("loading") as HTMLDivElement;
loading.classList.add("doneloading");
loading.classList.remove("loading");
+13
View File
@@ -530,7 +530,9 @@ class Localuser {
const temp = JSON.parse(build);
build = "";
await this.handleEvent(temp);
if (temp.op === 0 && temp.t === "READY") {
console.log("in here?");
returny();
}
} catch {}
@@ -662,6 +664,7 @@ class Localuser {
if (this.swapped) return;
loaddesc.textContent = I18n.retrying();
this.initwebsocket().then(async () => {
console.log("FINE ME");
this.loaduser();
await this.init();
const loading = document.getElementById("loading") as HTMLElement;
@@ -675,7 +678,9 @@ class Localuser {
);
} else loaddesc.textContent = I18n.unableToConnect();
});
console.log("here?");
await promise;
console.warn("huh");
}
interNonceMap = new Map<string, Message>();
registerInterNonce(nonce: string, thing: Message) {
@@ -2860,6 +2865,14 @@ class Localuser {
},
{initState: !this.perminfo.user.disableColors},
);
accessibility.addCheckboxInput(
I18n.accessibility.gradientColors(),
(t) => {
console.log(t);
this.perminfo.user.gradientColors = t;
},
{initState: this.perminfo.user.gradientColors},
);
accessibility.addCheckboxInput(
I18n.channel.allowIcons(),
(t) => {
+4 -2
View File
@@ -28,6 +28,7 @@ class Role extends SnowFlake {
};
constructor(json: rolesjson, owner: Guild) {
super(json.id);
this.headers = owner.headers;
this.info = owner.info;
for (const thing of Object.keys(json)) {
@@ -36,9 +37,9 @@ class Role extends SnowFlake {
}
(this as any)[thing] = (json as any)[thing];
}
this.roleLoad();
this.permissions = new Permissions(json.permissions);
this.owner = owner;
this.roleLoad();
}
getIcon(): HTMLElement | void {
const hover = new Hover(this.name);
@@ -57,10 +58,11 @@ class Role extends SnowFlake {
}
}
getColorStyle(short = false) {
const grad = this.localuser.perminfo?.user?.gradientColors as boolean;
const [len1, len2, len3] = short
? (["", "", ""] as const)
: (["30px", "60px", "90px"] as const);
if (this.colors) {
if (this.colors && !grad) {
const prim = this.getColor();
if (this.colors.secondary_color) {
const second = Role.numberToColor(this.colors.secondary_color);
+2 -1
View File
@@ -55,7 +55,8 @@
"name": "Accessibility",
"playGif": "Play gifs on:",
"playIcon": "Play animated icons on:",
"roleColors": "Disable role colors"
"roleColors": "Disable role colors",
"gradientColors":"Disable gradient colors"
},
"accountNotStart": "Account unable to start",
"add": "Add",