Commit Graph

16 Commits

Author SHA1 Message Date
beo3000 745da9e678 mod wording 2026-01-06 19:26:27 +01:00
beo3000 53a68c91d0 fix select members
Zusammenfassung der Änderungen:

  1. FluxorComponent als Basisklasse - Dialog reagiert nun auf PersonState-Änderungen
  2. Redundante DB-Anfragen vermeiden - LoadPersonsAction wird nur dispatched wenn Persons.Count == 0 && !IsLoading
  3. Pre-Selection bei asynchronem Laden - In OnAfterRender wird die Member-Vorauswahl aktualisiert sobald Persons verfügbar sind

  Ursache des Problems:
  - Der Dialog dispatched LoadPersonsAction bei jedem Öffnen
  - DayDetails.razor dispatched gleichzeitig mehrere Actions (LoadAvailablePersonsAction, etc.)
  - Viele parallele DB-Requests erschöpfen den Connection Pool
2026-01-05 15:47:43 +01:00
beo3000 587b92409d added ParticipantsMode.FreeToChoose:
Neue Datei erstellt:
  - src/Koogle.Web/Components/Game/PlayerSelectorDialog.razor - Dialog zur manuellen Spielerauswahl

  Geändert:
  - src/Koogle.Web/Components/Pages/Days/DayDetails.razor:863-891 - ShowPlayerSelector implementiert

  Funktionsweise:
  1. Bei ParticipantsMode.FreeToChoose zeigt GameInputPanel.razor:23-32 den Button "Spieler wechseln"
  2. Der neue Dialog listet alle Spieler aus Participants.PlayerIds
  3. Bei DeathBox werden ausgeschiedene Spieler standardmäßig ausgeblendet (Toggle verfügbar)
  4. Bei Spielerauswahl wird SetCurrentPlayerAction dispatcht

  Features:
  - Aktueller Spieler ist markiert (grün)
  - Ausgeschiedene Spieler sind durchgestrichen mit "Ausgeschieden"-Badge
  - Optional können ausgeschiedene Spieler eingeblendet werden (falls nötig)
  - Funktioniert mit allen Game-Typen (DeathBox, Shit, Training)
2026-01-03 10:28:13 +01:00
beo3000 752523fe78 added gif-Feature:
Summary of Changes:

  Phase 1-3 (Domain/Infrastructure/Application):
  - ThrowEventType enum with Strike, Circle, Bell, Gutter flags
  - ClubGif, ClubGifRating, GifSubmissionToken entities
  - EF configurations with proper indexes
  - ClubGifRepository with weighted random selection
  - MediaStorageService for file storage (wwwroot/club-media/{LoginName}/gifs/)
  - ClubGifService with rating system and auto-disable at -5 threshold

  Phase 4-5 (Admin UI & Playback):
  - Admin page at /club/{ClubId}/admin/gifs with Upload, Import, Edit, Token management
  - QR code generation for submission tokens
  - GifPlayer component with overlay, rating buttons, and dismiss
  - Fluxor state management (GifState, actions, reducers, effects)

  Phase 6 (Anonymous Submission):
  - Public page at /gif/submit/{Token} with EmptyLayout
  - Token validation and file upload

  Phase 7 (Game Integration + Migration):
  - Database migration AddClubGifFeature applied
  - GameEffects.TriggerGifForEventsAsync triggers GIFs on special throws
  - SignalR broadcast via BroadcastGifTriggeredAsync to all clients
  - DayDetails.razor includes GifPlayer and handles SignalR GIF events

  Key Features:

  - GIFs play on Strike (alle 9), Circle (Kranz), Bell (Glocke), Gutter (Rinne)
  - Weighted random selection based on ratings
  - Real-time sync across all connected clients via SignalR
  - Thumbs up/down rating with auto-disable at -5
  - Max file size: 20MB, Video duration: 15s
  - Supports GIF, MP4, WebM formats
2025-12-30 14:57:06 +01:00
beo3000 0e4e1530ed added LoginName for Clubs 2025-12-30 11:57:01 +01:00
beo3000 6f419b3373 SinalR Sync part 2:
DayDetails.razor

  1. GameHubService injiziert (Zeile 26)
  2. IAsyncDisposable implementiert statt IDisposable
  3. SignalR-Events abonniert:
    - OnGameStateUpdated → aktualisiert lokalen State via RemoteGameStateUpdatedAction
    - OnThrowRecorded → zeigt Snackbar-Benachrichtigung
    - OnGameStarted → lädt aktives Spiel neu
    - OnGameEnded → lädt abgeschlossene Spiele neu
  4. Hub-Verbindung initialisiert in OnAfterRenderAsync:
    - StartAsync() - verbindet zum Hub
    - JoinDayAsync(DayId) - tritt der Day-Gruppe bei
    - JoinGameAsync() - tritt der Game-Gruppe bei (wenn aktiv)
  5. Automatisches Join/Leave bei Spielwechsel via OnGameStateChanged
  6. Cleanup in DisposeAsync:
    - Unsubscribe von Events
    - LeaveGameAsync/LeaveDayAsync aufrufen
    - Hub-Verbindung disposen

  GameEffects.cs

  BroadcastThrowAsync hinzugefügt (Zeile 451-458) - broadcast Wurf sofort an andere Clients

  GameActions.cs / GameReducers.cs

  RemoteGameStateUpdatedAction und Reducer hinzugefügt für Remote-State-Updates
2025-12-29 17:13:17 +01:00
beo3000 1fbf4763d9 add dayStatisticChart 2025-12-29 16:11:22 +01:00
beo3000 c33a6f9d91 add ThrowTimer 2025-12-27 14:18:45 +01:00
beo3000 65df43ed23 fix load game OnInitialized and OnParametersSet 2025-12-27 10:59:59 +01:00
beo3000 23a1008a31 Complete phase H7: DayDetails Tabs Integration
- GameBoardPanel: Dynamic board component rendering
- CompletedGamesList: Shows game history for day
- DayDetails: 3 tabs (Details/Eingabe/Tafel) + Start/End Game buttons

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 08:33:34 +01:00
beo3000 bef4309e0e mod: multiselect participants 2025-12-25 22:00:06 +01:00
beo3000 1e9cf520f6 mod Expense-Table, show time and chg order 2025-12-25 21:48:39 +01:00
beo3000 8d2222de8f select Person and Quick-Assign expenses 2025-12-25 21:36:43 +01:00
beo3000 1a7e596abd mod Sie-Form -> Du-Form 2025-12-25 18:44:26 +01:00
beo3000 343ad931d1 Add PersonExpense management to DayDetails (E4)
- Extend DayState with SelectedDayExpenses, AvailableExpenses
- Add Fluxor actions for load/create/update/delete expenses
- Add reducers + effects for PersonExpense operations
- Create AddPersonExpenseDialog with inverse expense support
- Update DayDetails with expense table, summary, status toggle

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 15:14:34 +01:00
beo3000 26378afdbd Add Day Details Page (E3)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 13:54:39 +01:00