mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-12 16:50:43 -05:00
update mod info card
This commit is contained in:
parent
fa8284da52
commit
a616d21014
@ -13,21 +13,26 @@
|
||||
Background="{StaticResource AKI_Background_Dark}"
|
||||
>
|
||||
|
||||
<!-- Icon stack -->
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="3" Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal" Spacing="5"
|
||||
>
|
||||
<!-- Server Icon -->
|
||||
<Path Data="{StaticResource Server}" Fill="{StaticResource AKI_Brush_DarkGrayBlue}"
|
||||
IsVisible="{Binding IsInServer, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
/>
|
||||
IsVisible="{Binding IsInServer, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
/>
|
||||
|
||||
<!-- Profile Icon -->
|
||||
<Path Data="{StaticResource Profile}" Fill="{StaticResource AKI_Brush_DarkGrayBlue}"
|
||||
IsVisible="{Binding IsInProfile, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
/>
|
||||
|
||||
<!-- Info Icon -->
|
||||
<Canvas>
|
||||
<Rectangle ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}" Fill="Transparent" Height="20" Width="20"/>
|
||||
<Path Data="{StaticResource Alert}" Fill="{StaticResource AKI_Brush_Yellow}"
|
||||
Margin="0 2 0 0" ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}"
|
||||
<Path Data="{StaticResource Info}" Fill="DodgerBlue"
|
||||
ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}"
|
||||
>
|
||||
<Path.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
@ -39,15 +44,38 @@
|
||||
</Canvas>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 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="{StaticResource AKI_Brush_Yellow}"
|
||||
IsVisible="{Binding IsInProfile, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- Mod Name -->
|
||||
<Label Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ModName, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
/>
|
||||
|
||||
<!-- Author Text -->
|
||||
<Label Grid.Row="3" Grid.Column="1" FontSize="12" Foreground="DimGray"
|
||||
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=author}"
|
||||
/>
|
||||
|
||||
<!-- Mod Author -->
|
||||
<Label Grid.Row="3" Grid.Column="2" FontSize="12" HorizontalAlignment="Left"
|
||||
Content="{Binding Author, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
/>
|
||||
|
||||
<!-- Mod Version -->
|
||||
<Label Grid.Row="3" Grid.Column="3" FontSize="12"
|
||||
Content="{Binding Version, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
/>
|
||||
|
@ -1,3 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Input;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
@ -55,5 +57,21 @@ namespace Aki.Launcher.CustomControls
|
||||
}
|
||||
public static readonly StyledProperty<bool> IsInProfileProperty =
|
||||
AvaloniaProperty.Register<ModInfoCard, bool>(nameof(IsInProfile));
|
||||
|
||||
public string ModUrl
|
||||
{
|
||||
get => GetValue(ModUrlProperty);
|
||||
set => SetValue(ModUrlProperty, value);
|
||||
}
|
||||
public static readonly StyledProperty<string> ModUrlProperty =
|
||||
AvaloniaProperty.Register<ModInfoCard, string>(nameof(ModUrl));
|
||||
|
||||
public ICommand OpenUrlCommand
|
||||
{
|
||||
get => GetValue(OpenUrlCommandProperty);
|
||||
set => SetValue(OpenUrlCommandProperty, value);
|
||||
}
|
||||
public static readonly StyledProperty<ICommand> OpenUrlCommandProperty =
|
||||
AvaloniaProperty.Register<ModInfoCard, ICommand>(nameof(OpenUrlCommand));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user