feat(materials): show save progress overlay while optimizing images

Block the editor with a spinner and percent stages during material upsert so long image optimization is visible and non-interactive.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-25 14:50:35 +08:00
parent 9d82e74272
commit 4aa0f257d5
5 changed files with 93 additions and 10 deletions
+8
View File
@@ -109,6 +109,7 @@ export const ipcChannels = {
importZipProgress: 'project.importZipProgress',
exportZipProgress: 'project.exportZipProgress',
scenePreviewImportProgress: 'project.scenePreviewImportProgress',
materialUpsertProgress: 'project.materialUpsertProgress',
},
windows: {
openMultiWindow: 'windows.openMultiWindow',
@@ -191,6 +192,12 @@ export type ScenePreviewImportEvent = {
message?: string;
};
export type MaterialUpsertProgressEvent = {
percent: number;
stage: string;
detail?: string;
};
export type UpdaterCheckResponse =
| { outcome: 'not_packaged' }
| { outcome: 'no_license' }
@@ -231,6 +238,7 @@ export type IpcEventMap = {
[ipcChannels.project.importZipProgress]: ZipProgressEvent;
[ipcChannels.project.exportZipProgress]: ZipProgressEvent;
[ipcChannels.project.scenePreviewImportProgress]: ScenePreviewImportEvent;
[ipcChannels.project.materialUpsertProgress]: MaterialUpsertProgressEvent;
[ipcChannels.updater.progress]: UpdaterProgressEvent;
};