added gif test-runs

This commit is contained in:
beo3000 2026-01-11 12:39:10 +01:00
parent 8c18d634c8
commit 99b9994c32
1 changed files with 27 additions and 0 deletions

View File

@ -4,6 +4,8 @@
@using Koogle.Application.DTOs
@using Koogle.Application.Interfaces
@using Koogle.Domain.Enums
@using Koogle.Web.Components.Game
@using Koogle.Web.Store.GifState
@using Microsoft.AspNetCore.Authorization
@inject IClubGifService GifService
@ -11,9 +13,13 @@
@inject ISnackbar Snackbar
@inject IDialogService DialogService
@inject IClubTerminologyService Term
@inject IDispatcher Dispatcher
<PageTitle>GIF-Verwaltung</PageTitle>
<!-- GIF Player Overlay -->
<GifPlayer ShowRating="true" />
<MudText Typo="Typo.h4" Class="mb-2">GIF-Verwaltung</MudText>
<MudText Typo="Typo.body2" Color="Color.Secondary" Class="mb-4">
GIFs und Videos fuer Wurf-Ereignisse verwalten
@ -104,6 +110,12 @@
</MudTd>
<MudTd>
<MudStack Row="true" Spacing="1">
<MudTooltip Text="Gif testen">
<MudIconButton Icon="@Icons.Material.Filled.RunCircle"
Size="Size.Small"
Color="Color.Success"
OnClick="@(() => TestGif(context))" />
</MudTooltip>
<MudTooltip Text="Bearbeiten">
<MudIconButton Icon="@Icons.Material.Filled.Edit"
Size="Size.Small"
@ -573,4 +585,19 @@
public void CopyTo(Stream target) => _stream.CopyTo(target);
public async Task CopyToAsync(Stream target, CancellationToken ct = default) => await _stream.CopyToAsync(target, ct);
}
private async Task TestGif(ClubGifDto gifdto)
{
var ev = gifdto.AssignedEvents;
var p = new GifPlaybackDto
{
Id = gifdto.Id,
Url = gifdto.Url,
ContentType = gifdto.ContentType,
Name = gifdto.Name,
EventType = ev
};
Dispatcher.Dispatch(new GifPlaybackStartedAction(p, ev));
}
}