mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-06 01:24:04 +00:00
Minor adjustments, add "trending weekly"
This commit is contained in:
parent
8149ba875b
commit
39d6d3d565
@ -1,4 +1,3 @@
|
||||
import { globalConfig } from "../core/config";
|
||||
import { createLogger } from "../core/logging";
|
||||
import { DialogWithForm } from "../core/modal_dialog_elements";
|
||||
import { FormElementInput } from "../core/modal_dialog_forms";
|
||||
@ -11,8 +10,8 @@ import { Savegame } from "../savegame/savegame";
|
||||
import { T } from "../translations";
|
||||
|
||||
const navigation = {
|
||||
categories: ["official", "top-rated", "trending", "new"],
|
||||
difficulties: ["easy", "medium", "hard", "short"],
|
||||
categories: ["official", "top-rated", "trending", "trending-weekly", "new"],
|
||||
difficulties: ["easy", "medium", "hard"],
|
||||
account: ["mine", "completed"],
|
||||
};
|
||||
|
||||
@ -72,6 +71,7 @@ export class PuzzleMenuState extends TextualGameState {
|
||||
|
||||
<div class="categories subCategories">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -147,7 +147,10 @@ export class PuzzleMenuState extends TextualGameState {
|
||||
activeCategory.classList.remove("active");
|
||||
}
|
||||
|
||||
this.htmlElement.querySelector(`[data-root-category="${rootCategory}"]`).classList.add("active");
|
||||
const newActiveCategory = this.htmlElement.querySelector(`[data-root-category="${rootCategory}"]`);
|
||||
if (newActiveCategory) {
|
||||
newActiveCategory.classList.add("active");
|
||||
}
|
||||
|
||||
// Rerender buttons
|
||||
|
||||
@ -206,7 +209,7 @@ export class PuzzleMenuState extends TextualGameState {
|
||||
elem.appendChild(stats);
|
||||
|
||||
if (
|
||||
puzzle.downloads > 0 &&
|
||||
puzzle.downloads > 3 &&
|
||||
!["official", "easy", "medium", "hard"].includes(this.activeCategory)
|
||||
) {
|
||||
const difficulty = document.createElement("div");
|
||||
|
@ -141,16 +141,17 @@ puzzleMenu:
|
||||
new: New
|
||||
top-rated: Top Rated
|
||||
mine: Created
|
||||
short: Short
|
||||
easy: Easy
|
||||
medium: Medium
|
||||
hard: Hard
|
||||
completed: Completed
|
||||
official: Official
|
||||
trending: Trending today
|
||||
trending-weekly: Trending weekly
|
||||
categories: Categories
|
||||
difficulties: By Difficulty
|
||||
account: My Puzzles
|
||||
search: Search
|
||||
|
||||
difficulties:
|
||||
easy: Easy
|
||||
|
Loading…
Reference in New Issue
Block a user