Hinweistext wenn kein Prompt enthalten

This commit is contained in:
2026-05-15 11:46:23 +02:00
parent fe3588f1ba
commit a5f6e00305
9 changed files with 75 additions and 44 deletions

View File

@@ -292,6 +292,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Styles\Designs\GeometryCollection.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Controls\AI\AiConversationButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

View File

@@ -12,7 +12,13 @@ namespace BeWo.Converter
try
{
var count = (int)value;
return count > 0 ? Visibility.Visible : Visibility.Collapsed;
if (parameter is string s && s == "reverse")
{
return count > 0 ? Visibility.Collapsed : Visibility.Visible;
}
return count > 0 ? Visibility.Visible : Visibility.Collapsed;
}
catch (Exception)
{

View File

@@ -176,7 +176,7 @@ namespace BeWo
}
if (BeWoApp.LoggedOnUser != null && BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && BeWoApp.AppSettings.ShowVorlagen && (BeWoApp.LoggedOnUser.HasRight(UserRightType.VorlagenViewAll) || BeWoApp.LoggedOnUser.HasRight(UserRightType.VorlagenViewOwnTeams))
if (BeWoApp.LoggedOnUser != null && BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && BeWoApp.AppSettings.ShowVorlagen && (BeWoApp.LoggedOnUser.HasRight(UserRightType.VorlagenViewAll) || BeWoApp.LoggedOnUser.HasRight(UserRightType.VorlagenViewOwnTeams)))
{
this.button_Dokumente.Visibility = Visibility.Visible;
}

View File

@@ -40,6 +40,7 @@
Cursor="Arrow"
Focusable="False"
FontWeight="{Binding FontWeight}"
FontSize="12"
IsReadOnly="True"
Text="{Binding Path=Title, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
ToolTipService.ShowDuration="100000">

View File

@@ -0,0 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<PathGeometry x:Key="GeometryFileAdd">M238.25 957.4166666666666C182.4166666666667 952.4583333333334 136.6666666666667 909.9583333333334 126.8333333333333 853.9166666666667C124.0833333333333 838.125 124.0833333333333 161.8750000000001 126.8333333333333 146.0833333333334C135.8333333333333 94.6666666666666 174 55.1666666666667 225.4166666666667 44.0833333333334C235 42 252.125 41.875 500 41.875C747.875 41.875 764.9999999999999 42 774.5833333333333 44.0833333333334C826 55.1666666666667 864.1666666666665 94.6666666666666 873.1666666666666 146.0833333333334C876 162.25 875.9166666666665 673.1666666666667 873.0833333333333 689.4583333333333C868.9166666666666 713.3333333333334 858.7083333333334 736.2916666666667 844.125 754.625C839.875 760 799.6666666666666 801 754.75 845.7083333333334C670.1666666666666 930 666.5 933.3333333333334 646.4166666666666 943.2083333333334C630.0833333333333 951.25 616.7083333333333 955.2083333333334 598.125 957.4166666666666C584.9166666666666 958.9583333333334 256 959 238.25 957.4166666666666M541.5 784.0416666666667L541.875 693.125L545.375 682.875C552.3333333333333 662.2916666666667 569 643.0416666666667 588.0416666666666 633.6666666666667C605.625 625 605.1666666666666 625.0416666666667 703.4583333333333 625.0416666666667L791.2499999999999 625L791.2499999999999 391.9166666666668C791.2499999999999 159.875 791.2499999999999 158.8333333333335 788.6666666666666 152C785.2916666666666 142.9166666666668 776.6666666666666 133.5000000000001 767.7499999999999 129.1250000000001L760.6249999999999 125.6250000000001L500 125.6250000000001L239.375 125.6250000000001L232.25 129.1250000000001C223.3333333333334 133.5000000000001 214.7083333333333 142.9166666666668 211.3333333333333 152C208.75 158.8333333333335 208.75 158.9166666666668 208.75 500C208.75 839.9583333333334 208.75 841.1666666666667 211.2916666666667 847.9583333333334C215.9166666666667 860.375 228.25 871.2916666666667 240.1666666666667 873.6666666666666C243.1666666666667 874.25 312.125 874.7916666666666 393.375 874.875L541.125 875L541.5 784.0416666666667M700 783.125L774.375 708.75L699.6666666666667 708.75L625 708.75L625 783.125C625 824.0416666666667 625.125 857.5 625.3333333333333 857.5C625.5 857.5 659.0833333333333 824.0416666666667 700 783.125M488.75 540.1666666666667C477.7499999999999 536.5416666666667 467.5833333333333 527.9166666666667 462.3749999999999 517.75C459.375 511.8750000000001 459.375 511.7500000000001 459 464.125L458.6249999999999 416.375L410.875 416L363.125 415.625L356.875 412.3333333333334C349.0416666666667 408.1666666666667 341.2916666666667 400.4166666666667 337.375 392.75C334.8333333333333 387.75 334.375 385.0833333333334 334.375 375C334.375 364.9166666666667 334.8333333333333 362.2500000000001 337.4166666666667 357.2083333333334C341.25 349.625 349.625 341.25 357.2083333333333 337.4166666666668C363.125 334.375 363.1666666666667 334.375 410.875 334L458.6249999999999 333.625L459 285.8750000000001C459.375 238.1666666666668 459.375 238.125 462.4166666666667 232.2083333333334C466.2499999999999 224.625 474.625 216.2500000000001 482.2083333333333 212.4166666666666C487.25 209.8333333333335 489.9166666666666 209.375 500 209.375C510.0833333333333 209.375 512.7499999999999 209.8333333333335 517.7916666666666 212.4166666666666C525.375 216.2500000000001 533.75 224.625 537.5833333333333 232.2083333333334C540.625 238.125 540.625 238.1666666666668 541 285.8750000000001L541.375 333.625L589.1249999999999 334C636.8333333333334 334.375 636.875 334.375 642.7916666666666 337.4166666666668C650.375 341.25 658.75 349.625 662.5833333333333 357.2083333333334C665.1666666666666 362.2500000000001 665.625 364.9166666666667 665.625 375C665.625 385.0833333333334 665.1666666666666 387.75 662.625 392.75C658.7083333333333 400.4166666666667 650.9583333333333 408.1666666666667 643.125 412.3333333333334L636.875 415.625L589.1249999999999 416L541.375 416.375L541 464.125C540.625 511.7500000000001 540.625 511.8750000000001 537.625 517.75C533.6666666666666 525.4583333333334 525.9166666666666 533.2083333333334 518.125 537.2083333333334C513.25 539.7083333333333 509.6666666666666 540.5 501.8749999999999 540.7916666666667C496.375 541 490.4583333333333 540.7083333333334 488.75 540.1666666666667</PathGeometry>
<PathGeometry x:Key="GeometryFileAdd2">M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z</PathGeometry>
</ResourceDictionary>

View File

@@ -22,6 +22,8 @@
<ResourceDictionary Source="Designs\AI\Icon_Refresh_Schw+Orange.xaml" />
<ResourceDictionary Source="Designs\AI\Icon_Refresh_Weiss.xaml" />
<ResourceDictionary Source="Designs\AI\Icon_Refresh_Weiss+Orange.xaml" />
<ResourceDictionary Source="Designs\GeometryCollection.xaml" />
<ResourceDictionary Source="Colors\Colors.xaml" />

View File

@@ -518,47 +518,60 @@
</TabControl.Resources>
<TabItem Header="Alle">
<dxe:ListBoxEdit
x:Name="listBoxEdit3"
Padding="8,16,8,16"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AllowDrop="False"
ContextMenuOpening="ListBox_ContextMenuOpening"
ItemContainerStyle="{StaticResource PromptListBoxItem}"
ItemTemplateSelector="{StaticResource AiPromptbausteinFolderItemTemplateSelector}"
ItemsSource="{Binding SelectedFolder.AlleFolderItems, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
SelectionMode="Single"
ShowBorder="False">
<dxe:ListBoxEdit.ContextMenu>
<ContextMenu>
<ContextMenu.Resources>
<ResourceDictionary>
<Style TargetType="{x:Type Image}">
<Setter Property="Height" Value="24" />
</Style>
</ResourceDictionary>
</ContextMenu.Resources>
<MenuItem Command="{Binding OpenAddPromptDialogCommand}" Header="Neuer Prompt">
<MenuItem.Icon>
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="{Binding OpenAddRoutineDialogCommand}" Header="Neue Routine">
<MenuItem.Icon>
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Command="{Binding PastePromptCommand}" Header="Einfügen">
<MenuItem.Icon>
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</dxe:ListBoxEdit.ContextMenu>
</dxe:ListBoxEdit>
<Grid>
<dxe:ListBoxEdit
x:Name="listBoxEdit3"
Padding="8,16,8,16"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AllowDrop="False"
ContextMenuOpening="ListBox_ContextMenuOpening"
ItemContainerStyle="{StaticResource PromptListBoxItem}"
ItemTemplateSelector="{StaticResource AiPromptbausteinFolderItemTemplateSelector}"
ItemsSource="{Binding SelectedFolder.AlleFolderItems, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
SelectionMode="Single"
ShowBorder="False">
<dxe:ListBoxEdit.ContextMenu>
<ContextMenu>
<ContextMenu.Resources>
<ResourceDictionary>
<Style TargetType="{x:Type Image}">
<Setter Property="Height" Value="24" />
</Style>
</ResourceDictionary>
</ContextMenu.Resources>
<MenuItem Command="{Binding OpenAddPromptDialogCommand}" Header="Neuer Prompt">
<MenuItem.Icon>
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="{Binding OpenAddRoutineDialogCommand}" Header="Neue Routine">
<MenuItem.Icon>
<Image Source="..\..\..\Ressources\Icons\Add24.png" />
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Command="{Binding PastePromptCommand}" Header="Einfügen">
<MenuItem.Icon>
<Image Source="..\..\..\Ressources\Icons\Paste24.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</dxe:ListBoxEdit.ContextMenu>
</dxe:ListBoxEdit>
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding SelectedFolder.AlleFolderItems.Count, Converter={StaticResource CollectionCountToVisibilityConverter}, ConverterParameter=reverse}">
<Path Fill="Black" Stretch="Uniform" Height="32"
Data="{StaticResource GeometryFileAdd2}">
</Path>
<TextBlock>
Hier sind noch keine Prompts/Routinen angelegt.
</TextBlock>
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="Prompts">
<dxe:ListBoxEdit