Color picker on member page
The color picker on the member page now shows the currently selected user color on load.
This commit is contained in:
parent
58590a56ea
commit
76caa43276
1 changed files with 3 additions and 7 deletions
|
@ -290,12 +290,8 @@ class Member extends SnowFlake {
|
||||||
hypomember.bio = _;
|
hypomember.bio = _;
|
||||||
regen();
|
regen();
|
||||||
});
|
});
|
||||||
return; //Returns early to stop errors
|
color = (this.accent_color ? "#" + this.accent_color.toString(16) : "transparent") as string;
|
||||||
if (this.accent_color) {
|
|
||||||
color = "#" + this.accent_color.toString(16);
|
|
||||||
} else {
|
|
||||||
color = "transparent";
|
|
||||||
}
|
|
||||||
const colorPicker = settingsLeft.addColorInput(
|
const colorPicker = settingsLeft.addColorInput(
|
||||||
I18n.getTranslation("profileColor"),
|
I18n.getTranslation("profileColor"),
|
||||||
(_) => {},
|
(_) => {},
|
||||||
|
@ -304,7 +300,7 @@ class Member extends SnowFlake {
|
||||||
colorPicker.watchForChange((_) => {
|
colorPicker.watchForChange((_) => {
|
||||||
console.log();
|
console.log();
|
||||||
color = _;
|
color = _;
|
||||||
hypomember.accent_color = Number.parseInt("0x" + _.substr(1), 16);
|
hypomember.accent_color = Number.parseInt("0x" + _.substr(1, 16));
|
||||||
changed = true;
|
changed = true;
|
||||||
regen();
|
regen();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue