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.
120 lines
5.7 KiB
120 lines
5.7 KiB
<UserControl 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:packages="clr-namespace:StabilityMatrix.Core.Models.Packages;assembly=StabilityMatrix.Core" |
|
mc:Ignorable="d" d:DesignWidth="700" d:DesignHeight="700" |
|
x:DataType="dialogs:OneClickInstallViewModel" |
|
d:DataContext="{x:Static designData:DesignData.OneClickInstallViewModel}" |
|
x:Class="StabilityMatrix.Avalonia.Views.Dialogs.OneClickInstallDialog"> |
|
|
|
<Grid MaxHeight="900" |
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto" |
|
ColumnDefinitions="*,Auto"> |
|
|
|
<Grid.Transitions> |
|
<Transitions> |
|
<DoubleTransition Property="Width" |
|
Duration="00:00:00.25" |
|
Easing="0,0 0,1" /> |
|
<DoubleTransition Property="Height" |
|
Duration="00:00:00.25" |
|
Easing="0,0 0,1" /> |
|
</Transitions> |
|
</Grid.Transitions> |
|
|
|
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"> |
|
<TextBlock Text="{Binding HeaderText, FallbackValue=Installing Stable Diffusion WebUI...}" |
|
TextWrapping="Wrap" |
|
Margin="8,0,8,0" |
|
VerticalAlignment="Center" HorizontalAlignment="Center" |
|
FontSize="36" FontWeight="Light" /> |
|
<TextBlock Text="{Binding SubHeaderText, FallbackValue=Installing git...}" |
|
TextWrapping="Wrap" TextAlignment="Center" |
|
VerticalAlignment="Top" HorizontalAlignment="Center" |
|
FontSize="16" FontWeight="Light" Margin="8"/> |
|
<Separator Margin="16, 4" Background="#AAAAAA" |
|
IsVisible="{Binding ShowInstallButton}"/> |
|
</StackPanel> |
|
|
|
<StackPanel Grid.Row="1" Grid.Column="0" |
|
IsVisible="{Binding ShowInstallButton}"> |
|
<TextBlock Text="{Binding SelectedPackage.DisplayName}" |
|
FontSize="24" |
|
Margin="16, 16, 0, 4"/> |
|
<TextBlock Text="{Binding SelectedPackage.Blurb}" |
|
Margin="16, 0, 0, 8"/> |
|
<controls:BetterAdvancedImage Source="{Binding SelectedPackage.PreviewImageUri}" |
|
HorizontalAlignment="Left" |
|
MaxHeight="300" |
|
Margin="16, 8"/> |
|
</StackPanel> |
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0" |
|
Text="{Binding SubSubHeaderText, FallbackValue=Installing git...}" |
|
TextWrapping="Wrap" TextAlignment="Center" |
|
VerticalAlignment="Top" HorizontalAlignment="Center" |
|
FontSize="10" Margin="8"/> |
|
|
|
<ProgressBar Maximum="100" |
|
Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" |
|
Value="{Binding OneClickInstallProgress}" |
|
IsVisible="{Binding IsProgressBarVisible}" |
|
IsIndeterminate="{Binding IsIndeterminate}" |
|
Margin="16" > |
|
<ProgressBar.Transitions> |
|
<Transitions> |
|
<DoubleTransition Property="Value" Duration="00:00:00.150"> |
|
<DoubleTransition.Easing> |
|
<SineEaseInOut/> |
|
</DoubleTransition.Easing> |
|
</DoubleTransition> |
|
</Transitions> |
|
</ProgressBar.Transitions> |
|
</ProgressBar> |
|
|
|
<StackPanel Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" |
|
Orientation="Vertical" |
|
IsVisible="{Binding ShowInstallButton}" |
|
HorizontalAlignment="Center"> |
|
<Button |
|
Content="Install" |
|
Command="{Binding InstallCommand}" |
|
FontSize="32" |
|
HorizontalAlignment="Center" |
|
Classes="success" |
|
Margin="16" |
|
Padding="16, 8, 16, 8" /> |
|
<Button Command="{Binding ToggleAdvancedModeCommand}" |
|
Content="Skip first-time setup" |
|
FontSize="16" |
|
HorizontalAlignment="Center" |
|
Padding="16, 8, 16, 8"/> |
|
</StackPanel> |
|
|
|
|
|
<ListBox Grid.Column="1" Grid.Row="1" |
|
Margin="8, 16" |
|
IsVisible="{Binding ShowInstallButton}" |
|
ItemsSource="{Binding AllPackages}" |
|
SelectedItem="{Binding SelectedPackage}"> |
|
<ListBox.Template> |
|
<ControlTemplate> |
|
<ItemsPresenter/> |
|
</ControlTemplate> |
|
</ListBox.Template> |
|
<ListBox.ItemTemplate> |
|
<DataTemplate DataType="{x:Type packages:BasePackage}"> |
|
<StackPanel Margin="8"> |
|
<TextBlock Text="{Binding DisplayName}"/> |
|
<TextBlock Text="{Binding ByAuthor}"/> |
|
</StackPanel> |
|
</DataTemplate> |
|
</ListBox.ItemTemplate> |
|
</ListBox> |
|
</Grid> |
|
|
|
</UserControl>
|
|
|