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