mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-13 08:50:43 -05:00
170 lines
7.2 KiB
XML
170 lines
7.2 KiB
XML
<UserControl 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:helpers="using:Aki.Launcher.Helpers"
|
|
xmlns:cvt="using:Aki.Launcher.Converters"
|
|
xmlns:cc="using:Aki.Launcher.CustomControls"
|
|
xmlns:launcher="using:Aki.Launcher.Models.Aki"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="Aki.Launcher.Views.ProfileView">
|
|
|
|
<UserControl.Resources>
|
|
<cvt:ImageSourceConverter x:Key="imageSourceCvt"/>
|
|
</UserControl.Resources>
|
|
|
|
<Grid RowDefinitions="10,AUTO,10,AUTO,10,*,10,AUTO,10" ColumnDefinitions="10,AUTO,10,*,10">
|
|
|
|
<!-- profile info -->
|
|
<Border Grid.Row="1" Grid.Column="1" CornerRadius="5"
|
|
BorderBrush="{StaticResource AKI_Background_Dark}"
|
|
BorderThickness="5">
|
|
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,10"
|
|
Background="{StaticResource AKI_Background_Dark}"
|
|
>
|
|
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
|
|
<Label Content="{Binding CurrentUsername}" Margin="5 0"/>
|
|
|
|
<!--Grid.Row="1" Grid.Column="4"-->
|
|
<Label x:Name="akiVersion"
|
|
Background="Transparent"
|
|
ToolTip.Tip="{Binding ProfileInfo.MismatchMessage}"
|
|
Classes.versionMismatch="{Binding ProfileInfo.VersionMismatch}"
|
|
>
|
|
<StackPanel Orientation="Horizontal" Background="Transparent">
|
|
<TextBlock Text="{Binding ProfileInfo.Aki.version}"/>
|
|
<Path Data="{StaticResource Alert}" Fill="{Binding ElementName=akiVersion, Path=Foreground}"
|
|
Margin="10 0"
|
|
IsVisible="{Binding ProfileInfo.VersionMismatch}"
|
|
/>
|
|
</StackPanel>
|
|
</Label>
|
|
</StackPanel>
|
|
|
|
<Button HorizontalAlignment="Right" Grid.Row="1" Grid.Column="2"
|
|
Classes="icon"
|
|
Command="{Binding RemoveProfileCommand}"
|
|
>
|
|
<Path Data="{StaticResource Delete}" Fill="IndianRed"/>
|
|
</Button>
|
|
<Button Content="{Binding CurrentID}" Classes="link"
|
|
Grid.Row="2" Grid.Column="1"
|
|
Command="{Binding CopyCommand}"
|
|
CommandParameter="{Binding CurrentID}"/>
|
|
<Button Content="{Binding CurrentEdition}" Classes="link"
|
|
Grid.Row="3" Grid.Column="1"
|
|
Command="{Binding ChangeEditionCommand}"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Total Mods Info -->
|
|
<Border Grid.Row="3" Grid.Column="1" CornerRadius="5"
|
|
BorderBrush="{StaticResource AKI_Background_Dark}"
|
|
BorderThickness="5" IsVisible="{Binding ModInfoCollection.HasMods}"
|
|
>
|
|
<Grid RowDefinitions="10,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,AUTO,AUTO,AUTO,10"
|
|
Background="{StaticResource AKI_Background_Dark}">
|
|
<Label Grid.Row="1" Grid.Column="1" Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=server_mods}"
|
|
/>
|
|
<Label Grid.Row="2" Grid.Column="1" Content="{Binding ModInfoCollection.ServerModsCount}"
|
|
/>
|
|
<Label Grid.Row="1" Grid.Column="3" Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=profile_mods}"
|
|
/>
|
|
<Path Grid.Row="1" Grid.Column="4" Margin="10 4 0 0" IsVisible="{Binding ModInfoCollection.HasProfileOnlyMods}"
|
|
Data="{StaticResource Alert}" Fill="{StaticResource AKI_Brush_Yellow}"
|
|
/>
|
|
<Label Grid.Row="2" Grid.Column="3" Content="{Binding ModInfoCollection.ProfileModsCount}"
|
|
/>
|
|
<Button Grid.Row="0" Grid.RowSpan="4" Grid.Column="5" Grid.ColumnSpan="2"
|
|
VerticalAlignment="Stretch" FontSize="18" Margin="10 0 0 0"
|
|
Command="{Binding ToggleModsListCommand}"
|
|
Classes="icon"
|
|
>
|
|
<Button.Content>
|
|
<DockPanel LastChildFill="True">
|
|
<Path Data="{StaticResource Visible}" Fill="{StaticResource AKI_Foreground_Light}"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding !ModsListIsVisible}"
|
|
/>
|
|
<Path Data="{StaticResource Hide}" Fill="{StaticResource AKI_Foreground_Light}"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding ModsListIsVisible}"
|
|
/>
|
|
</DockPanel>
|
|
</Button.Content>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Mods List -->
|
|
<ScrollViewer Grid.Row="1" Grid.RowSpan="5" Grid.Column="3" IsVisible="{Binding ModsListIsVisible}">
|
|
<ItemsControl Items="{Binding ModInfoCollection.Mods}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type launcher:AkiMod}">
|
|
<cc:ModInfoCard ModName="{Binding Name}"
|
|
Author="{Binding Author}"
|
|
Version="{Binding Version}"
|
|
IsInServer="{Binding InServer}"
|
|
IsInProfile="{Binding InProfile}"
|
|
Margin="0 0 0 10"
|
|
/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<!-- Bottom bar -->
|
|
<Border Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="3" CornerRadius="5"
|
|
BorderBrush="{StaticResource AKI_Background_Dark}"
|
|
BorderThickness="5"
|
|
>
|
|
<DockPanel Background="{StaticResource AKI_Background_Dark}">
|
|
|
|
<StackPanel Orientation="Horizontal"
|
|
HorizontalAlignment="Stretch"
|
|
Spacing="10"
|
|
IsVisible="{Binding ProfileInfo.HasData}"
|
|
>
|
|
<Grid RowDefinitions="AUTO,AUTO" ColumnDefinitions="AUTO,AUTO">
|
|
<Image Source="{Binding SideImage.Path, Converter={StaticResource imageSourceCvt}}"
|
|
Grid.RowSpan="2" Height="40" Margin="10 0"/>
|
|
<Label Content="{Binding ProfileInfo.Nickname}" Grid.Row="0" Grid.Column="2"/>
|
|
<Label Content="{Binding ProfileInfo.Side}" Grid.Row="1" Grid.Column="2"/>
|
|
</Grid>
|
|
<Label Content="{Binding ProfileInfo.Level}" VerticalAlignment="Center"
|
|
FontSize="22"/>
|
|
<ProgressBar Value="{Binding ProfileInfo.XPLevelProgress}"/>
|
|
<StackPanel>
|
|
<Label Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=next_level_in}"
|
|
HorizontalAlignment="Center"
|
|
/>
|
|
<Label Content="{Binding ProfileInfo.RemainingExp, StringFormat={}{0} xp}"
|
|
HorizontalAlignment="Center"
|
|
/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
|
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=start_game}"
|
|
HorizontalAlignment="Right"
|
|
VerticalContentAlignment="Center"
|
|
VerticalAlignment="Stretch"
|
|
DockPanel.Dock="Right"
|
|
Command="{Binding StartGameCommand}"
|
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
|
|
Classes="yellow"
|
|
/>
|
|
|
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=logout}"
|
|
Command="{Binding LogoutCommand}"
|
|
Margin="10 0"
|
|
Classes="link"
|
|
DockPanel.Dock="Right"
|
|
HorizontalAlignment="Right"
|
|
/>
|
|
|
|
</DockPanel>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl>
|