feat: add ranking and hall of fame features

- Implemented new routes for Best General and Hall of Fame views in the frontend.
- Created BestGeneralView and HallOfFameView components to display rankings based on game data.
- Added new database models for RankData and HallOfFame to store ranking information.
- Introduced ranking types and hall of fame types in common types for better type safety.
- Developed ranking router to handle fetching of best general and hall of fame data.
- Updated database schema with migrations to include new tables for rank data and hall of fame.
- Enhanced the main view with links to the new ranking features.
This commit is contained in:
2026-01-29 18:18:35 +00:00
parent 19c359d0b2
commit 9fff671c2f
16 changed files with 1217 additions and 2 deletions
+1
View File
@@ -15,3 +15,4 @@ export * from './tournament/autoStart.js';
export * from './turnDaemon/types.js';
export * from './realtime/keys.js';
export * from './realtime/types.js';
export * from './ranking/types.js';
+74
View File
@@ -0,0 +1,74 @@
export const RANK_DATA_TYPES = [
'experience',
'dedication',
'firenum',
'warnum',
'killnum',
'deathnum',
'occupied',
'killcrew',
'deathcrew',
'killcrew_person',
'deathcrew_person',
'dex1',
'dex2',
'dex3',
'dex4',
'dex5',
'ttw',
'ttd',
'ttl',
'ttg',
'ttp',
'tlw',
'tld',
'tll',
'tlg',
'tlp',
'tsw',
'tsd',
'tsl',
'tsg',
'tsp',
'tiw',
'tid',
'til',
'tig',
'tip',
'betwin',
'betgold',
'betwingold',
'inherit_earned',
'inherit_spent',
] as const;
export type RankDataType = (typeof RANK_DATA_TYPES)[number];
export const HALL_OF_FAME_TYPES = [
'experience',
'dedication',
'firenum',
'warnum',
'killnum',
'winrate',
'occupied',
'killcrew',
'killrate',
'killcrew_person',
'killrate_person',
'dex1',
'dex2',
'dex3',
'dex4',
'dex5',
'ttrate',
'tlrate',
'tsrate',
'tirate',
'betgold',
'betwin',
'betwingold',
'betrate',
] as const;
export type HallOfFameType = (typeof HALL_OF_FAME_TYPES)[number];