Hat keine Favoriten Fall
This commit is contained in:
@@ -39,72 +39,82 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="Favoriten"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit1"
|
||||
Padding="4,16,4,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
EditValue="{Binding SelectedPrompt, Mode=TwoWay}"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemsSource="{Binding SelectedFolder.Prompts, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectionMode="Single">
|
||||
<dxe:ListBoxEdit.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
Margin="0,3,0,0"
|
||||
Background="Transparent"
|
||||
PreviewMouseDown="Grid_PreviewMouseDown_1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
<Grid>
|
||||
<dxe:ListBoxEdit
|
||||
x:Name="listBoxEdit1"
|
||||
Padding="4,16,4,16"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
EditValue="{Binding SelectedPrompt, Mode=TwoWay}"
|
||||
ItemContainerStyle="{StaticResource PromptListBoxItem}"
|
||||
ItemsSource="{Binding SelectedFolder.Prompts, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectionMode="Single"
|
||||
Visibility="{Binding HasFavoriten, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
<dxe:ListBoxEdit.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
Margin="0,3,0,0"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="{Binding FontWeight, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Title, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
ToolTipService.ShowDuration="100000">
|
||||
<TextBox.ToolTip>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Label Content="{Binding Path=Title, Mode=OneWay}" FontWeight="Bold" />
|
||||
<TextBox
|
||||
MaxWidth="500"
|
||||
Padding="3,1,0,0"
|
||||
VerticalAlignment="Center"
|
||||
AcceptsReturn="True"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Description}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Visibility="{Binding IsInfoVisible, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
<Hyperlink NavigateUri="{Binding OwnsoftRefLink}" RequestNavigate="Hyperlink_RequestNavigate">
|
||||
(i)
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxe:ListBoxEdit.ItemTemplate>
|
||||
</dxe:ListBoxEdit>
|
||||
PreviewMouseDown="Grid_PreviewMouseDown_1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="{Binding FontWeight, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Title, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
ToolTipService.ShowDuration="100000">
|
||||
<TextBox.ToolTip>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Label Content="{Binding Path=Title, Mode=OneWay}" FontWeight="Bold" />
|
||||
<TextBox
|
||||
MaxWidth="500"
|
||||
Padding="3,1,0,0"
|
||||
VerticalAlignment="Center"
|
||||
AcceptsReturn="True"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=Description}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Visibility="{Binding IsInfoVisible, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
<Hyperlink NavigateUri="{Binding OwnsoftRefLink}" RequestNavigate="Hyperlink_RequestNavigate">
|
||||
(i)
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxe:ListBoxEdit.ItemTemplate>
|
||||
</dxe:ListBoxEdit>
|
||||
<TextBlock
|
||||
Margin="3"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding HasFavoriten, Converter={StaticResource BoolVisibilityConverter}, ConverterParameter=false}">
|
||||
Bisher haben Sie noch keine Prompt-Favoriten festgelegt.<LineBreak />
|
||||
Bitte legen Sie in der Verwaltung Ihre gewünschten Prompt-Favoriten fest.</TextBlock>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--<GroupBox
|
||||
@@ -187,7 +197,8 @@ Style="{StaticResource ObjectEditGroupBox}">
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Command="{Binding SendCommand}"
|
||||
Style="{StaticResource PrimaryButton}">
|
||||
Style="{StaticResource PrimaryButton}"
|
||||
Visibility="{Binding HasFavoriten, Converter={StaticResource BoolVisibilityConverter}}">
|
||||
Absenden
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace BeWo.ViewModel.View.AI
|
||||
_SelectedFolder = value;
|
||||
FirePropertyChanged(nameof(SelectedFolder));
|
||||
|
||||
if(SelectedPrompt is object)
|
||||
if (SelectedPrompt is object)
|
||||
{
|
||||
SelectedPrompt.IsSelected = false;
|
||||
SelectedPrompt = null;
|
||||
@@ -79,6 +79,14 @@ namespace BeWo.ViewModel.View.AI
|
||||
public AiPromptbausteinFolderListVM Folders { get; private set; }
|
||||
public AiActionType LoadedActionType { get; set; }
|
||||
|
||||
public bool HasFavoriten
|
||||
{
|
||||
get
|
||||
{
|
||||
return Folders.Count > 3 && Folders.VMList[0].Prompts.Count > 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetSelection()
|
||||
{
|
||||
if (!IsFavorite)
|
||||
|
||||
Reference in New Issue
Block a user