Workshop - Improved workshop entry compatibility handling

Workshop - Added minimum Artemis version to releases
This commit is contained in:
Robert committed 2025-12-22 20:13:49 +01:00
1 parent 86f2426f37
commit 6bf5a11108
21 files changed
+174 -45

No files matched your search

@@ -29,7 +29,8 @@ public interface IWindowService : IArtemisSharedUIService
/// </summary>
/// <param name="title">The title of the dialog</param>
/// <param name="exception">The exception to display</param>
void ShowExceptionDialog(string title, Exception exception);
/// <param name="customMessage"></param>
void ShowExceptionDialog(string title, Exception exception, string? customMessage = null);
/// <summary>
/// Creates a view model instance of type <typeparamref name="TViewModel" /> and shows its corresponding View as a
@@ -22,9 +22,7 @@
<StackPanel Grid.Row="2" Margin="20">
<TextBlock Classes="h3">Awww :(</TextBlock>
<TextBlock>
It looks like Artemis ran into an unexpected error. If this keeps happening feel free to hit us up on Discord.
</TextBlock>
<TextBlock Text="{CompiledBinding Message}"/>
</StackPanel>
<Grid Grid.Row="3" ColumnDefinitions="*,Auto" RowDefinitions="*,Auto">
@@ -9,15 +9,17 @@ internal class ExceptionDialogViewModel : DialogViewModelBase<object>
{
private readonly INotificationService _notificationService;
public ExceptionDialogViewModel(string title, Exception exception, INotificationService notificationService)
public ExceptionDialogViewModel(string title, Exception exception, string? customMessage, INotificationService notificationService)
{
_notificationService = notificationService;
Title = $"Artemis | {title}";
Message = customMessage ?? "It looks like Artemis ran into an unexpected error. If this keeps happening feel free to hit us up on Discord.";
Exception = exception;
}
public string Title { get; }
public string Message { get; }
public Exception Exception { get; }
public async Task CopyException()
@@ -125,7 +125,7 @@ internal class WindowService : IWindowService
return await window.ShowDialog<TResult>(parent);
}
public void ShowExceptionDialog(string title, Exception exception)
public void ShowExceptionDialog(string title, Exception exception, string? customMessage = null)
{
if (_exceptionDialogOpen)
return;
@@ -136,7 +136,7 @@ internal class WindowService : IWindowService
{
try
{
await ShowDialogAsync(new ExceptionDialogViewModel(title, exception, _container.Resolve<INotificationService>()));
await ShowDialogAsync(new ExceptionDialogViewModel(title, exception, customMessage, _container.Resolve<INotificationService>()));
}
finally
{