Sockets funcionais

This commit is contained in:
JotaChina committed 2025-11-04 16:33:21 -03:00
1 parent 97c0daf697
commit d38cd9e60f
4 files changed
+89 -21

No files matched your search

+3 -2
View File
@@ -1,6 +1,6 @@
// js/socket.js — V5.5 (Toast para Sync Mode)
// -----------------------------------------------------------------------------
// -------------------relómm------------------------------------------------------
// IMPORTS & STATE
// -----------------------------------------------------------------------------
import { appState, resetProjectState } from "./state.js";
@@ -36,6 +36,7 @@ import {
import { parseMmpContent } from "./file.js";
import { renderAll, showToast } from "./ui.js"; // showToast()
import { updateStepUI, renderPatternEditor } from "./pattern/pattern_ui.js";
import { PORT_SOCK } from "./config.js";
// -----------------------------------------------------------------------------
// Gera um ID único otimista (ex: "track_1678886401000_abc123")
@@ -49,7 +50,7 @@ function generateUniqueId(prefix = "item") {
// -----------------------------------------------------------------------------
// CONFIGURAÇÃO DO SOCKET.IO
// -----------------------------------------------------------------------------
const socket = io("http://localhost:33007", {
const socket = io(`https://alice.ufsj.edu.br:${PORT_SOCK}`, {
transports: ["websocket", "polling"],
withCredentials: true,
});