melhorando a leitura de projetos no mmpCreator
This commit is contained in:
1 parent
71001600bb
commit
6dd0aa9fb4
2 files changed
+170
-1
No files matched your search
@@ -36,6 +36,7 @@ import {
|
||||
|
||||
import {
|
||||
parseMmpContent,
|
||||
parseBeatIndexJson,
|
||||
handleLocalProjectReset,
|
||||
syncPatternStateToServer,
|
||||
generateXmlFromStateExported,
|
||||
@@ -1086,6 +1087,28 @@ async function handleActionBroadcast(action) {
|
||||
break;
|
||||
}
|
||||
|
||||
case "LOAD_BEAT_INDEX": {
|
||||
isLoadingProject = true;
|
||||
showToast("📂 Carregando beat index...", "info");
|
||||
|
||||
if (window.ROOM_NAME) {
|
||||
sessionStorage.removeItem(`temp_state_${window.ROOM_NAME}`);
|
||||
}
|
||||
|
||||
try {
|
||||
await parseBeatIndexJson(action.data);
|
||||
renderAll();
|
||||
showToast("🎵 Beat index carregado", "success");
|
||||
saveStateToSession();
|
||||
} catch (e) {
|
||||
console.error("Erro LOAD_BEAT_INDEX:", e);
|
||||
showToast("❌ Erro ao carregar beat index", "error");
|
||||
}
|
||||
|
||||
isLoadingProject = false;
|
||||
break;
|
||||
}
|
||||
|
||||
case "UPDATE_AUDIO_CLIP": {
|
||||
try {
|
||||
if (action.props?.__operation === "slice") {
|
||||
|
||||
Reference in new issue
Block a user