Files
LehrerApp/LehrerApp.Desktop/Views/Groups/AiResponseRescueDialog.axaml
T
admin fedfceb81d
CI / build-and-test (push) Canceled after 0s
KI-Backend: Antwortretten - Funktion
2026-09-04 12:10:42 +02:00

51 lines
2.8 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
x:Class="LehrerApp.Desktop.Views.Groups.AiResponseRescueDialog"
x:DataType="vm:AiResponseRescueDialogViewModel"
Title="KI-Antwort retten"
Width="820" Height="720" MinWidth="620" MinHeight="520"
CanResize="True" WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="Auto,*,Auto,Auto,Auto" Margin="24">
<StackPanel Grid.Row="0" Spacing="6" Margin="0,0,0,12">
<TextBlock Text="KI-Antwort retten" Classes="dialogtitle"/>
<TextBlock Text="Die vollständige Antwort steht unten. Markiere ein vollständiges JSON-Objekt, ein Array von Stunden oder die normale Antwort mit dem Feld „lessons“. Du kannst den Text vorher auch korrigieren. Ohne Markierung wird der gesamte Text geprüft."
TextWrapping="Wrap" FontSize="12" Opacity="0.75"/>
</StackPanel>
<TextBox x:Name="ResponseTextBox" Grid.Row="1" Text="{Binding ResponseText}"
AcceptsReturn="True" AcceptsTab="True" TextWrapping="NoWrap"
FontFamily="Monospace" FontSize="12"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"/>
<Grid Grid.Row="2" ColumnDefinitions="Auto,*" Margin="0,12,0,0">
<Button Grid.Column="0" Content="Markierung prüfen" Click="OnValidateSelection"/>
<TextBlock Grid.Column="1" Text="{Binding ParseMessage}" Margin="12,0,0,0"
VerticalAlignment="Center" TextWrapping="Wrap" FontSize="12"/>
</Grid>
<Grid Grid.Row="3" ColumnDefinitions="*,12,*" Margin="0,14,0,0">
<StackPanel Grid.Column="0" Spacing="5">
<TextBlock Text="Erkannte Stunde" FontSize="12" Opacity="0.7"/>
<ComboBox ItemsSource="{Binding ParsedLessons}" SelectedItem="{Binding SelectedParsedLesson}"
DisplayMemberBinding="{Binding Label}" IsEnabled="{Binding HasParsedLesson}"/>
</StackPanel>
<StackPanel Grid.Column="2" Spacing="5">
<TextBlock Text="Vorhandene Zielstunde" FontSize="12" Opacity="0.7"/>
<ComboBox ItemsSource="{Binding ExistingLessons}" SelectedItem="{Binding SelectedTarget}"
DisplayMemberBinding="{Binding Label}"/>
</StackPanel>
</Grid>
<Grid Grid.Row="4" ColumnDefinitions="Auto,*,Auto,10,Auto" Margin="0,20,0,0">
<Button Grid.Column="0" Content="Abbrechen" Click="OnCancel"/>
<Button Grid.Column="2" Content="In Zielstunde importieren" Click="OnImportIntoExisting"
IsEnabled="{Binding CanImportIntoExisting}"/>
<Button Grid.Column="4" Content="Als neue Stunde importieren" Click="OnImportAsNew"
IsEnabled="{Binding HasParsedLesson}"/>
</Grid>
</Grid>
</Window>