96 lines
5.4 KiB
XML
96 lines
5.4 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:LANCommander.Launcher.ViewModels"
|
|
xmlns:controls="using:LANCommander.Launcher.Controls"
|
|
x:Class="LANCommander.Launcher.Views.GameVersionsOverlay"
|
|
x:DataType="vm:GameVersionsViewModel"
|
|
controls:AutoFocus.IsEnabled="True">
|
|
|
|
<!-- Full-window dim backdrop -->
|
|
<Grid Background="#AA000000">
|
|
|
|
<!-- Centered card -->
|
|
<Border Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}"
|
|
Width="480"
|
|
MaxHeight="620"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
BoxShadow="0 8 40 8 #88000000">
|
|
|
|
<StackPanel Spacing="0">
|
|
|
|
<!-- Header -->
|
|
<Border Padding="20,16,20,8">
|
|
<TextBlock FontSize="15" FontWeight="SemiBold"
|
|
HorizontalAlignment="Center"
|
|
TextTrimming="CharacterEllipsis"
|
|
Text="{Binding DialogTitle}" />
|
|
</Border>
|
|
|
|
<!-- Version list -->
|
|
<Border Padding="12,4,12,0">
|
|
<ScrollViewer MaxHeight="460"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<ItemsControl ItemsSource="{Binding Versions}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:GameVersionItemViewModel">
|
|
<Border Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}"
|
|
Padding="12,10"
|
|
Margin="0,0,0,6"
|
|
CornerRadius="4">
|
|
<StackPanel Spacing="6">
|
|
<DockPanel>
|
|
<StackPanel DockPanel.Dock="Right"
|
|
Orientation="Horizontal"
|
|
Spacing="8"
|
|
VerticalAlignment="Center">
|
|
<TextBlock Text="Installed"
|
|
FontSize="11"
|
|
Opacity="0.55"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding IsInstalled}" />
|
|
<Button Content="{Binding ButtonText}"
|
|
Classes="Primary"
|
|
Click="Install_Click"
|
|
IsVisible="{Binding IsInstallable}" />
|
|
</StackPanel>
|
|
<StackPanel Spacing="2">
|
|
<TextBlock Text="{Binding VersionLabel}"
|
|
FontWeight="SemiBold"
|
|
FontSize="14" />
|
|
<TextBlock Text="{Binding CreatedOnText}"
|
|
FontSize="11"
|
|
Opacity="0.55"
|
|
IsVisible="{Binding CreatedOnKnown}" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
<TextBlock Text="{Binding ChangelogText}"
|
|
FontSize="12"
|
|
TextWrapping="Wrap"
|
|
IsVisible="{Binding HasChangelog}" />
|
|
<TextBlock FontSize="11"
|
|
Opacity="0.55"
|
|
IsVisible="{Binding HasSize}">
|
|
<Run Text="Download:" />
|
|
<Run Text="{Binding SizeText}" />
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<!-- Footer -->
|
|
<Border Padding="20,12,20,16" Classes="DialogFooter">
|
|
<Button Content="Close"
|
|
HorizontalAlignment="Right"
|
|
Click="Close_Click" />
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl>
|