mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-09 01:32:29 +08:00
feat: show success toast after diagram download completes
- Add optional successMessage parameter to saveDiagramToFile() - Show toast after file download is initiated, not when dialog opens - Add i18n strings for success message (en/ja/zh) This is the correct implementation for issue #479 - showing feedback after the actual save completes rather than when the save dialog opens.
This commit is contained in:
@@ -432,7 +432,12 @@ export function ChatInput({
|
||||
open={showSaveDialog}
|
||||
onOpenChange={setShowSaveDialog}
|
||||
onSave={(filename, format) =>
|
||||
saveDiagramToFile(filename, format, sessionId)
|
||||
saveDiagramToFile(
|
||||
filename,
|
||||
format,
|
||||
sessionId,
|
||||
dict.save.savedSuccessfully,
|
||||
)
|
||||
}
|
||||
defaultFilename={`diagram-${new Date()
|
||||
.toISOString()
|
||||
|
||||
Reference in New Issue
Block a user