mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Workshop - Fix library virtualization
Workshop - Tweak screenshots scaling
This commit is contained in:
1 parent
28edabae89
commit
8b4b5d8810
13 files changed
+92
-37
No files matched your search
@@ -8,13 +8,9 @@
|
||||
x:Class="Artemis.UI.Screens.Workshop.Entries.Details.EntryImageView"
|
||||
x:DataType="details:EntryImageViewModel">
|
||||
<Border Classes="card" Padding="0">
|
||||
<Grid RowDefinitions="230,*">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Border Grid.Row="0" ClipToBounds="True" CornerRadius="4 4 0 0" Padding="0">
|
||||
<Rectangle RenderOptions.BitmapInterpolationMode="HighQuality">
|
||||
<Rectangle.Fill>
|
||||
<ImageBrush asyncImageLoader:ImageBrushLoader.Source="{CompiledBinding ThumbnailUrl}" Stretch="UniformToFill" />
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Image asyncImageLoader:ImageLoader.Source="{CompiledBinding ThumbnailUrl}" Stretch="Uniform" HorizontalAlignment="Stretch" MaxHeight="250" />
|
||||
</Border>
|
||||
<Border Grid.Row="1" ClipToBounds="True" CornerRadius="0 0 4 4" Background="{DynamicResource ControlFillColorDefaultBrush}">
|
||||
<StackPanel Margin="16">
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
x:Class="Artemis.UI.Screens.Workshop.Entries.Details.EntryImagesDialogView"
|
||||
x:DataType="details:EntryImagesDialogViewModel"
|
||||
Margin="-25 -63 -25 -25">
|
||||
<Image asyncImageLoader:ImageLoader.Source="{CompiledBinding CurrentImage.Url}" Stretch="None"/>
|
||||
<Image asyncImageLoader:ImageLoader.Source="{CompiledBinding CurrentImage.Url}" Stretch="Uniform"/>
|
||||
</UserControl>
|
||||
@@ -8,6 +8,7 @@ using Artemis.UI.Shared.Services.Builders;
|
||||
using Artemis.UI.Shared.Utilities;
|
||||
using Artemis.WebClient.Workshop;
|
||||
using Artemis.WebClient.Workshop.Handlers.InstallationHandlers;
|
||||
using Artemis.WebClient.Workshop.Services;
|
||||
using Humanizer;
|
||||
using ReactiveUI;
|
||||
|
||||
@@ -32,6 +33,8 @@ public class EntryReleasesViewModel : ViewModelBase
|
||||
public IGetEntryById_Entry Entry { get; }
|
||||
public ReactiveCommand<Unit, Unit> DownloadLatestRelease { get; }
|
||||
|
||||
public Func<InstalledEntry, Task>? OnInstallationFinished { get; set; }
|
||||
|
||||
private async Task ExecuteDownloadLatestRelease(CancellationToken cancellationToken)
|
||||
{
|
||||
if (Entry.LatestRelease == null)
|
||||
@@ -46,8 +49,12 @@ public class EntryReleasesViewModel : ViewModelBase
|
||||
|
||||
IEntryInstallationHandler installationHandler = _factory.CreateHandler(Entry.EntryType);
|
||||
EntryInstallResult result = await installationHandler.InstallAsync(Entry, Entry.LatestRelease, new Progress<StreamProgress>(), cancellationToken);
|
||||
if (result.IsSuccess)
|
||||
if (result.IsSuccess && result.Entry != null)
|
||||
{
|
||||
if (OnInstallationFinished != null)
|
||||
await OnInstallationFinished(result.Entry);
|
||||
_notificationService.CreateNotification().WithTitle($"{Entry.EntryType.Humanize(LetterCasing.Sentence)} installed").WithSeverity(NotificationSeverity.Success).Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
_notificationService.CreateNotification()
|
||||
|
||||
Reference in new issue
Block a user