0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 06:10:45 -05:00

84 lines
3.7 KiB
Plaintext
Raw Permalink Normal View History

2023-08-13 20:49:03 -04:00
<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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
2024-05-21 20:15:19 +01:00
xmlns:helpers="using:SPT.Launcher.Helpers"
x:Class="SPT.Launcher.CustomControls.ModInfoCard">
2024-07-08 18:41:22 -04:00
<Border Classes="card" HorizontalAlignment="Stretch">
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,AUTO,10"
Background="{DynamicResource BackgroundBrush}"
2024-07-08 18:41:22 -04:00
Margin="2"
2023-08-13 20:49:03 -04:00
>
2024-01-26 21:40:43 -05:00
<!-- Icon stack -->
2023-08-13 20:49:03 -04:00
<StackPanel Grid.Row="1" Grid.ColumnSpan="3" Grid.Column="1"
2024-01-26 12:35:57 -05:00
VerticalAlignment="Center"
Orientation="Horizontal" Spacing="5"
>
2024-01-26 21:40:43 -05:00
<!-- Server Icon -->
2024-07-08 18:41:22 -04:00
<Path Data="{StaticResource Server}" Fill="{DynamicResource AltAccentBrush}"
2024-01-26 21:40:43 -05:00
IsVisible="{Binding IsInServer, RelativeSource={RelativeSource AncestorType=UserControl}}"
/>
<!-- Profile Icon -->
2024-07-08 18:41:22 -04:00
<Path Data="{StaticResource Profile}" Fill="{DynamicResource AltAccentBrush}"
2023-08-13 20:49:03 -04:00
IsVisible="{Binding IsInProfile, RelativeSource={RelativeSource AncestorType=UserControl}}"
/>
2023-10-11 09:45:58 -04:00
2024-01-26 21:40:43 -05:00
<!-- Info Icon -->
2023-10-11 09:45:58 -04:00
<Canvas>
<Rectangle ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}" Fill="Transparent" Height="20" Width="20"/>
2024-07-08 18:41:22 -04:00
<Path Data="{StaticResource Info}" Fill="{DynamicResource AccentBrush}"
2024-01-26 21:40:43 -05:00
ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}"
2023-10-11 09:45:58 -04:00
>
2023-08-13 20:49:03 -04:00
<Path.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsInProfile" RelativeSource="{RelativeSource AncestorType=UserControl}"/>
<Binding Path="!IsInServer" RelativeSource="{RelativeSource AncestorType=UserControl}"/>
</MultiBinding>
</Path.IsVisible>
</Path>
2023-10-11 09:45:58 -04:00
</Canvas>
2023-08-13 20:49:03 -04:00
</StackPanel>
2024-01-26 21:40:43 -05:00
<!-- Open mod url -->
<Button Grid.Row="1" Grid.Column="3" Classes="link"
IsVisible="{Binding ModUrl,
RelativeSource={RelativeSource AncestorType=UserControl},
Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding OpenUrlCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding ModUrl, RelativeSource={RelativeSource AncestorType=UserControl}}"
>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=open_link}"/>
<Path Data="{StaticResource Open}" Fill="{DynamicResource AccentBrush}"
2024-01-26 21:40:43 -05:00
IsVisible="{Binding IsInProfile, RelativeSource={RelativeSource AncestorType=UserControl}}"
/>
</StackPanel>
</Button>
<!-- Mod Name -->
2023-08-13 20:49:03 -04:00
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2"
Content="{Binding ModName, RelativeSource={RelativeSource AncestorType=UserControl}}"
/>
2024-01-26 21:40:43 -05:00
<!-- Author Text -->
2024-07-08 18:41:22 -04:00
<Label Grid.Row="3" Grid.Column="1" FontSize="12" Foreground="{DynamicResource AltAccentBrush}"
2023-08-13 20:49:03 -04:00
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=author}"
/>
2024-01-26 21:40:43 -05:00
<!-- Mod Author -->
2023-08-13 20:49:03 -04:00
<Label Grid.Row="3" Grid.Column="2" FontSize="12" HorizontalAlignment="Left"
Content="{Binding Author, RelativeSource={RelativeSource AncestorType=UserControl}}"
/>
2024-01-26 21:40:43 -05:00
<!-- Mod Version -->
2023-08-13 20:49:03 -04:00
<Label Grid.Row="3" Grid.Column="3" FontSize="12"
Content="{Binding Version, RelativeSource={RelativeSource AncestorType=UserControl}}"
2024-07-08 18:41:22 -04:00
Classes="acc"
2023-08-13 20:49:03 -04:00
/>
</Grid>
</Border>
</UserControl>