This commit completes the first phase of feature parity implementation and resolves all API integration issues to match the backend API format. ## API Integration Fixes - Remove all hardcoded default values from transformers (tick_rate, kast, player_count, steam_updated) - Update TypeScript types to make fields optional where backend doesn't guarantee them - Update Zod schemas to validate optional fields correctly - Fix mock data to match real API response format (plain arrays, not wrapped objects) - Update UI components to handle undefined values with proper fallbacks - Add comprehensive API documentation for Match and Player endpoints ## Phase 1 Features Implemented (3/6) ### 1. Player Tracking System ✅ - Created TrackPlayerModal.svelte with auth code input - Integrated track/untrack player API endpoints - Added UI for providing optional share code - Displays tracked status on player profiles - Full validation and error handling ### 2. Share Code Parsing ✅ - Created ShareCodeInput.svelte component - Added to matches page for easy match submission - Real-time validation of share code format - Parse status feedback with loading states - Auto-redirect to match page on success ### 3. VAC/Game Ban Status ✅ - Added VAC and game ban count/date fields to Player type - Display status badges on player profile pages - Show ban count and date when available - Visual indicators using DaisyUI badge components ## Component Improvements - Modal.svelte: Added Svelte 5 Snippet types, actions slot support - ThemeToggle.svelte: Removed deprecated svelte:component usage - Tooltip.svelte: Fixed type safety with Snippet type - All new components follow Svelte 5 runes pattern ($state, $derived, $bindable) ## Type Safety & Linting - Fixed all ESLint errors (any types → proper types) - Fixed form label accessibility issues - Replaced error: any with error: unknown + proper type guards - Added Snippet type imports where needed - Updated all catch blocks to use instanceof Error checks ## Static Assets - Migrated all files from public/ to static/ directory per SvelteKit best practices - Moved 200+ map icons, screenshots, and other assets - Updated all import paths to use /images/ (served from static/) ## Documentation - Created IMPLEMENTATION_STATUS.md tracking all 15 missing features - Updated API.md with optional field annotations - Created MATCHES_API.md with comprehensive endpoint documentation - Added inline comments marking optional vs required fields ## Testing - Updated mock fixtures to remove default values - Fixed mock handlers to return plain arrays like real API - Ensured all components handle undefined gracefully ## Remaining Phase 1 Tasks - [ ] Add VAC status column to match scoreboard - [ ] Create weapons statistics tab for matches - [ ] Implement recently visited players on home page 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
17 lines
1.4 KiB
XML
17 lines
1.4 KiB
XML
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="16" cy="16" r="14.5" stroke="white" stroke-width="3"/>
|
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.402 24.8867C21.6197 24.8867 25.8495 20.6569 25.8495 15.4392C25.8495 10.3548 21.8329 6.20841 16.7997 6V15.9918H7V16.3718C7.46833 21.1517 11.499 24.8867 16.402 24.8867Z" fill="white"/>
|
|
<rect x="16" y="2" width="1" height="3" fill="white"/>
|
|
<rect x="16" y="27" width="1" height="3" fill="white"/>
|
|
<rect x="30" y="16" width="1" height="3" transform="rotate(90 30 16)" fill="white"/>
|
|
<rect x="5" y="16" width="1" height="3" transform="rotate(90 5 16)" fill="white"/>
|
|
<rect x="27.616" y="22" width="1" height="2" transform="rotate(120 27.616 22)" fill="white"/>
|
|
<rect x="6.23206" y="10" width="1" height="2" transform="rotate(120 6.23206 10)" fill="white"/>
|
|
<rect x="9.40369" y="27.9707" width="1" height="2" transform="rotate(-150 9.40369 27.9707)" fill="white"/>
|
|
<rect x="22.866" y="7.23206" width="1" height="2" transform="rotate(-150 22.866 7.23206)" fill="white"/>
|
|
<rect x="4.37738" y="23.2207" width="1" height="2" transform="rotate(-120 4.37738 23.2207)" fill="white"/>
|
|
<rect x="26.5" y="11.866" width="1" height="2" transform="rotate(-120 26.5 11.866)" fill="white"/>
|
|
<rect x="8.75" y="4.83975" width="1" height="2" transform="rotate(-30 8.75 4.83975)" fill="white"/>
|
|
<rect x="22" y="25.5" width="1" height="2" transform="rotate(-30 22 25.5)" fill="white"/>
|
|
</svg>
|