mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: shell filters
This commit is contained in:
1 parent
92399de5e2
commit
df0dc4f118
5 files changed
+437
-250
No files matched your search
@@ -1,4 +1,9 @@
|
||||
import type { GunDefinition, TankClass, TankType } from '@blitzkit/core';
|
||||
import type {
|
||||
GunDefinition,
|
||||
ShellType,
|
||||
TankClass,
|
||||
TankType,
|
||||
} from '@blitzkit/core';
|
||||
import { map } from 'nanostores';
|
||||
|
||||
export type CaseType<T> = T extends {
|
||||
@@ -16,6 +21,7 @@ export interface TankFilters {
|
||||
search?: string;
|
||||
searching: boolean;
|
||||
gunType: CaseType<GunDefinition>[];
|
||||
shells: [ShellType | null, ShellType | null, ShellType | null];
|
||||
}
|
||||
|
||||
export const initialTankFilters: TankFilters = {
|
||||
@@ -27,6 +33,7 @@ export const initialTankFilters: TankFilters = {
|
||||
search: undefined,
|
||||
searching: false,
|
||||
gunType: [],
|
||||
shells: [null, null, null],
|
||||
};
|
||||
|
||||
export const $tankFilters = map<TankFilters>(initialTankFilters);
|
||||
Reference in new issue
Block a user