Skip to content

Commit 720e46d

Browse files
committed
Supersonic 0.40
1 parent c672b2b commit 720e46d

17 files changed

Lines changed: 2558 additions & 62 deletions

server/assets/js/app.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { LiveSocket } from "phoenix_live_view";
77
import topbar from "../vendor/topbar";
88

99
// Import custom modules
10-
import { initSuperSonic } from "./lib/supersonic_tau5.js";
1110
import { playAmen } from "./lib/supersonic_demo.js";
1211

1312
// Import LiveView hooks
@@ -19,16 +18,18 @@ import { Splitter } from "./lib/splitter_hook.js";
1918
import { TerminalScroll } from "./lib/terminal_scroll_hook.js";
2019
import { ConsoleInput } from "./lib/console_input_hook.js";
2120
import { HydraBackground } from "./lib/hydra_background_hook.js";
21+
import { SuperSonicPanel } from "./lib/supersonic_panel.js";
2222

2323
// Set up direct event handlers after DOM loads
2424
document.addEventListener("DOMContentLoaded", async () => {
25-
const sonic = await initSuperSonic();
26-
2725
// Direct button click handler - no LiveView roundtrip
2826
document.addEventListener("click", async (e) => {
2927
if (e.target.closest('[data-supersonic-action="play-amen"]')) {
3028
e.preventDefault();
31-
await playAmen(sonic);
29+
// SuperSonic is initialized by the panel hook and exposed as window.supersonic
30+
if (window.supersonic) {
31+
await playAmen(window.supersonic);
32+
}
3233
}
3334
});
3435
});
@@ -42,7 +43,8 @@ let Hooks = {
4243
Splitter,
4344
TerminalScroll,
4445
ConsoleInput,
45-
HydraBackground
46+
HydraBackground,
47+
SuperSonicPanel
4648
};
4749

4850
// Get CSRF token for LiveView

0 commit comments

Comments
 (0)