|
|
|
@ -10,12 +10,18 @@
|
|
|
|
|
xmlns:icons="clr-namespace:Projektanker.Icons.Avalonia;assembly=Projektanker.Icons.Avalonia" |
|
|
|
|
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" |
|
|
|
|
xmlns:system="clr-namespace:System;assembly=System.Runtime" |
|
|
|
|
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" |
|
|
|
|
xmlns:avalonia="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" |
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
|
|
|
|
x:DataType="viewModels:PackageManagerViewModel" |
|
|
|
|
x:CompileBindings="True" |
|
|
|
|
d:DataContext="{x:Static designData:DesignData.PackageManagerViewModel}" |
|
|
|
|
x:Class="StabilityMatrix.Avalonia.Views.PackageManagerPage"> |
|
|
|
|
|
|
|
|
|
<controls:UserControlBase.Resources> |
|
|
|
|
<converters:BooleanChoiceMultiConverter x:Key="BoolChoiceMultiConverter" /> |
|
|
|
|
</controls:UserControlBase.Resources> |
|
|
|
|
|
|
|
|
|
<Grid Margin="16" RowDefinitions="Auto,*,Auto"> |
|
|
|
|
<ScrollViewer Grid.Row="1"> |
|
|
|
|
<ItemsRepeater |
|
|
|
@ -27,6 +33,13 @@
|
|
|
|
|
<DataTemplate DataType="{x:Type packageManager:PackageCardViewModel}"> |
|
|
|
|
<controls:Card Padding="8" |
|
|
|
|
CornerRadius="8"> |
|
|
|
|
<controls:Card.Background> |
|
|
|
|
<MultiBinding Converter="{StaticResource BoolChoiceMultiConverter}"> |
|
|
|
|
<Binding Path="IsRunning" /> |
|
|
|
|
<DynamicResource ResourceKey="ThemeDarkDarkGreenColorBrush"/> |
|
|
|
|
<DynamicResource ResourceKey="ButtonBackground"/> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</controls:Card.Background> |
|
|
|
|
<Grid RowDefinitions="Auto, Auto, Auto, Auto" |
|
|
|
|
ColumnDefinitions="*,Auto"> |
|
|
|
|
|
|
|
|
@ -221,13 +234,19 @@
|
|
|
|
|
Grid.Row="3" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
IsVisible="{Binding IsUpdateAvailable}" |
|
|
|
|
ColumnDefinitions="*, *"> |
|
|
|
|
IsVisible="{Binding !IsUnknownPackage}" |
|
|
|
|
ColumnDefinitions="*,Auto"> |
|
|
|
|
<!-- Launch and update buttons --> |
|
|
|
|
<Button Grid.Column="0" Classes="accent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
Command="{Binding Launch}"> |
|
|
|
|
<Button.IsVisible> |
|
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
|
<Binding Path="!IsRunning" /> |
|
|
|
|
<Binding Path="!IsUnknownPackage" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</Button.IsVisible> |
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,2,0,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-rocket" |
|
|
|
|
Margin="0,0,8,0" |
|
|
|
@ -239,37 +258,46 @@
|
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
Command="{Binding Update}"> |
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,2,0,2"> |
|
|
|
|
<Button.IsVisible> |
|
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
|
<Binding Path="IsUpdateAvailable" /> |
|
|
|
|
<Binding Path="!IsRunning" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</Button.IsVisible> |
|
|
|
|
<StackPanel Orientation="Horizontal" |
|
|
|
|
Margin="10,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-download" |
|
|
|
|
Margin="0,0,8,0" |
|
|
|
|
FontSize="14" /> |
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Update}" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
<!-- Big launch button --> |
|
|
|
|
<Button |
|
|
|
|
Grid.Row="3" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Classes="accent" |
|
|
|
|
<Button Grid.Column="0" Classes="accent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
Command="{Binding Launch}" |
|
|
|
|
HorizontalAlignment="Stretch"> |
|
|
|
|
<Button.IsVisible> |
|
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
|
<Binding Path="!IsUpdateAvailable" /> |
|
|
|
|
<Binding Path="!IsUnknownPackage" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</Button.IsVisible> |
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,2,0,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-rocket" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
IsVisible="{Binding IsRunning}" |
|
|
|
|
Command="{Binding NavToConsole}"> |
|
|
|
|
<StackPanel Orientation="Horizontal" |
|
|
|
|
Margin="0,2,0,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-terminal" |
|
|
|
|
Margin="0,0,8,0" |
|
|
|
|
FontSize="14" /> |
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Launch}" /> |
|
|
|
|
<TextBlock Text="Console"/> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
<Button Grid.Column="1" Classes="accent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
IsVisible="{Binding ShowWebUiButton}" |
|
|
|
|
Command="{Binding LaunchWebUi}"> |
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="8,2,8,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-up-right-from-square" |
|
|
|
|
Margin="0,0,8,0" |
|
|
|
|
FontSize="14" /> |
|
|
|
|
<TextBlock Text="Web UI" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
<!-- Import button (for unknown) --> |
|
|
|
|
<Button Grid.Row="3" Grid.Column="0" Classes="transparent-info" |
|
|
|
|