From 604e751bf4266c5ddf41a340593610adabedcb0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Wed, 6 Dec 2023 10:34:43 -0600 Subject: [PATCH] feat: test tank filters --- scripts/buildAssets.ts | 1 + scripts/buildRatingsLeaderboard.ts | 1 - .../tools/tankopedia/components/Options.tsx | 33 +++++++++++++++++-- src/app/tools/tankopedia/page.tsx | 7 +++- src/core/blitzkrieg/definitions/tanks.ts | 3 +- src/stores/tankopedia.ts | 3 ++ 6 files changed, 43 insertions(+), 5 deletions(-) diff --git a/scripts/buildAssets.ts b/scripts/buildAssets.ts index 4cafcf637..0d960f3f8 100644 --- a/scripts/buildAssets.ts +++ b/scripts/buildAssets.ts @@ -112,6 +112,7 @@ if (allTargets || targets?.includes('tankDefinitions')) { } tankDefinitions[id] = { + id, name, name_short, nation, diff --git a/scripts/buildRatingsLeaderboard.ts b/scripts/buildRatingsLeaderboard.ts index dbe09a0d7..64d00a244 100644 --- a/scripts/buildRatingsLeaderboard.ts +++ b/scripts/buildRatingsLeaderboard.ts @@ -126,7 +126,6 @@ if (publish) { console.log(`Publishing to season ${info.current_season}...`); commitMultipleFiles( - octokit, 'tresabhi', 'blitzkrieg-assets', 'main', diff --git a/src/app/tools/tankopedia/components/Options.tsx b/src/app/tools/tankopedia/components/Options.tsx index 0b03484d4..4cd4d5690 100644 --- a/src/app/tools/tankopedia/components/Options.tsx +++ b/src/app/tools/tankopedia/components/Options.tsx @@ -19,6 +19,7 @@ import { import mutateTankopedia, { TankopediaSortBy, TankopediaSortDirection, + TankopediaTestTankDisplay, useTankopedia, } from '../../../../stores/tankopedia'; @@ -27,8 +28,8 @@ export function Options() { const tankopediaState = useTankopedia(); return ( - - + + + + + + mutateTankopedia((draft) => { + draft.filters.test = value as TankopediaTestTankDisplay; + }) + } + > + + Include + + + Exclude + + Only + + + + {[...TIERS].reverse().map((tier, index) => (