- JWT-Authentifizierung prüft nun, ob User aktiv und existent ist - Session-Validierung beim App-Start via ValidateSessionAsync - Ungültige Sessions werden entfernt, SignalR-Verbindung getrennt - ApiService und IApiService um ValidateSessionAsync erweitert - LoginViewModel nutzt Session-Check und behandelt SignalR-Fehler - UI für eigene Phrasen auf <Border> mit Stil-Anpassung umgestellt
53 lines
3.0 KiB
XML
53 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:views="clr-namespace:SlipItIn.Views"
|
|
x:Class="SlipItIn.Views.GameBoardPage"
|
|
Title="Game Board">
|
|
<Grid>
|
|
<ScrollView>
|
|
<VerticalStackLayout Padding="24" Spacing="12">
|
|
<Label Text="Spielbrett" FontSize="24" FontAttributes="Bold" />
|
|
<Label Text="{Binding CurrentRound, StringFormat='Runde: {0}'}" />
|
|
<Label Text="{Binding RoundTimeRemaining, StringFormat='Verbleibende Zeit: {0}s'}" />
|
|
<Label Text="{Binding IsConnected, StringFormat='Verbindung: {0}'}" TextColor="Gray" />
|
|
<Label Text="{Binding SyncStatusText}" TextColor="DodgerBlue" IsVisible="{Binding IsSyncing}" />
|
|
<Label Text="{Binding PendingSyncActions, StringFormat='Offline-Aktionen: {0}'}" TextColor="Gray" />
|
|
|
|
<Button Text="Status aktualisieren" Command="{Binding RefreshStateCommand}" />
|
|
|
|
<Label Text="Meine Phrasen" FontAttributes="Bold" />
|
|
<CollectionView ItemsSource="{Binding MyCards}">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Margin="0,4" Padding="10" Stroke="LightGray" StrokeThickness="1" StrokeShape="RoundRectangle 10" BackgroundColor="White">
|
|
<VerticalStackLayout>
|
|
<Label Text="{Binding Text}" />
|
|
<HorizontalStackLayout>
|
|
<Button Text="Slip" Command="{Binding Source={RelativeSource AncestorType={x:Type ContentPage}}, Path=BindingContext.SubmitSlipCommand}" CommandParameter="{Binding .}" />
|
|
<Button Text="Beschuldigen" Command="{Binding Source={RelativeSource AncestorType={x:Type ContentPage}}, Path=BindingContext.ChallengeCardCommand}" CommandParameter="{Binding .}" />
|
|
</HorizontalStackLayout>
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
<Label Text="Andere Spieler" FontAttributes="Bold" />
|
|
<CollectionView ItemsSource="{Binding OtherPlayers}">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Label Text="{Binding Username}" />
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
<ActivityIndicator IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}" />
|
|
<Label Text="{Binding StatusMessage}" TextColor="OrangeRed" />
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
|
|
<views:ChallengeNotificationOverlay />
|
|
</Grid>
|
|
</ContentPage>
|