1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/src/Artemis.UI/Screens/Plugins/Dialogs/PluginPrerequisitesInstallDialogView.axaml
Robert b59e898dd3 Plugins - Separated VMs into folders
Plugins - Added help pages
2023-04-13 17:41:54 +02:00

85 lines
4.5 KiB
XML

<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:plugins="clr-namespace:Artemis.UI.Screens.Plugins"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:prerequisites="clr-namespace:Artemis.UI.Screens.Plugins.Prerequisites"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Plugins.PluginPrerequisitesInstallDialogView"
x:DataType="plugins:PluginPrerequisitesInstallDialogViewModel">
<UserControl.Styles>
<Styles>
<Style Selector="Border.status-border">
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="CornerRadius" Value="16" />
</Style>
<Style Selector="Border.status-border avalonia|MaterialIcon">
<Setter Property="Width" Value="16" />
<Setter Property="Height" Value="16" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
</Styles>
</UserControl.Styles>
<Grid ColumnDefinitions="250,*">
<Grid.RowDefinitions>
<RowDefinition MinHeight="200" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0"
Grid.Column="0"
Items="{CompiledBinding Prerequisites}"
SelectedItem="{CompiledBinding ActivePrerequisite, Mode=OneWay}"
IsHitTestVisible="False">
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type prerequisites:PluginPrerequisiteViewModel}">
<Grid ColumnDefinitions="Auto,*" Margin="0 6">
<Border Grid.Row="0" Grid.Column="0" Classes="status-border" IsVisible="{CompiledBinding !IsMet}" Background="#ff3838">
<avalonia:MaterialIcon Kind="Close" />
</Border>
<Border Grid.Row="0" Grid.Column="0" Classes="status-border" IsVisible="{CompiledBinding IsMet}" Background="#32a852">
<avalonia:MaterialIcon Kind="Check" />
</Border>
<StackPanel Margin="8 0 0 0" Grid.Column="1" VerticalAlignment="Stretch">
<TextBlock FontWeight="Bold" Text="{CompiledBinding PluginPrerequisite.Name}" TextWrapping="Wrap" />
<TextBlock Text="{CompiledBinding PluginPrerequisite.Description}" TextWrapping="Wrap" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ContentControl Grid.Row="0"
Grid.Column="1"
Content="{CompiledBinding ActivePrerequisite}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Margin="10 0"
IsTabStop="False"
IsVisible="{CompiledBinding ShowProgress, Mode=OneWay}" />
<TextBlock Grid.Row="0"
Grid.Column="1"
TextWrapping="Wrap"
Margin="10 0"
IsVisible="{CompiledBinding ShowIntro, Mode=OneWay}">
In order for this plugin to work the prerequisites on the left must be met. Clicking install will automatically set everything up for you.
</TextBlock>
<StackPanel Grid.Row="0"
Grid.Column="1"
Margin="10 0"
IsVisible="{CompiledBinding ShowFailed, Mode=OneWay}">
<StackPanel Orientation="Horizontal">
<TextBlock>Installing</TextBlock>
<TextBlock Text="{CompiledBinding ActivePrerequisite.PluginPrerequisite.Name, Mode=OneWay}" FontWeight="SemiBold" TextWrapping="Wrap" />
<TextBlock>failed.</TextBlock>
</StackPanel>
<TextBlock TextWrapping="Wrap">You may try again to see if that helps, otherwise install the prerequisite manually or contact the plugin developer.</TextBlock>
</StackPanel>
</Grid>
</UserControl>