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>
101 lines
1.9 KiB
YAML
101 lines
1.9 KiB
YAML
pipeline:
|
|
install:
|
|
image: node:20
|
|
commands:
|
|
- npm ci
|
|
pull: true
|
|
|
|
lint:
|
|
image: node:20
|
|
commands:
|
|
- npm run lint
|
|
depends_on:
|
|
- install
|
|
pull: true
|
|
|
|
type-check:
|
|
image: node:20
|
|
commands:
|
|
- npm run check
|
|
depends_on:
|
|
- install
|
|
pull: true
|
|
|
|
test:
|
|
image: node:20
|
|
commands:
|
|
- npm run test
|
|
depends_on:
|
|
- install
|
|
pull: true
|
|
|
|
build:
|
|
image: node:20
|
|
commands:
|
|
- npm run build
|
|
environment:
|
|
- VITE_API_BASE_URL=https://api.csgow.tf
|
|
secrets:
|
|
- vite_plausible_domain
|
|
- vite_sentry_dsn
|
|
depends_on:
|
|
- lint
|
|
- type-check
|
|
- test
|
|
pull: true
|
|
|
|
# E2E tests (optional - can be resource intensive)
|
|
# test-e2e:
|
|
# image: mcr.microsoft.com/playwright:v1.40.0-jammy
|
|
# commands:
|
|
# - npm run test:e2e
|
|
# depends_on:
|
|
# - build
|
|
|
|
deploy:
|
|
image: cschlosser/drone-ftps
|
|
settings:
|
|
hostname:
|
|
from_secret: ftp_host
|
|
src_dir: '/build/'
|
|
clean_dir: true
|
|
secrets: [ftp_username, ftp_password]
|
|
when:
|
|
branch: master
|
|
event: [push, tag]
|
|
status: success
|
|
|
|
deploy-dev:
|
|
image: cschlosser/drone-ftps
|
|
settings:
|
|
hostname:
|
|
from_secret: ftp_host
|
|
src_dir: '/build/'
|
|
clean_dir: true
|
|
secrets:
|
|
- source: ftp_username_dev
|
|
target: ftp_username
|
|
- source: ftp_password_dev
|
|
target: ftp_password
|
|
when:
|
|
branch: dev
|
|
event: [push, tag]
|
|
status: success
|
|
|
|
deploy-cs2:
|
|
image: cschlosser/drone-ftps
|
|
settings:
|
|
hostname:
|
|
from_secret: ftp_host_cs2
|
|
src_dir: '/build/'
|
|
clean_dir: true
|
|
secrets:
|
|
- source: ftp_username_cs2
|
|
target: ftp_username
|
|
- source: ftp_password_cs2
|
|
target: ftp_password
|
|
when:
|
|
branch: cs2-port
|
|
event: [push]
|
|
status: success
|