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.
178 lines
9.4 KiB
178 lines
9.4 KiB
<controls:UserControlBase 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:viewModels="clr-namespace:StabilityMatrix.Avalonia.ViewModels" |
|
xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls" |
|
xmlns:designData="clr-namespace:StabilityMatrix.Avalonia.DesignData" |
|
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" |
|
xmlns:avalonia="clr-namespace:FluentIcons.Avalonia;assembly=FluentIcons.Avalonia" |
|
xmlns:controls1="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
|
xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core" |
|
xmlns:database="clr-namespace:StabilityMatrix.Core.Models.Database;assembly=StabilityMatrix.Core" |
|
xmlns:extensions="clr-namespace:StabilityMatrix.Core.Models.Packages.Extensions;assembly=StabilityMatrix.Core" |
|
xmlns:packageManager="clr-namespace:StabilityMatrix.Avalonia.ViewModels.PackageManager" |
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
|
x:DataType="packageManager:PackageInstallDetailViewModel" |
|
x:CompileBindings="True" |
|
d:DataContext="{x:Static designData:DesignData.PackageInstallDetailViewModel}" |
|
x:Class="StabilityMatrix.Avalonia.Views.PackageManager.PackageInstallDetailView"> |
|
|
|
<Grid ColumnDefinitions="Auto, *" |
|
RowDefinitions="Auto, *"> |
|
<controls:BetterAdvancedImage |
|
MaxHeight="300" |
|
MaxWidth="300" |
|
Margin="16,16,8,8" |
|
CornerRadius="8" |
|
VerticalAlignment="Top" |
|
Stretch="UniformToFill" |
|
Source="{Binding SelectedPackage.PreviewImageUri}" /> |
|
<StackPanel Grid.Row="0" Grid.Column="1" |
|
Margin="8" |
|
Orientation="Vertical"> |
|
|
|
<controls:HyperlinkIconButton NavigateUri="{Binding SelectedPackage.LicenseUrl}" |
|
Content="{Binding SelectedPackage.LicenseType}"/> |
|
|
|
<ToggleSwitch OnContent="{x:Static lang:Resources.Label_Releases}" |
|
OffContent="{x:Static lang:Resources.Label_Branches}" |
|
IsVisible="{Binding ShowReleaseMode}" |
|
IsChecked="{Binding IsReleaseMode}" |
|
Margin="8,0,8,8" /> |
|
|
|
<!-- Version Selector --> |
|
<Label Margin="8,0" |
|
FontSize="14" |
|
FontWeight="Light" |
|
Content="{Binding ReleaseLabelText}" /> |
|
|
|
<controls1:FAComboBox |
|
ItemsSource="{Binding AvailableVersions}" |
|
MinWidth="250" |
|
HorizontalAlignment="Stretch" |
|
VerticalAlignment="Stretch" |
|
FontSize="16" |
|
Margin="8,0,8,8" |
|
SelectedItem="{Binding SelectedVersion}"> |
|
<controls1:FAComboBox.ItemTemplate> |
|
<DataTemplate DataType="{x:Type models:PackageVersion}"> |
|
<TextBlock |
|
Name="NameTextBlock" |
|
VerticalAlignment="Center" |
|
Text="{Binding TagName}" /> |
|
</DataTemplate> |
|
</controls1:FAComboBox.ItemTemplate> |
|
</controls1:FAComboBox> |
|
|
|
<Label Margin="8,0" |
|
FontSize="14" |
|
FontWeight="Light" |
|
ToolTip.Tip="This will also be the folder name" |
|
Content="{x:Static lang:Resources.Label_DisplayName}" /> |
|
<TextBox MinWidth="250" |
|
Margin="8,0" |
|
FontSize="16" |
|
FontWeight="SemiLight" |
|
VerticalAlignment="Stretch" |
|
VerticalContentAlignment="Center" |
|
ToolTip.Tip="This will also be the folder name" |
|
Text="{Binding InstallName, Mode=TwoWay}" /> |
|
<Label Margin="8,0" |
|
Content="{Binding FullInstallPath}" Foreground="LightGray" /> |
|
|
|
<StackPanel Orientation="Horizontal" |
|
Margin="8,8,8,8" |
|
IsVisible="{Binding ShowDuplicateWarning}"> |
|
<avalonia:SymbolIcon |
|
Foreground="{DynamicResource ThemeRedColor}" |
|
Margin="0,0,8,0" |
|
Symbol="Alert" /> |
|
<TextBlock |
|
Foreground="{DynamicResource ThemeRedColor}" |
|
TextAlignment="Left" |
|
TextWrapping="Wrap"> |
|
<Run Text="{x:Static lang:Resources.Label_InstallationWithThisNameExists}" /> |
|
<LineBreak /> |
|
<Run Text="{x:Static lang:Resources.Label_PleaseChooseDifferentName}" /> |
|
</TextBlock> |
|
</StackPanel> |
|
|
|
<Expander Header="{x:Static lang:Resources.Label_AdvancedOptions}" |
|
FontSize="16" |
|
HorizontalAlignment="Stretch" |
|
Margin="8"> |
|
<Grid ColumnDefinitions="*, *, *" |
|
RowDefinitions="Auto, Auto" |
|
Margin="8,0"> |
|
|
|
<Label Grid.Row="0" Grid.Column="0" |
|
Content="{x:Static lang:Resources.Label_SharedModelFolderStrategy}" |
|
Margin="0,0,0,4" /> |
|
<controls1:FAComboBox Grid.Row="1" Grid.Column="0" |
|
ItemsSource="{Binding SelectedPackage.AvailableSharedFolderMethods}" |
|
MinWidth="150" |
|
MinHeight="38" |
|
SelectedItem="{Binding SelectedSharedFolderMethod}"> |
|
<controls1:FAComboBox.ItemTemplate> |
|
<DataTemplate DataType="{x:Type models:SharedFolderMethod}"> |
|
<TextBlock |
|
Margin="8,4,0,4" |
|
Text="{Binding }" /> |
|
</DataTemplate> |
|
</controls1:FAComboBox.ItemTemplate> |
|
</controls1:FAComboBox> |
|
|
|
<Label Grid.Row="0" Grid.Column="1" |
|
Content="{x:Static lang:Resources.Label_PyTorchVersion}" |
|
IsVisible="{Binding ShowTorchVersionOptions}" |
|
Margin="0,0,0,4" /> |
|
<controls1:FAComboBox Grid.Row="1" Grid.Column="1" |
|
ItemsSource="{Binding SelectedPackage.AvailableTorchVersions}" |
|
MinWidth="150" |
|
MinHeight="38" |
|
IsVisible="{Binding ShowTorchVersionOptions}" |
|
SelectedItem="{Binding SelectedTorchVersion}"> |
|
<controls1:FAComboBox.ItemTemplate> |
|
<DataTemplate DataType="{x:Type models:TorchVersion}"> |
|
<TextBlock |
|
Margin="8,4,0,4" |
|
Text="{Binding }" /> |
|
</DataTemplate> |
|
</controls1:FAComboBox.ItemTemplate> |
|
</controls1:FAComboBox> |
|
|
|
<Label Grid.Row="0" Grid.Column="2" |
|
Content="{x:Static lang:Resources.Label_Commit}" |
|
Margin="0,0,0,4" |
|
IsVisible="{Binding !IsReleaseMode}" /> |
|
<controls1:FAComboBox Grid.Row="1" Grid.Column="2" |
|
IsVisible="{Binding !IsReleaseMode}" |
|
ItemsSource="{Binding AvailableCommits}" |
|
MinWidth="150" |
|
MinHeight="38" |
|
SelectedItem="{Binding SelectedCommit}"> |
|
<controls1:FAComboBox.ItemTemplate> |
|
<DataTemplate DataType="{x:Type database:GitCommit}"> |
|
<TextBlock |
|
Margin="8,4,0,4" |
|
Name="NameTextBlock" |
|
Text="{Binding ShortSha}" /> |
|
</DataTemplate> |
|
</controls1:FAComboBox.ItemTemplate> |
|
</controls1:FAComboBox> |
|
</Grid> |
|
</Expander> |
|
|
|
<Button Classes="success" |
|
Margin="8,8,8,8" |
|
HorizontalAlignment="Stretch" |
|
VerticalAlignment="Stretch" |
|
FontSize="16" |
|
Command="{Binding InstallCommand}" |
|
Content="{x:Static lang:Resources.Action_Install}" /> |
|
|
|
</StackPanel> |
|
</Grid> |
|
|
|
</controls:UserControlBase>
|
|
|