Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
5.6 KiB

<controls:UserControlBase xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls"
xmlns:dialogs="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Dialogs"
xmlns:designData="clr-namespace:StabilityMatrix.Avalonia.DesignData"
xmlns:models="clr-namespace:StabilityMatrix.Avalonia.Models"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages"
xmlns:avalonia="https://github.com/projektanker/icons.avalonia"
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="650"
x:DataType="dialogs:OpenArtWorkflowViewModel"
d:DataContext="{x:Static designData:DesignData.OpenArtWorkflowViewModel}"
x:Class="StabilityMatrix.Avalonia.Views.Dialogs.OpenArtWorkflowDialog">
<Grid RowDefinitions="Auto, Auto, Auto, Auto"
ColumnDefinitions="*, 2*"
HorizontalAlignment="Stretch"
Width="600">
<TextBlock Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
FontSize="20"
TextAlignment="Left"
Margin="8,8,0,4"
ToolTip.Tip="{Binding Workflow.Name}">
<Run Text="{Binding Workflow.Name}"/>
<Run Text="- by"/>
<Run Text="{Binding Workflow.Creator.Name}"/>
</TextBlock>
<controls:BetterAdvancedImage Grid.Column="0"
Grid.Row="2"
Source="{Binding Workflow.Thumbnails[0].Url}"
Height="300"
Margin="8"
Stretch="UniformToFill"
CornerRadius="8" />
<controls:Card Grid.Row="2" Grid.Column="1"
VerticalAlignment="Top"
Margin="8">
<ScrollViewer MaxHeight="270">
<TextBlock Text="{Binding PrunedDescription}"
TextWrapping="Wrap"
Margin="4"/>
</ScrollViewer>
</controls:Card>
<Expander Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2"
Header="{x:Static lang:Resources.Label_NodeDetails}"
ExpandDirection="Down"
Margin="8, 8">
<ScrollViewer MaxHeight="225">
<ItemsControl ItemsSource="{Binding CustomNodes}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" Spacing="4" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type models:OpenArtCustomNode}">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Title}"
FontWeight="SemiBold"
FontSize="16" />
<avalonia:Icon Value="fa-solid fa-circle-check"
Foreground="Lime"
VerticalAlignment="Center"
Margin="4"
IsVisible="{Binding IsInstalled}"/>
</StackPanel>
<ItemsControl Margin="0,4"
ItemsSource="{Binding Children}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" Spacing="4" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type system:String}">
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding ., StringFormat={} - {0}}"
Margin="4,0,0,0" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Expander>
</Grid>
</controls:UserControlBase>