Files
csgowtf/static/images/weapons/taser.svg
vikingowl 8f3b652740 feat: Implement Phase 1 critical features and fix API integration
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>
2025-11-12 19:31:18 +01:00

39 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="41.5px"
height="32px" viewBox="0 0 41.5 32" enable-background="new 0 0 41.5 32" xml:space="preserve">
<g id="Selected_Items">
<g>
<g id="Selected_Items_62_">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M18.693,11.759h-3.017c-0.397,0-0.596,0.199-0.596,0.595v1.702
c0,0.425,0.199,0.636,0.596,0.636h1.615c0.567,0,1.047-0.169,1.445-0.509c0.368-0.34,0.551-0.694,0.551-1.063v-0.468
c0-0.199-0.056-0.382-0.169-0.552C19.005,11.873,18.863,11.759,18.693,11.759z M40.97,5.127c0.168,0.03,0.269,0.071,0.298,0.128
c0,0.03-0.015,0.185-0.044,0.468l-0.806,5.868c-0.113,0.481-0.553,0.849-1.318,1.104l-2.934,0.808
c-0.538,0.142-0.835,0.212-0.892,0.212L30.469,13.8c-0.425,0-0.638,0.113-0.638,0.34v1.871c0,0.567-0.197,0.836-0.595,0.807
c-0.283-0.084-0.524-0.127-0.723-0.127h-6.631c-0.539,0.141-0.907,0.213-1.106,0.213c-0.114,0-0.212-0.113-0.299-0.342
l-0.041-0.382c-0.425,0.679-0.851,1.021-1.277,1.021h-4.208c-0.509,0-0.793,0.34-0.849,1.02c-0.03,0.085-0.201,0.439-0.512,1.062
c-0.311,0.625-0.522,1.163-0.638,1.617c-0.822,3.173-1.289,5.271-1.401,6.292c-0.058,0.765,0.013,1.913,0.211,3.443
c0,0.481-0.34,0.58-1.021,0.297c-0.312,0.227-0.721,0.282-1.231,0.171c-0.68-0.114-1.9-0.369-3.656-0.766
c-2.184-0.481-3.573-0.835-4.167-1.063c-0.68-0.256-1.091-0.652-1.233-1.19c-0.171-0.538-0.128-1.375,0.127-2.508
C0.809,24.5,1.292,22.5,2.03,19.582c0.706-2.806,1.09-4.322,1.147-4.549c0.169-0.369,0.311-0.708,0.424-1.02
c0.198-0.596,0.312-1.106,0.34-1.531c0.029-0.426-0.212-0.921-0.723-1.489c-0.084-0.056-0.467-0.396-1.148-1.02
C1.789,9.718,1.646,9.364,1.646,8.911V4.576c0-0.624,0.128-1.105,0.384-1.446C2.171,2.96,2.454,2.676,2.878,2.279
c0.425-0.339,0.708-0.567,0.851-0.68c0.113-0.056,0.793,0.044,2.041,0.298c0.169,0.029,0.297,0.1,0.382,0.212
c0.084,0.085,0.142,0.129,0.169,0.129c0.198-0.058,0.879,0.056,2.04,0.34c0.256,0.056,1.263,0.085,3.019,0.085
c1.021,0,1.615,0.085,1.786,0.254c0.142,0.141,0.212,0.312,0.212,0.509l0.298-0.127c0.226-0.084,0.426-0.127,0.595-0.127h7.907
c0.312,0,0.652,0.085,1.021,0.254c-0.057-0.112-0.071-0.254-0.043-0.425c0.029-0.198,0.269-0.338,0.722-0.424
c0.17-0.03,0.412,0.013,0.725,0.127l0.426-0.426c0.026-0.029,0.055-0.141,0.083-0.339c0-0.199,0.085-0.326,0.254-0.382
c0.625-0.228,1.077-0.256,1.361-0.085c0.17,0.085,0.61,0.254,1.317,0.509c0.68,0.257,1.12,0.398,1.319,0.426
c0.112,0,0.297-0.057,0.552-0.169c0.226-0.087,0.441-0.1,0.637-0.043c0.368,0.084,1.545,0.326,3.53,0.723
c0.282,0.113,0.636,0.312,1.061,0.595c0.113,0.058,0.354,0.071,0.724,0.043c0.368,0,0.61,0.014,0.723,0.042
c0.14,0.057,0.211,0.128,0.211,0.212c0,0.114,0.014,0.186,0.043,0.212c0.142,0.085,0.764,0.256,1.87,0.511
c0.169,0.056,0.325,0.155,0.468,0.296c0.142,0.114,0.239,0.172,0.297,0.172s0.157-0.03,0.298-0.085
c0.113-0.086,0.227-0.113,0.339-0.086L40.97,5.127z"/>
</g>
</g>
</g>
<g id="guides">
</g>
</svg>