mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-13 09:10:44 -05:00
149 lines
7.9 KiB
XML
149 lines
7.9 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"
|
|
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,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" />
|
|
|
|
<!-- profile name and version -->
|
|
<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 Info}"
|
|
Fill="{Binding ElementName=akiVersion, Path=Foreground}"
|
|
Margin="10 0"
|
|
IsVisible="{Binding ProfileInfo.VersionMismatch}" />
|
|
</StackPanel>
|
|
</Label>
|
|
</StackPanel>
|
|
|
|
<!-- delete profile button -->
|
|
<Button HorizontalAlignment="Right" Grid.Row="1" Grid.Column="2"
|
|
Classes="icon"
|
|
Command="{Binding RemoveProfileCommand}"
|
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}">
|
|
<Path Data="{StaticResource Delete}" Fill="IndianRed" />
|
|
</Button>
|
|
|
|
<!-- profile id button -->
|
|
<Button Content="{Binding CurrentID}" Classes="link"
|
|
Grid.Row="2" Grid.Column="1"
|
|
Command="{Binding CopyCommand}"
|
|
CommandParameter="{Binding CurrentID}" />
|
|
|
|
<!-- profile edition button -->
|
|
<Button Content="{Binding CurrentEdition}" Classes="link"
|
|
Grid.Row="3" Grid.Column="1"
|
|
Command="{Binding ChangeEditionCommand}"
|
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}" />
|
|
|
|
<!-- wipe profile checkbox -->
|
|
<CheckBox
|
|
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=wipe_on_start}"
|
|
Grid.Row="4" Grid.Column="1"
|
|
IsChecked="{Binding WipeProfileOnStart}"
|
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
|
|
IsVisible="{Binding !ProfileWipePending}" />
|
|
</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,10" ColumnDefinitions="10,Auto,*,AUTO,10"
|
|
Background="{StaticResource AKI_Background_Dark}">
|
|
|
|
<!-- server mods count text -->
|
|
<Label Grid.Row="1" Grid.Column="1">
|
|
<Label.Content>
|
|
<MultiBinding StringFormat="{}{0} {1}">
|
|
<Binding Path="ModInfoCollection.ActiveMods.Count"/>
|
|
<Binding Source="{x:Static helpers:LocalizationProvider.Instance}" Path="active_server_mods"/>
|
|
</MultiBinding>
|
|
</Label.Content>
|
|
</Label>
|
|
|
|
<!-- Show mods info view button -->
|
|
<Button Grid.Row="0" Grid.RowSpan="3" Grid.Column="3" Grid.ColumnSpan="2"
|
|
VerticalAlignment="Stretch" FontSize="18" Margin="10 0 0 0"
|
|
Command="{Binding OpenModsInfoCommand}"
|
|
Classes="icon">
|
|
<Button.Content>
|
|
<Path Data="{StaticResource Open}" Fill="{StaticResource AKI_Foreground_Light}"
|
|
VerticalAlignment="Center"
|
|
/>
|
|
</Button.Content>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- 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> |