1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 13:28:33 +00:00

Workshop - UI tweaks

This commit is contained in:
Robert 2023-09-02 09:43:42 +02:00
parent 9c6d7329a6
commit 742496b13d
4 changed files with 5 additions and 8 deletions

View File

@ -64,7 +64,7 @@
</Grid>
<!-- Info -->
<StackPanel Grid.Column="2">
<StackPanel Grid.Column="2" Margin="0 0 4 0">
<TextBlock TextAlignment="Right" Text="{CompiledBinding Entry.CreatedAt, FallbackValue=01-01-1337, Converter={StaticResource DateTimeConverter}}" />
<TextBlock TextAlignment="Right">
<avalonia:MaterialIcon Kind="Downloads" />

View File

@ -85,8 +85,7 @@
<StackPanel>
<TextBlock Theme="{StaticResource SubtitleTextBlockStyle}">Latest release</TextBlock>
<Border Classes="card-separator" />
<Button CornerRadius="8"
HorizontalAlignment="Stretch"
<Button HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Command="{CompiledBinding DownloadLatestRelease}">
<Grid ColumnDefinitions="Auto,*">

View File

@ -54,8 +54,7 @@
</Button>
<Border IsVisible="{CompiledBinding IconBitmap, Converter={x:Static ObjectConverters.IsNotNull}}"
ClipToBounds="True"
CornerRadius="12"
Background="{StaticResource ControlStrokeColorOnAccentDefault}"
CornerRadius="6"
VerticalAlignment="Center"
Width="95"
Height="95">

View File

@ -55,13 +55,12 @@ public class WorkshopService : IWorkshopService
return new IWorkshopService.WorkshopStatus(false, e.Message);
}
}
/// <param name="cancellationToken"></param>
/// <inheritdoc />
public async Task<bool> ValidateWorkshopStatus(CancellationToken cancellationToken)
{
IWorkshopService.WorkshopStatus status = await GetWorkshopStatus(cancellationToken);
if (!status.IsReachable)
if (!status.IsReachable && !cancellationToken.IsCancellationRequested)
await _router.Navigate($"workshop/offline/{status.Message}");
return status.IsReachable;
}