mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 03:27:41 +00:00
Added progress messages and quick access to exported files (#1112)
This commit is contained in:
1 parent
7f72da628e
commit
e0d8e18f34
33 files changed
+1130
-23
No files matched your search
@@ -157,13 +157,19 @@ public static class PandocExport
|
||||
if (!pandocState.IsAvailable)
|
||||
return false;
|
||||
|
||||
//
|
||||
// The export runs from here on. Before, the user may still be looking at the dialog which
|
||||
// offers to install Pandoc, and a notification that we save would be wrong there:
|
||||
//
|
||||
await using var feedback = new FileExportFeedback();
|
||||
feedback.ShowRunning(response.SaveFilePath);
|
||||
if (!await ConvertAsync(rustService, markdownText, response.SaveFilePath, format))
|
||||
{
|
||||
await MessageBus.INSTANCE.SendError(new(Icons.Material.Filled.Cancel, TB("The export failed.")));
|
||||
return false;
|
||||
}
|
||||
|
||||
await MessageBus.INSTANCE.SendSuccess(new(Icons.Material.Filled.CheckCircle, TB("The export succeeded.")));
|
||||
await feedback.SucceededAsync(Icons.Material.Filled.CheckCircle, TB("The export succeeded."), response.SaveFilePath, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user