MCDO fixes 2

implement RestoreThenUpload for charadata

cleanup, actually show success/failure

actually sort chara data list lmao

add shared character data sets display to main ui (partial)

increase size of mcdo table slightly

fix selecting last new entry
This commit is contained in:
Stanley Dimant
2025-02-08 00:14:16 +01:00
committed by Loporrit
parent 8f9528879d
commit 27bbe96618
6 changed files with 113 additions and 32 deletions

View File

@@ -1,4 +1,6 @@
using MareSynchronos.API.Dto.CharaData;
using MareSynchronos.API.Data;
using MareSynchronos.API.Dto.CharaData;
using MareSynchronos.Services.CharaData.Models;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Extensions.Logging;
@@ -69,6 +71,22 @@ public partial class ApiController
}
}
public async Task<CharaDataFullDto?> CharaDataAttemptRestore(string id)
{
if (!IsConnected) return null;
try
{
Logger.LogDebug("Attempting to restore chara data {id}", id);
return await _mareHub!.InvokeAsync<CharaDataFullDto?>(nameof(CharaDataAttemptRestore), id).ConfigureAwait(false);
}
catch (Exception ex)
{
Logger.LogWarning(ex, "Failed to restore chara data for {id}", id);
return null;
}
}
public async Task<List<CharaDataFullDto>> CharaDataGetOwn()
{
if (!IsConnected) return [];