1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Show unrated puzzles different, dark theme adjustments

This commit is contained in:
tobspr
2021-08-26 09:11:56 +02:00
parent f3b82961dc
commit abff623194
3 changed files with 17 additions and 5 deletions

View File

@@ -357,10 +357,7 @@ export class PuzzleMenuState extends TextualGameState {
stats.classList.add("stats");
elem.appendChild(stats);
if (
puzzle.downloads > 3 &&
!["official", "easy", "medium", "hard"].includes(this.activeCategory)
) {
if (!["official", "easy", "medium", "hard"].includes(this.activeCategory)) {
const difficulty = document.createElement("div");
difficulty.classList.add("difficulty");
@@ -371,7 +368,10 @@ export class PuzzleMenuState extends TextualGameState {
difficulty.innerText = completionPercentage + "%";
stats.appendChild(difficulty);
if (puzzle.difficulty < 0.2) {
if (puzzle.difficulty === null) {
difficulty.classList.add("stage--unknown");
difficulty.innerText = T.puzzleMenu.difficulties.unknown;
} else if (puzzle.difficulty < 0.2) {
difficulty.classList.add("stage--easy");
difficulty.innerText = T.puzzleMenu.difficulties.easy;
} else if (puzzle.difficulty > 0.6) {