feat(editor): drag-and-drop для аудио и превью сцены

Добавлена загрузка файлов перетаскиванием в блоки «Аудио игры», «Аудио сцены»
и «Превью сцены»: подсветка зоны, подсказки, фильтрация по типу, импорт без диалога.

IPC и main принимают пути файлов напрямую; для Electron 41 пути получаются через
webUtils.getPathForFile в preload (File.path в renderer больше недоступен).

Улучшен dev-запуск: Vite слушает 127.0.0.1, ожидание готовности по localhost.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-09 19:22:51 +08:00
parent c8ab9dd567
commit b7e6ff6915
10 changed files with 353 additions and 52 deletions
+3 -3
View File
@@ -219,11 +219,11 @@ export type IpcInvokeMap = {
res: { currentGraphNodeId: GraphNodeId | null; currentSceneId: SceneId | null };
};
[ipcChannels.project.importMedia]: {
req: { sceneId: SceneId };
req: { sceneId: SceneId; filePaths?: string[] };
res: { project: Project; imported: MediaAsset[] };
};
[ipcChannels.project.importCampaignAudio]: {
req: Record<string, never>;
req: { filePaths?: string[] };
res: { canceled: boolean; project: Project; imported: MediaAsset[] };
};
[ipcChannels.project.updateCampaignAudios]: {
@@ -231,7 +231,7 @@ export type IpcInvokeMap = {
res: { project: Project };
};
[ipcChannels.project.importScenePreview]: {
req: { sceneId: SceneId };
req: { sceneId: SceneId; filePath?: string };
res: { project: Project; assetId: AssetId | null; background: boolean };
};
[ipcChannels.project.clearScenePreview]: {