website refactor

This commit is contained in:
2026-01-14 10:51:05 +01:00
parent 4522d41aef
commit 0d89ad027e
291 changed files with 6887 additions and 3685 deletions

View File

@@ -0,0 +1,9 @@
/**
* AvatarViewData
*
* ViewData for avatar media rendering.
*/
export interface AvatarViewData {
buffer: ArrayBuffer;
contentType: string;
}

View File

@@ -0,0 +1,9 @@
/**
* CategoryIconViewData
*
* ViewData for category icon media rendering.
*/
export interface CategoryIconViewData {
buffer: ArrayBuffer;
contentType: string;
}

View File

@@ -0,0 +1,9 @@
/**
* LeagueCoverViewData
*
* ViewData for league cover media rendering.
*/
export interface LeagueCoverViewData {
buffer: ArrayBuffer;
contentType: string;
}

View File

@@ -0,0 +1,9 @@
/**
* LeagueLogoViewData
*
* ViewData for league logo media rendering.
*/
export interface LeagueLogoViewData {
buffer: ArrayBuffer;
contentType: string;
}

View File

@@ -0,0 +1,30 @@
/**
* LeagueRosterAdminViewData - Pure ViewData for RosterAdminPage
* Contains only raw serializable data, no methods or computed properties
*/
export interface RosterMemberData {
driverId: string;
driver: {
id: string;
name: string;
};
role: string;
joinedAt: string;
}
export interface JoinRequestData {
id: string;
driver: {
id: string;
name: string;
};
requestedAt: string;
message?: string;
}
export interface LeagueRosterAdminViewData {
leagueId: string;
members: RosterMemberData[];
joinRequests: JoinRequestData[];
}

View File

@@ -0,0 +1,23 @@
/**
* LeagueScheduleViewData - Pure ViewData for LeagueScheduleTemplate
* Contains only raw serializable data, no methods or computed properties
*/
export interface ScheduleRaceData {
id: string;
name: string;
track: string;
car: string;
scheduledAt: string;
status: string;
}
export interface LeagueScheduleViewData {
leagueId: string;
races: ScheduleRaceData[];
seasons: Array<{
seasonId: string;
name: string;
status: string;
}>;
}

View File

@@ -0,0 +1,9 @@
/**
* SponsorLogoViewData
*
* ViewData for sponsor logo media rendering.
*/
export interface SponsorLogoViewData {
buffer: ArrayBuffer;
contentType: string;
}

View File

@@ -0,0 +1,9 @@
/**
* TeamLogoViewData
*
* ViewData for team logo media rendering.
*/
export interface TeamLogoViewData {
buffer: ArrayBuffer;
contentType: string;
}

View File

@@ -0,0 +1,9 @@
/**
* TrackImageViewData
*
* ViewData for track image media rendering.
*/
export interface TrackImageViewData {
buffer: ArrayBuffer;
contentType: string;
}

View File

@@ -0,0 +1,58 @@
/**
* Race Detail View Data
*
* ViewData for the race detail page template.
* JSON-serializable, template-ready data structure.
*/
export interface RaceDetailEntry {
id: string;
name: string;
avatarUrl: string;
country: string;
rating?: number;
isCurrentUser: boolean;
}
export interface RaceDetailUserResult {
position: number;
startPosition: number;
positionChange: number;
incidents: number;
isClean: boolean;
isPodium: boolean;
ratingChange?: number;
}
export interface RaceDetailLeague {
id: string;
name: string;
description?: string;
settings: {
maxDrivers: number;
qualifyingFormat: string;
};
}
export interface RaceDetailRace {
id: string;
track: string;
car: string;
scheduledAt: string;
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
sessionType: string;
}
export interface RaceDetailRegistration {
isUserRegistered: boolean;
canRegister: boolean;
}
export interface RaceDetailViewData {
race: RaceDetailRace;
league?: RaceDetailLeague;
entryList: RaceDetailEntry[];
registration: RaceDetailRegistration;
userResult?: RaceDetailUserResult;
canReopenRace: boolean;
}

View File

@@ -0,0 +1,42 @@
/**
* Race Results View Data
*
* ViewData for the race results page template.
* JSON-serializable, template-ready data structure.
*/
export interface RaceResultsResult {
position: number;
driverId: string;
driverName: string;
driverAvatar: string;
country: string;
car: string;
laps: number;
time: string;
fastestLap: string;
points: number;
incidents: number;
isCurrentUser: boolean;
}
export interface RaceResultsPenalty {
driverId: string;
driverName: string;
type: 'time_penalty' | 'grid_penalty' | 'points_deduction' | 'disqualification' | 'warning' | 'license_points';
value: number;
reason: string;
notes?: string;
}
export interface RaceResultsViewData {
raceTrack?: string;
raceScheduledAt?: string;
totalDrivers?: number;
leagueName?: string;
raceSOF: number | null;
results: RaceResultsResult[];
penalties: RaceResultsPenalty[];
pointsSystem: Record<string, number>;
fastestLapTime: number;
}

View File

@@ -0,0 +1,52 @@
/**
* Race Stewarding View Data
*
* ViewData for the race stewarding page template.
* JSON-serializable, template-ready data structure.
*/
export interface Protest {
id: string;
protestingDriverId: string;
accusedDriverId: string;
incident: {
lap: number;
description: string;
};
filedAt: string;
status: string;
proofVideoUrl?: string;
decisionNotes?: string;
}
export interface Penalty {
id: string;
driverId: string;
type: string;
value: number;
reason: string;
notes?: string;
}
export interface Driver {
id: string;
name: string;
}
export interface RaceStewardingViewData {
race?: {
id: string;
track: string;
scheduledAt: string;
} | null;
league?: {
id: string;
} | null;
pendingProtests: Protest[];
resolvedProtests: Protest[];
penalties: Penalty[];
driverMap: Record<string, Driver>;
pendingCount: number;
resolvedCount: number;
penaltiesCount: number;
}

View File

@@ -0,0 +1,22 @@
/**
* Races All View Data
*
* ViewData for the all races page template.
* JSON-serializable, template-ready data structure.
*/
export interface RacesAllRace {
id: string;
track: string;
car: string;
scheduledAt: string;
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
sessionType: string;
leagueId?: string;
leagueName?: string;
strengthOfField?: number;
}
export interface RacesAllViewData {
races: RacesAllRace[];
}

View File

@@ -0,0 +1,29 @@
/**
* Races View Data
*
* ViewData for the main races page template.
* JSON-serializable, template-ready data structure.
*/
export interface RacesRace {
id: string;
track: string;
car: string;
scheduledAt: string;
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
sessionType: string;
leagueId?: string;
leagueName?: string;
strengthOfField?: number;
isUpcoming: boolean;
isLive: boolean;
isPast: boolean;
}
export interface RacesViewData {
races: RacesRace[];
totalCount: number;
scheduledRaces: RacesRace[];
runningRaces: RacesRace[];
completedRaces: RacesRace[];
}