mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Core - Prevent double-shutdowns which can cause crashes
Storage - Make the DbContext factory thread safe Workshop - Replaced pagination with infinite scroll Workshop - Added supported platforms and admin requirements to plugin details page
This commit is contained in:
1 parent
7e981a61d3
commit
da3d47d7b8
27 files changed
+491
-331
No files matched your search
@@ -4,6 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight"
|
||||
xmlns:plugins="clr-namespace:Artemis.UI.Screens.Workshop.Plugins"
|
||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Workshop.Plugins.PluginDetailsView"
|
||||
x:DataType="plugins:PluginDetailsViewModel">
|
||||
@@ -12,13 +13,29 @@
|
||||
<Border Classes="card" VerticalAlignment="Top">
|
||||
<ContentControl Content="{CompiledBinding EntryInfoViewModel}" />
|
||||
</Border>
|
||||
|
||||
<Border Classes="card" VerticalAlignment="Top" IsVisible="{CompiledBinding Entry.PluginInfo, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<StackPanel>
|
||||
<TextBlock>Admin required</TextBlock>
|
||||
<TextBlock Text="Yes" IsVisible="{CompiledBinding Entry.PluginInfo.RequiresAdmin}" />
|
||||
<TextBlock Text="No" IsVisible="{CompiledBinding !Entry.PluginInfo.RequiresAdmin}" />
|
||||
|
||||
<TextBlock Margin="0 15 0 5">Supported platforms</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<avalonia:MaterialIcon Kind="MicrosoftWindows" IsVisible="{CompiledBinding Entry.PluginInfo.SupportsWindows}" />
|
||||
<avalonia:MaterialIcon Kind="Linux" IsVisible="{CompiledBinding Entry.PluginInfo.SupportsLinux}" />
|
||||
<avalonia:MaterialIcon Kind="Apple" IsVisible="{CompiledBinding Entry.PluginInfo.SupportsOSX}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Classes="card" VerticalAlignment="Top" IsVisible="{CompiledBinding Entry.LatestRelease, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<ContentControl Content="{CompiledBinding EntryReleasesViewModel}" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer Grid.Row="1" Grid.Column="1">
|
||||
<StackPanel Margin="10 0" Spacing="10">
|
||||
<StackPanel Margin="10 0" Spacing="10">
|
||||
<Border Classes="card">
|
||||
<mdxaml:MarkdownScrollViewer Markdown="{CompiledBinding Entry.Description}" MarkdownStyleName="FluentAvalonia">
|
||||
<mdxaml:MarkdownScrollViewer.Styles>
|
||||
@@ -41,4 +58,4 @@
|
||||
|
||||
<ContentControl Grid.Row="1" Grid.Column="2" IsVisible="{CompiledBinding Entry.Images.Count}" Content="{CompiledBinding EntryImagesViewModel}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -28,7 +28,7 @@ public partial class PluginDetailsViewModel : RoutableScreen<WorkshopDetailParam
|
||||
private readonly Func<IEntryDetails, EntryReleasesViewModel> _getEntryReleasesViewModel;
|
||||
private readonly Func<IEntryDetails, EntryImagesViewModel> _getEntryImagesViewModel;
|
||||
private readonly Func<IEntrySummary, EntryListItemViewModel> _getEntryListViewModel;
|
||||
[Notify] private IEntryDetails? _entry;
|
||||
[Notify] private IGetPluginEntryById_Entry? _entry;
|
||||
[Notify] private EntryInfoViewModel? _entryInfoViewModel;
|
||||
[Notify] private EntryReleasesViewModel? _entryReleasesViewModel;
|
||||
[Notify] private EntryImagesViewModel? _entryImagesViewModel;
|
||||
@@ -58,7 +58,7 @@ public partial class PluginDetailsViewModel : RoutableScreen<WorkshopDetailParam
|
||||
|
||||
private async Task GetEntry(long entryId, CancellationToken cancellationToken)
|
||||
{
|
||||
IOperationResult<IGetEntryByIdResult> result = await _client.GetEntryById.ExecuteAsync(entryId, cancellationToken);
|
||||
IOperationResult<IGetPluginEntryByIdResult> result = await _client.GetPluginEntryById.ExecuteAsync(entryId, cancellationToken);
|
||||
if (result.IsErrorResult())
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user