mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-13 06:50:43 -05:00
62 lines
3.7 KiB
XML
62 lines
3.7 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:SPT.Launcher.Helpers"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="SPT.Launcher.CustomControls.ProfileCard">
|
|
<Border Classes="card">
|
|
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,10" Margin="2"
|
|
Background="{DynamicResource BackgroundBrush}">
|
|
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
|
|
<Label Content="{Binding $parent[UserControl].ProfileInfo.Username}" Margin="5 0" />
|
|
|
|
<!-- profile name and version -->
|
|
<Label x:Name="SPTVersion"
|
|
Background="Transparent"
|
|
ToolTip.Tip="{Binding $parent[UserControl].ProfileInfo.MismatchMessage}"
|
|
Classes.versionMismatch="{Binding $parent[UserControl].ProfileInfo.VersionMismatch}"
|
|
Classes.acc="{Binding !$parent[UserControl].ProfileInfo.VersionMismatch}"
|
|
>
|
|
<StackPanel Orientation="Horizontal" Background="Transparent">
|
|
<TextBlock Text="{Binding $parent[UserControl].ProfileInfo.SPT.version}" />
|
|
<Path Data="{StaticResource Info}"
|
|
Fill="{Binding ElementName=SPTVersion, Path=Foreground}"
|
|
Margin="10 0"
|
|
IsVisible="{Binding $parent[UserControl].ProfileInfo.VersionMismatch}" />
|
|
</StackPanel>
|
|
</Label>
|
|
</StackPanel>
|
|
|
|
<!-- delete profile button -->
|
|
<Button HorizontalAlignment="Right" Grid.Row="1" Grid.Column="2"
|
|
Classes="icon"
|
|
Command="{Binding $parent[UserControl].RemoveProfileCommand}"
|
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}">
|
|
<Path Data="{StaticResource Delete}" Fill="IndianRed" />
|
|
</Button>
|
|
|
|
<!-- profile id button -->
|
|
<Button Content="{Binding $parent[UserControl].CurrentId}" Classes="ulink"
|
|
Grid.Row="2" Grid.Column="1"
|
|
Command="{Binding $parent[UserControl].CopyCommand}"
|
|
CommandParameter="{Binding $parent[UserControl].CurrentId}" />
|
|
|
|
<!-- profile edition button -->
|
|
<Button Content="{Binding $parent[UserControl].CurrentEdition}" Classes="ulink"
|
|
Grid.Row="3" Grid.Column="1"
|
|
Command="{Binding $parent[UserControl].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" Grid.ColumnSpan="2"
|
|
IsChecked="{Binding $parent[UserControl].WipeProfileOnStart}"
|
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
|
|
IsVisible="{Binding !$parent[UserControl].ProfileWipePending}"
|
|
/>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|