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