BIG heap of bugfixes. Deselecting tools, profile colour picker, player

name colour contrast, mutation pricing (not really a bug, but still an
issue).

Signed-off-by: Sarahtonin <[email protected]>
This commit is contained in:
sarah committed 2026-08-31 16:43:13 +02:00
1 parent a2e95d6712
commit 4d92455bf3
6 files changed
+174 -55

No files matched your search

+33 -15
View File
@@ -56,8 +56,10 @@ async function StartProfile() {
ColourInput.addEventListener(
"input",
() => {
ColourPreview.style.color =
ColourInput.value;
ApplyPlayerColour(
ColourPreview,
ColourInput.value
);
}
);
@@ -115,15 +117,24 @@ async function RenderProfilePlayer() {
}
if (
Profile.Colour !== null
) {
ColourInput.value =
Profile.Colour;
const ProfileColour =
IsValidPlayerColour(
Profile.Colour
)
? Profile.Colour
: DefaultPlayerColour;
ColourPreview.style.color =
Profile.Colour;
}
ColourInput.value =
ProfileColour;
ApplyPlayerColour(
ColourPreview,
IsValidPlayerColour(
Profile.Colour
)
? Profile.Colour
: null
);
UsernameMessage.textContent =
@@ -244,8 +255,14 @@ async function SubmitProfileColour(
}
Preview.style.color =
Result.Colour;
ApplyPlayerColour(
Preview,
IsValidPlayerColour(
Result.Colour
)
? Result.Colour
: Input.value
);
Message.textContent =
"Colour saved.";
@@ -294,10 +311,11 @@ async function ResetProfileColour() {
Input.value =
"#cdd6f4";
DefaultPlayerColour;
Preview.style.removeProperty(
"color"
ApplyPlayerColour(
Preview,
null
);
Message.textContent =