Mount Fluxon UI inside css and js entrypoints
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
@source "../css";
|
@source "../css";
|
||||||
@source "../js";
|
@source "../js";
|
||||||
@source "../../lib/music_library_web";
|
@source "../../lib/music_library_web";
|
||||||
|
@source "../../deps/fluxon/**/*.*ex";
|
||||||
|
|
||||||
/* A Tailwind plugin that makes "hero-#{ICON}" classes available.
|
/* A Tailwind plugin that makes "hero-#{ICON}" classes available.
|
||||||
The heroicons installation itself is managed by your mix.exs */
|
The heroicons installation itself is managed by your mix.exs */
|
||||||
|
|||||||
+7
-1
@@ -21,10 +21,11 @@ import "phoenix_html";
|
|||||||
import { Socket } from "phoenix";
|
import { Socket } from "phoenix";
|
||||||
import { LiveSocket } from "phoenix_live_view";
|
import { LiveSocket } from "phoenix_live_view";
|
||||||
import topbar from "../vendor/topbar";
|
import topbar from "../vendor/topbar";
|
||||||
|
import { Hooks as FluxonHooks, DOM as FluxonDOM } from "fluxon";
|
||||||
import BarcodeScannerHook from "./barcode-scanner";
|
import BarcodeScannerHook from "./barcode-scanner";
|
||||||
import confetti from "canvas-confetti";
|
import confetti from "canvas-confetti";
|
||||||
|
|
||||||
let Hooks = {};
|
let Hooks = FluxonHooks;
|
||||||
Hooks.BarcodeScanner = BarcodeScannerHook;
|
Hooks.BarcodeScanner = BarcodeScannerHook;
|
||||||
|
|
||||||
let csrfToken = document
|
let csrfToken = document
|
||||||
@@ -34,6 +35,11 @@ let liveSocket = new LiveSocket("/live", Socket, {
|
|||||||
longPollFallbackMs: 2500,
|
longPollFallbackMs: 2500,
|
||||||
params: { _csrf_token: csrfToken },
|
params: { _csrf_token: csrfToken },
|
||||||
hooks: Hooks,
|
hooks: Hooks,
|
||||||
|
dom: {
|
||||||
|
onBeforeElUpdated(from, to) {
|
||||||
|
FluxonDOM.onBeforeElUpdated(from, to);
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// Show progress bar on live navigation and form submits
|
// Show progress bar on live navigation and form submits
|
||||||
|
|||||||
Reference in New Issue
Block a user