|
|
|
@ -15,6 +15,7 @@
|
|
|
|
|
xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" |
|
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core" |
|
|
|
|
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" |
|
|
|
|
xmlns:models1="clr-namespace:StabilityMatrix.Avalonia.Models" |
|
|
|
|
d:DataContext="{x:Static mocks:DesignData.PackageExtensionBrowserViewModel}" |
|
|
|
|
x:DataType="packageManager:PackageExtensionBrowserViewModel" |
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
|
|
|
@ -22,135 +23,154 @@
|
|
|
|
|
<controls:UserControlBase.Resources> |
|
|
|
|
<!--<input:StandardUICommand x:Key="InstallExtensionCommand" |
|
|
|
|
Command="{Binding InstallExtensionCommand}" />--> |
|
|
|
|
<converters:FileUriConverter x:Key="FileUriConverter"/> |
|
|
|
|
|
|
|
|
|
<converters:FileUriConverter x:Key="FileUriConverter" /> |
|
|
|
|
|
|
|
|
|
<DataTemplate x:Key="PackageExtensionTemplate"> |
|
|
|
|
<DataTemplate.DataType> |
|
|
|
|
<x:Type TypeName="models:SelectableItem" x:TypeArguments="extensions:PackageExtension"/> |
|
|
|
|
<x:Type TypeName="models1:SelectableItem" x:TypeArguments="extensions:PackageExtension" /> |
|
|
|
|
</DataTemplate.DataType> |
|
|
|
|
<controls:Card |
|
|
|
|
Padding="12,12" |
|
|
|
|
Margin="4" |
|
|
|
|
Classes="transparent-full" |
|
|
|
|
CornerRadius="8"> |
|
|
|
|
<Button Background="Transparent" |
|
|
|
|
Padding="-5" |
|
|
|
|
Margin="4, 0, 0, 8" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
HorizontalContentAlignment="Stretch" |
|
|
|
|
Classes="transparent-full" |
|
|
|
|
BorderBrush="Transparent" |
|
|
|
|
CornerRadius="8" |
|
|
|
|
Command="{Binding ToggleSelectedCommand}"> |
|
|
|
|
<controls:Card |
|
|
|
|
Padding="12,12" |
|
|
|
|
Margin="4" |
|
|
|
|
Classes="transparent-full" |
|
|
|
|
CornerRadius="8"> |
|
|
|
|
|
|
|
|
|
<sg:SpacedGrid ColumnDefinitions="Auto,*,Auto"> |
|
|
|
|
<!--<controls:BetterAdvancedImage |
|
|
|
|
<sg:SpacedGrid ColumnDefinitions="Auto,*,Auto"> |
|
|
|
|
<!--<controls:BetterAdvancedImage |
|
|
|
|
Grid.Column="0" |
|
|
|
|
MaxHeight="128" |
|
|
|
|
MaxWidth="128" |
|
|
|
|
Stretch="UniformToFill" |
|
|
|
|
CornerRadius="4" |
|
|
|
|
Source="{Binding PreviewImageUri}" />--> |
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Vertical" Spacing="4"> |
|
|
|
|
<TextBlock Text="{Binding Item.Title}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="16" /> |
|
|
|
|
|
|
|
|
|
<TextBlock Text="{Binding Item.Author}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Vertical" Spacing="4"> |
|
|
|
|
<TextBlock Text="{Binding Item.Title}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="16" /> |
|
|
|
|
|
|
|
|
|
<TextBlock TextWrapping="Wrap" |
|
|
|
|
Text="{Binding Item.Description}" |
|
|
|
|
Foreground="{DynamicResource TextFillColorSecondary}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
|
|
|
|
|
<controls:HyperlinkIconButton |
|
|
|
|
Margin="0" |
|
|
|
|
Padding="0,2" |
|
|
|
|
NavigateUri="{Binding Item.Reference}" |
|
|
|
|
Content="GitHub" |
|
|
|
|
/> |
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
<CheckBox |
|
|
|
|
IsChecked="{Binding IsSelected}" |
|
|
|
|
Margin="0,0,16,0" |
|
|
|
|
Grid.Column="2"/> |
|
|
|
|
|
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
</controls:Card> |
|
|
|
|
<TextBlock Text="{Binding Item.Author}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
|
|
|
|
|
<TextBlock TextWrapping="Wrap" |
|
|
|
|
Text="{Binding Item.Description}" |
|
|
|
|
Foreground="{DynamicResource TextFillColorSecondary}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
|
|
|
|
|
<controls:HyperlinkIconButton |
|
|
|
|
Margin="0" |
|
|
|
|
Padding="0,2" |
|
|
|
|
NavigateUri="{Binding Item.Reference}" |
|
|
|
|
Content="GitHub" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
<CheckBox |
|
|
|
|
IsChecked="{Binding IsSelected}" |
|
|
|
|
Margin="0,0,16,0" |
|
|
|
|
Grid.Column="2" /> |
|
|
|
|
|
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
</controls:Card> |
|
|
|
|
</Button> |
|
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DataTemplate x:Key="InstalledPackageExtensionTemplate"> |
|
|
|
|
<DataTemplate.DataType> |
|
|
|
|
<x:Type TypeName="models:SelectableItem" x:TypeArguments="extensions:InstalledPackageExtension"/> |
|
|
|
|
<x:Type TypeName="models1:SelectableItem" x:TypeArguments="extensions:InstalledPackageExtension" /> |
|
|
|
|
</DataTemplate.DataType> |
|
|
|
|
<controls:Card |
|
|
|
|
Padding="12,12" |
|
|
|
|
Margin="4" |
|
|
|
|
Classes="transparent-full" |
|
|
|
|
CornerRadius="8"> |
|
|
|
|
<Button Background="Transparent" |
|
|
|
|
Padding="-5" |
|
|
|
|
Margin="4, 0, 0, 8" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
HorizontalContentAlignment="Stretch" |
|
|
|
|
Classes="transparent-full" |
|
|
|
|
BorderBrush="Transparent" |
|
|
|
|
CornerRadius="8" |
|
|
|
|
Command="{Binding ToggleSelectedCommand}"> |
|
|
|
|
<controls:Card |
|
|
|
|
Padding="12,12" |
|
|
|
|
Margin="4" |
|
|
|
|
Classes="transparent-full" |
|
|
|
|
CornerRadius="8"> |
|
|
|
|
|
|
|
|
|
<sg:SpacedGrid ColumnDefinitions="*,Auto"> |
|
|
|
|
<StackPanel |
|
|
|
|
DataContext="{Binding Item}" |
|
|
|
|
Orientation="Vertical" Spacing="4"> |
|
|
|
|
<TextBlock |
|
|
|
|
Text="{Binding Title}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="16"/> |
|
|
|
|
<TextBlock Text="{Binding Version, FallbackValue=''}" |
|
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
<TextBlock TextWrapping="Wrap" |
|
|
|
|
Text="{Binding Definition.Description, FallbackValue=''}" |
|
|
|
|
Foreground="{DynamicResource TextFillColorSecondary}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="2"> |
|
|
|
|
<controls:HyperlinkIconButton |
|
|
|
|
IsEnabled="{Binding Definition, Converter={x:Static ObjectConverters.IsNotNull}}" |
|
|
|
|
Margin="0" |
|
|
|
|
Padding="0,2" |
|
|
|
|
NavigateUri="{Binding Definition.Reference, FallbackValue=''}" |
|
|
|
|
Content="GitHub"/> |
|
|
|
|
|
|
|
|
|
<Ellipse |
|
|
|
|
Width="3" |
|
|
|
|
Height="3" |
|
|
|
|
Opacity="0.8" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Fill="{DynamicResource TextFillColorTertiaryBrush}" /> |
|
|
|
|
|
|
|
|
|
<controls:HyperlinkIconButton |
|
|
|
|
IsEnabled="{Binding Definition, Converter={x:Static ObjectConverters.IsNotNull}}" |
|
|
|
|
Margin="0" |
|
|
|
|
Padding="0,2" |
|
|
|
|
NavigateUri="{Binding PrimaryPath.FullPath, Converter={StaticResource FileUriConverter}}" |
|
|
|
|
Content="{Binding DisplayPath}"/> |
|
|
|
|
<sg:SpacedGrid ColumnDefinitions="*,Auto"> |
|
|
|
|
<StackPanel |
|
|
|
|
DataContext="{Binding Item}" |
|
|
|
|
Orientation="Vertical" Spacing="4"> |
|
|
|
|
<TextBlock |
|
|
|
|
Text="{Binding Title}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="16" /> |
|
|
|
|
<TextBlock Text="{Binding Version, FallbackValue=''}" |
|
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
<TextBlock TextWrapping="Wrap" |
|
|
|
|
Text="{Binding Definition.Description, FallbackValue=''}" |
|
|
|
|
Foreground="{DynamicResource TextFillColorSecondary}" |
|
|
|
|
FontWeight="Light" |
|
|
|
|
FontSize="13" /> |
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="2"> |
|
|
|
|
<controls:HyperlinkIconButton |
|
|
|
|
IsEnabled="{Binding Definition, Converter={x:Static ObjectConverters.IsNotNull}}" |
|
|
|
|
Margin="0" |
|
|
|
|
Padding="0,2" |
|
|
|
|
NavigateUri="{Binding Definition.Reference, FallbackValue=''}" |
|
|
|
|
Content="GitHub" /> |
|
|
|
|
|
|
|
|
|
<Ellipse |
|
|
|
|
Width="3" |
|
|
|
|
Height="3" |
|
|
|
|
Opacity="0.8" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Fill="{DynamicResource TextFillColorTertiaryBrush}" /> |
|
|
|
|
|
|
|
|
|
<controls:HyperlinkIconButton |
|
|
|
|
IsEnabled="{Binding Definition, Converter={x:Static ObjectConverters.IsNotNull}}" |
|
|
|
|
Margin="0" |
|
|
|
|
Padding="0,2" |
|
|
|
|
NavigateUri="{Binding PrimaryPath.FullPath, Converter={StaticResource FileUriConverter}}" |
|
|
|
|
Content="{Binding DisplayPath}" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</StackPanel> |
|
|
|
|
</StackPanel> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
IsChecked="{Binding IsSelected}" |
|
|
|
|
Margin="0,0,16,0"/> |
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
</controls:Card> |
|
|
|
|
<CheckBox |
|
|
|
|
Grid.Column="1" |
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
IsChecked="{Binding IsSelected}" |
|
|
|
|
Margin="0,0,16,0" /> |
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
</controls:Card> |
|
|
|
|
</Button> |
|
|
|
|
</DataTemplate> |
|
|
|
|
</controls:UserControlBase.Resources> |
|
|
|
|
|
|
|
|
|
<TabControl TabStripPlacement="Top" SelectionChanged="TabControl_OnSelectionChanged"> |
|
|
|
|
<TabControl.Items> |
|
|
|
|
<TabItem FontSize="18" Header="Available Extensions" Margin="8,0,0,0"> |
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
RowDefinitions="Auto,*,Auto" |
|
|
|
|
RowSpacing="12" |
|
|
|
|
Margin="8"> |
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
ColumnDefinitions="*,Auto,Auto" |
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
ColumnDefinitions="*,Auto,Auto" |
|
|
|
|
ColumnSpacing="8"> |
|
|
|
|
<TextBox |
|
|
|
|
<TextBox |
|
|
|
|
Classes="search" |
|
|
|
|
Margin="4, 0,0,0" |
|
|
|
|
Watermark="{x:Static lang:Resources.Action_Search}" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Text="{Binding AvailableItemsSearchCollection.Query, Mode=TwoWay}"/> |
|
|
|
|
|
|
|
|
|
Watermark="{x:Static lang:Resources.Action_Search}" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Text="{Binding AvailableItemsSearchCollection.Query, Mode=TwoWay}" /> |
|
|
|
|
|
|
|
|
|
<!-- Refresh Button --> |
|
|
|
|
<Button |
|
|
|
|
Grid.Row="0" |
|
|
|
@ -161,7 +181,7 @@
|
|
|
|
|
Command="{Binding RefreshCommand}"> |
|
|
|
|
<ui:SymbolIcon FontSize="16" Symbol="Refresh" /> |
|
|
|
|
</Button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Settings / Edit Manifests Button --> |
|
|
|
|
<Button |
|
|
|
|
Grid.Row="0" |
|
|
|
@ -173,11 +193,11 @@
|
|
|
|
|
<ui:SymbolIcon FontSize="16" Symbol="Settings" /> |
|
|
|
|
</Button> |
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
|
|
|
|
|
<ScrollViewer |
|
|
|
|
|
|
|
|
|
<ScrollViewer |
|
|
|
|
IsVisible="{Binding !IsLoading}" |
|
|
|
|
Grid.Row="1"> |
|
|
|
|
<ItemsRepeater |
|
|
|
|
<ItemsRepeater |
|
|
|
|
DataContext="{Binding AvailableItemsSearchCollection}" |
|
|
|
|
ItemTemplate="{StaticResource PackageExtensionTemplate}" |
|
|
|
|
ItemsSource="{Binding FilteredItems}"> |
|
|
|
@ -186,7 +206,7 @@
|
|
|
|
|
</ItemsRepeater.Layout> |
|
|
|
|
</ItemsRepeater> |
|
|
|
|
</ScrollViewer> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Panel |
|
|
|
|
IsVisible="{Binding IsLoading}" |
|
|
|
|
Grid.Row="1"> |
|
|
|
@ -194,49 +214,49 @@
|
|
|
|
|
Margin="32,16" |
|
|
|
|
IsIndeterminate="True" |
|
|
|
|
IsEnabled="{Binding IsLoading}" |
|
|
|
|
IsVisible="{Binding IsLoading}"/> |
|
|
|
|
IsVisible="{Binding IsLoading}" /> |
|
|
|
|
</Panel> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ui:InfoBar |
|
|
|
|
Grid.Row="2" |
|
|
|
|
IsOpen="{Binding !!SelectedAvailableItems.Count}" |
|
|
|
|
IsOpen="{Binding !!SelectedAvailableItems.Count}" |
|
|
|
|
HorizontalContentAlignment="Right" |
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
CloseButtonCommand="{Binding ClearSelection}" |
|
|
|
|
IsIconVisible="False"> |
|
|
|
|
<ui:InfoBar.Title> |
|
|
|
|
<MultiBinding StringFormat="{}{0} Selected"> |
|
|
|
|
<Binding Path="SelectedAvailableItems.Count"/> |
|
|
|
|
<Binding Path="SelectedAvailableItems.Count" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</ui:InfoBar.Title> |
|
|
|
|
<ui:InfoBar.ActionButton> |
|
|
|
|
<Button |
|
|
|
|
Classes="accent" |
|
|
|
|
Command="{Binding InstallSelectedExtensionsCommand}" |
|
|
|
|
Content="{x:Static lang:Resources.Action_Install}"/> |
|
|
|
|
Content="{x:Static lang:Resources.Action_Install}" /> |
|
|
|
|
</ui:InfoBar.ActionButton> |
|
|
|
|
</ui:InfoBar> |
|
|
|
|
|
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
</TabItem> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<TabItem FontSize="18" Header="Installed Extensions" Margin="0,0,0,0"> |
|
|
|
|
|
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
|
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
RowDefinitions="Auto,*,Auto" |
|
|
|
|
RowSpacing="12" |
|
|
|
|
Margin="8"> |
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
ColumnDefinitions="*,Auto" |
|
|
|
|
<sg:SpacedGrid |
|
|
|
|
ColumnDefinitions="*,Auto" |
|
|
|
|
ColumnSpacing="8"> |
|
|
|
|
<TextBox |
|
|
|
|
<TextBox |
|
|
|
|
Classes="search" |
|
|
|
|
Margin="4, 0,0,0" |
|
|
|
|
DataContext="{Binding InstalledItemsSearchCollection}" |
|
|
|
|
Watermark="{x:Static lang:Resources.Action_Search}" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Text="{Binding Query, Mode=TwoWay}"/> |
|
|
|
|
DataContext="{Binding InstalledItemsSearchCollection}" |
|
|
|
|
Watermark="{x:Static lang:Resources.Action_Search}" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Text="{Binding Query, Mode=TwoWay}" /> |
|
|
|
|
|
|
|
|
|
<!-- Refresh Button --> |
|
|
|
|
<Button |
|
|
|
@ -248,7 +268,7 @@
|
|
|
|
|
Command="{Binding RefreshCommand}"> |
|
|
|
|
<ui:SymbolIcon FontSize="16" Symbol="Refresh" /> |
|
|
|
|
</Button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Settings / Edit Manifests Button --> |
|
|
|
|
<!--<Button |
|
|
|
|
Grid.Row="0" |
|
|
|
@ -259,8 +279,8 @@
|
|
|
|
|
<ui:SymbolIcon FontSize="16" Symbol="Settings" /> |
|
|
|
|
</Button>--> |
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
|
|
|
|
|
<ScrollViewer |
|
|
|
|
|
|
|
|
|
<ScrollViewer |
|
|
|
|
IsVisible="{Binding !IsLoading}" |
|
|
|
|
Grid.Row="1"> |
|
|
|
|
<ItemsRepeater |
|
|
|
@ -272,28 +292,27 @@
|
|
|
|
|
</ItemsRepeater.Layout> |
|
|
|
|
</ItemsRepeater> |
|
|
|
|
</ScrollViewer> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Panel |
|
|
|
|
IsVisible="{Binding IsLoading}" |
|
|
|
|
Grid.Row="1" |
|
|
|
|
> |
|
|
|
|
Grid.Row="1"> |
|
|
|
|
<ProgressBar |
|
|
|
|
Margin="32,16" |
|
|
|
|
IsIndeterminate="True" |
|
|
|
|
IsEnabled="{Binding IsLoading}" |
|
|
|
|
IsVisible="{Binding IsLoading}"/> |
|
|
|
|
IsVisible="{Binding IsLoading}" /> |
|
|
|
|
</Panel> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ui:InfoBar |
|
|
|
|
Grid.Row="2" |
|
|
|
|
IsOpen="{Binding !!SelectedInstalledItems.Count}" |
|
|
|
|
IsOpen="{Binding !!SelectedInstalledItems.Count}" |
|
|
|
|
HorizontalContentAlignment="Right" |
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
CloseButtonCommand="{Binding ClearSelection}" |
|
|
|
|
IsIconVisible="False"> |
|
|
|
|
<ui:InfoBar.Title> |
|
|
|
|
<MultiBinding StringFormat="{}{0} Selected"> |
|
|
|
|
<Binding Path="SelectedInstalledItems.Count"/> |
|
|
|
|
<Binding Path="SelectedInstalledItems.Count" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</ui:InfoBar.Title> |
|
|
|
|
<ui:InfoBar.ActionButton> |
|
|
|
@ -301,17 +320,17 @@
|
|
|
|
|
<Button |
|
|
|
|
Classes="accent" |
|
|
|
|
Command="{Binding UpdateSelectedExtensionsCommand}" |
|
|
|
|
Content="{x:Static lang:Resources.Action_Update}"/> |
|
|
|
|
Content="{x:Static lang:Resources.Action_Update}" /> |
|
|
|
|
<Button |
|
|
|
|
Command="{Binding UninstallSelectedExtensionsCommand}" |
|
|
|
|
Content="{x:Static lang:Resources.Action_Uninstall}"/> |
|
|
|
|
Content="{x:Static lang:Resources.Action_Uninstall}" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
</ui:InfoBar.ActionButton> |
|
|
|
|
</ui:InfoBar> |
|
|
|
|
|
|
|
|
|
</sg:SpacedGrid> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</TabItem> |
|
|
|
|
</TabControl.Items> |
|
|
|
|
</TabControl> |
|
|
|
|