557 lines
28 KiB
XML
557 lines
28 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
|
|
xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
|
|
xmlns:templateselectors="clr-namespace:BeWo.View.TemplateSelectors"
|
|
xmlns:viewmodel="clr-namespace:BeWo.ViewModel">
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="..\DataTemplates\ControlTemplates.xaml" />
|
|
<ResourceDictionary Source="..\Designs\GeometryCollection.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<Style x:Key="MessageTextBoxStyle" TargetType="{x:Type TextBox}">
|
|
<Setter Property="Margin" Value="0" />
|
|
<Setter Property="Height" Value="auto" />
|
|
<Setter Property="Padding" Value="3" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextForegroundPrimary}" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="IsReadOnly" Value="True" />
|
|
<Setter Property="TextWrapping" Value="Wrap" />
|
|
<Setter Property="Text" Value="{Binding Message, Converter={StaticResource NewlineConverter}}" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
</Style>
|
|
|
|
<Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}" />
|
|
|
|
<SolidColorBrush x:Key="TextForegroundPrimary" Color="{StaticResource LightTextPrimary}" />
|
|
<SolidColorBrush x:Key="TextForegroundSecondary" Color="{StaticResource LightTextSecondary}" />
|
|
|
|
<SolidColorBrush x:Key="TextForegroundDarkPrimary" Color="{StaticResource DarkTextPrimary}" />
|
|
<SolidColorBrush x:Key="TextForegroundDarkSecondary" Color="{StaticResource DarkTextSecondary}" />
|
|
|
|
<Style x:Key="ModuleAiControlDefaultStyle" TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlDefaultNavigationHeaderColor}" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlDefaultNavigationContentColor}" />
|
|
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlDefaultNavigationContentColor2}" />
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="TextForegroundPrimary" Color="{StaticResource LightTextPrimary}" />
|
|
<SolidColorBrush x:Key="TextForegroundSecondary" Color="{StaticResource LightTextSecondary}" />
|
|
</Style.Resources>
|
|
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="ModuleAiControlZeiterfassungStyle"
|
|
BasedOn="{StaticResource ModuleAiControlDefaultStyle}"
|
|
TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlZeiterfassungNavigationHeaderColor}" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlZeiterfassungNavigationContentColor}" />
|
|
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlZeiterfassungNavigationContentColor2}" />
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="TextForegroundPrimary" Color="{StaticResource ModuleAiControlZeiterfassungNavigationContentTextPrimary}" />
|
|
<SolidColorBrush x:Key="TextForegroundSecondary" Color="{StaticResource ModuleAiControlZeiterfassungNavigationContentTextSecondary}" />
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="ModuleAiControlSupportConceptStyle"
|
|
BasedOn="{StaticResource ModuleAiControlDefaultStyle}"
|
|
TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlSupportConceptNavigationHeaderColor}" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlSupportConceptNavigationContentColor}" />
|
|
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlSupportConceptNavigationContentColor2}" />
|
|
</LinearGradientBrush>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="ModuleAiControlCustomerStyle"
|
|
BasedOn="{StaticResource ModuleAiControlDefaultStyle}"
|
|
TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlCustomerNavigationHeaderColor}" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlCustomerNavigationContentColor}" />
|
|
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlCustomerNavigationContentColor2}" />
|
|
</LinearGradientBrush>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="ModuleAiControlPersonStyle"
|
|
BasedOn="{StaticResource ModuleAiControlDefaultStyle}"
|
|
TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlPersonNavigationHeaderColor}" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlPersonNavigationContentColor}" />
|
|
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlPersonNavigationContentColor2}" />
|
|
</LinearGradientBrush>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="ModuleAiControlEmployeeStyle"
|
|
BasedOn="{StaticResource ModuleAiControlDefaultStyle}"
|
|
TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlEmployeeNavigationHeaderColor}" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlEmployeeNavigationContentColor}" />
|
|
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlEmployeeNavigationContentColor2}" />
|
|
</LinearGradientBrush>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="ModuleAiControlOrganisationStyle"
|
|
BasedOn="{StaticResource ModuleAiControlDefaultStyle}"
|
|
TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlOrganisationNavigationHeaderColor}" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="{StaticResource ModuleAiControlOrganisationNavigationContentColor}" />
|
|
<GradientStop Offset="1" Color="{StaticResource ModuleAiControlOrganisationNavigationContentColor2}" />
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="TextForegroundPrimary" Color="{StaticResource BrightTextPrimary}" />
|
|
<SolidColorBrush x:Key="TextForegroundSecondary" Color="{StaticResource BrightTextSecondary}" />
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<!-- OLD -->
|
|
<Style x:Key="ModuleAiNavigationStyle" TargetType="{x:Type GroupBox}">
|
|
<Style.Resources>
|
|
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#FFC64605" />
|
|
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#FFFFC48A" />
|
|
<GradientStop Offset="1" Color="#FFFF7830" />
|
|
</LinearGradientBrush>
|
|
</Style.Resources>
|
|
|
|
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
|
|
</Style>
|
|
|
|
<DataTemplate x:Key="ConversationHamburgerMenuItemTemplate" DataType="{x:Type viewmodel:AiConversationVM}">
|
|
<dxwui:HamburgerMenuNavigationButton Content="{Binding Displayname}" />
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<!-- Chip-Button für AssistentCommands unter der Assistent-Antwort -->
|
|
<Style x:Key="AssistentCommandButtonStyle" TargetType="{x:Type Button}">
|
|
<Setter Property="Foreground" Value="{DynamicResource TextForegroundPrimary}" />
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="FontWeight" Value="Medium" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
<Setter Property="Padding" Value="12,4,12,5" />
|
|
<Setter Property="Margin" Value="0,0,6,0" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border
|
|
x:Name="border"
|
|
Padding="{TemplateBinding Padding}"
|
|
Background="#00000000"
|
|
BorderBrush="#00000000"
|
|
BorderThickness="1"
|
|
CornerRadius="12">
|
|
<ContentPresenter
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
TextBlock.Foreground="{TemplateBinding Foreground}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#FFFFFFFF" />
|
|
<Setter TargetName="border" Property="BorderBrush" Value="#59000000" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#CCEDEDED" />
|
|
<Setter TargetName="border" Property="BorderBrush" Value="#73000000" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Opacity" Value="0.45" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Speichern-Button unter der User-Nachricht: nur beim Hovern sichtbar -->
|
|
<Style
|
|
x:Key="UserMessageSaveButtonStyle"
|
|
BasedOn="{StaticResource AssistentCommandButtonStyle}"
|
|
TargetType="{x:Type Button}">
|
|
<Setter Property="Visibility" Value="Hidden" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
<!-- Bei ausgeblendeten Nachrichten kein Speichern (würde eine leere Nachricht speichern) -->
|
|
<DataTrigger Binding="{Binding ShowMessage}" Value="False">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- Buttonleiste unter der Assistent-Antwort: bei der letzten Nachricht immer sichtbar, sonst nur beim Hovern -->
|
|
<Style x:Key="AssistentMessageCommandBarStyle" TargetType="{x:Type ItemsControl}">
|
|
<Setter Property="Visibility" Value="Hidden" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
<DataTrigger Value="True">
|
|
<DataTrigger.Binding>
|
|
<MultiBinding Converter="{StaticResource IsLastItemToBoolMultiConverter}">
|
|
<Binding />
|
|
<Binding RelativeSource="{RelativeSource AncestorType={x:Type ListView}}" />
|
|
<Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type ListView}}" />
|
|
</MultiBinding>
|
|
</DataTrigger.Binding>
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding DataContext.AssistentCommands, RelativeSource={RelativeSource AncestorType={x:Type ListView}}, Converter={StaticResource CollectionCountToBoolConverter}}" Value="False">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- Assistent Message Control -->
|
|
<DataTemplate x:Key="AssistentMessageTemplate">
|
|
<Grid
|
|
Margin="0,0,60,0"
|
|
HorizontalAlignment="Left"
|
|
Background="Transparent">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<Border
|
|
Width="auto"
|
|
Margin="0,0,3,0"
|
|
Padding="4,4,5,5"
|
|
VerticalAlignment="Top"
|
|
Background="#DEFFFFFF"
|
|
BorderBrush="Black"
|
|
BorderThickness="0"
|
|
CornerRadius="10, 10, 10, 10">
|
|
<Image
|
|
Width="24"
|
|
Height="24"
|
|
Source="..\..\Ressources\Icons\bewoplaner_haus.png" />
|
|
</Border>
|
|
<Border
|
|
Grid.Column="1"
|
|
Padding="8,4,8,4"
|
|
Background="#DEFFFFFF"
|
|
BorderBrush="Black"
|
|
BorderThickness="0"
|
|
CornerRadius="0, 10, 10, 10">
|
|
<Grid Margin="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<!--<Border BorderThickness="1" Grid.ColumnSpan="1" Grid.RowSpan="1" BorderBrush="Black"></Border>-->
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Margin="0,0,0,4"
|
|
Padding="0"
|
|
VerticalAlignment="Center"
|
|
FontSize="12"
|
|
FontWeight="Medium"
|
|
Foreground="{DynamicResource TextForegroundSecondary}"
|
|
Text="{Binding DurationSec, StringFormat=Nachgedacht für {0} Sekunden}">
|
|
<TextBlock.ToolTip>
|
|
<Grid Margin="0,4,0,4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock
|
|
Margin="0"
|
|
Padding="0"
|
|
FontSize="12"
|
|
FontWeight="Normal"
|
|
Foreground="{DynamicResource TextForegroundPrimary}"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="{Binding ModelName, StringFormat=Modell: {0}}" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Padding="0"
|
|
VerticalAlignment="Bottom"
|
|
FontSize="12"
|
|
FontWeight="Normal"
|
|
Foreground="{DynamicResource TextForegroundPrimary}"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="{Binding Created, StringFormat=Datum/Uhrzeit: {0:dd.MM.yyyy HH:mm:ss}}" />
|
|
</Grid>
|
|
</TextBlock.ToolTip>
|
|
</TextBlock>
|
|
<!--<TextBlock
|
|
Grid.Row="1"
|
|
Grid.ColumnSpan="2"
|
|
Margin="0,4,0,0"
|
|
Padding="0"
|
|
FontSize="11"
|
|
FontWeight="Medium"
|
|
Foreground="#888888"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="{Binding DurationSec, StringFormat=Nachgedacht für {0} Sekunden}" />-->
|
|
<TextBox
|
|
Grid.Row="1"
|
|
Grid.ColumnSpan="3"
|
|
Margin="0,4,0,0"
|
|
Padding="-3"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource MessageTextBoxStyle}" />
|
|
</Grid>
|
|
</Border>
|
|
<ItemsControl
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Margin="0,4,0,0"
|
|
HorizontalAlignment="Left"
|
|
ItemsSource="{Binding DataContext.AssistentCommands, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
|
Style="{StaticResource AssistentMessageCommandBarStyle}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Button
|
|
Command="{Binding Command}"
|
|
CommandParameter="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
|
|
Style="{StaticResource AssistentCommandButtonStyle}"
|
|
ToolTip="{Binding Name}">
|
|
<Path
|
|
Data="{Binding Icon}"
|
|
Width="16"
|
|
Height="16"
|
|
Fill="Black"
|
|
Stretch="Fill"/>
|
|
</Button>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- System Message Control -->
|
|
<DataTemplate x:Key="SystemMessageTemplate">
|
|
<Border
|
|
Width="auto"
|
|
Margin="60,0,60,0"
|
|
HorizontalAlignment="Center"
|
|
Background="#DEFFFFFF"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBox
|
|
Padding="8"
|
|
HorizontalAlignment="Center"
|
|
Style="{StaticResource MessageTextBoxStyle}">
|
|
SystemPrompt
|
|
</TextBox>
|
|
<Separator Grid.Row="1" />
|
|
<TextBox
|
|
Grid.Row="2"
|
|
Padding="8"
|
|
Style="{StaticResource MessageTextBoxStyle}" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
|
|
<!-- User Message Control -->
|
|
<DataTemplate x:Key="UserMessageTemplate">
|
|
<Grid
|
|
Margin="60,0,0,0"
|
|
HorizontalAlignment="Right"
|
|
Background="Transparent">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<Border
|
|
Width="auto"
|
|
HorizontalAlignment="Right"
|
|
Background="#DEFFFFFF"
|
|
BorderBrush="Black"
|
|
BorderThickness="0"
|
|
CornerRadius="15, 15, 15, 15">
|
|
<Grid>
|
|
<TextBox Padding="12,8,12,8">
|
|
<TextBox.Style>
|
|
<Style BasedOn="{StaticResource MessageTextBoxStyle}" TargetType="{x:Type TextBox}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ShowMessage}" Value="False">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBox.Style>
|
|
</TextBox>
|
|
<!-- Platzhalter für ausgeblendete Nachrichten (Message kommt vom Server als null) -->
|
|
<StackPanel Orientation="Vertical">
|
|
<StackPanel.Style>
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ShowMessage}" Value="False">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</StackPanel.Style>
|
|
|
|
<!-- Titelzeile: Promptbaustein-Titel + Ausklapp-Button -->
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
Padding="12,8,4,8"
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
FontStyle="Italic"
|
|
Foreground="#FF888888"
|
|
Text="{Binding HiddenMessageText}"
|
|
TextWrapping="Wrap" />
|
|
<ToggleButton
|
|
x:Name="btnTogglePrompt"
|
|
Grid.Column="1"
|
|
Margin="4,4,8,4"
|
|
Padding="6,2,6,2"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding ShowPrompt}"
|
|
ToolTipService.ShowOnDisabled="True">
|
|
<ToggleButton.Style>
|
|
<Style TargetType="{x:Type ToggleButton}">
|
|
<!-- Nur anzeigen, wenn die Nachricht mittels Promptbaustein erstellt wurde -->
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Setter Property="Content" Value="Prompt ▼" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding HasUsedPromptbaustein}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter Property="Content" Value="Prompt ▲" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="ToolTip" Value="Versteckt" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ToggleButton.Style>
|
|
</ToggleButton>
|
|
</Grid>
|
|
|
|
<!-- Ausgeklappter Prompt-Inhalt -->
|
|
<Border
|
|
Margin="12,0,12,8"
|
|
Padding="4"
|
|
Background="#22000000"
|
|
CornerRadius="6">
|
|
<Border.Style>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsChecked, ElementName=btnTogglePrompt}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBox
|
|
Padding="8"
|
|
Style="{StaticResource MessageTextBoxStyle}"
|
|
Text="{Binding UsedPromptbausteinContent, Converter={StaticResource NewlineConverter}, Mode=OneWay}" />
|
|
</Border>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
<Button
|
|
Grid.Row="1"
|
|
Margin="0,4,0,0"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding DataContext.SavePromptCommand, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
|
CommandParameter="{Binding}"
|
|
ToolTip="Speichern"
|
|
Style="{StaticResource UserMessageSaveButtonStyle}" >
|
|
<Path
|
|
Data="{StaticResource Phosphor.FloppyDisk}"
|
|
Width="16"
|
|
Height="16"
|
|
Fill="Black"
|
|
Stretch="Fill"/>
|
|
</Button>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="CheckboxAssistentMessageTemplate">
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<CheckBox
|
|
Margin="4"
|
|
VerticalAlignment="Center"
|
|
IsChecked="{Binding IsChecked, Mode=TwoWay}" />
|
|
|
|
<ContentPresenter Content="{Binding}" ContentTemplate="{StaticResource AssistentMessageTemplate}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="CheckboxUserMessageTemplate">
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<CheckBox
|
|
Margin="4"
|
|
VerticalAlignment="Center"
|
|
IsChecked="{Binding IsChecked}" />
|
|
|
|
<ContentPresenter Content="{Binding}" ContentTemplate="{StaticResource UserMessageTemplate}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
|
|
<templateselectors:AiConversationMessageTemplateSelector
|
|
x:Key="AiConversationMessageTemplateSelector"
|
|
AssistentMessageTemplate="{StaticResource AssistentMessageTemplate}"
|
|
SystemMessageTemplate="{StaticResource SystemMessageTemplate}"
|
|
UserMessageTemplate="{StaticResource UserMessageTemplate}" />
|
|
|
|
<templateselectors:AiConversationMessageTemplateSelector
|
|
x:Key="AiConversationCloneMessageTemplateSelector"
|
|
AssistentMessageTemplate="{StaticResource CheckboxAssistentMessageTemplate}"
|
|
SystemMessageTemplate="{StaticResource SystemMessageTemplate}"
|
|
UserMessageTemplate="{StaticResource UserMessageTemplate}" />
|
|
</ResourceDictionary> |