Added live updates to spools in client

Will automatically refresh the list and show pages if any of the shown spools are updated in the backend.
On the edit page, it will warn you if the spool has been updated since you opened the page.
This commit is contained in:
Donkie
2023-10-15 15:28:08 +02:00
parent bec130d038
commit 0fab369518
6 changed files with 207 additions and 22 deletions

View File

@@ -22,6 +22,7 @@ import { languages } from "./i18n";
import loadable from "@loadable/component";
import SpoolmanNotificationProvider from "./components/notificationProvider";
import { SpoolmanLayout } from "./components/layout";
import liveProvider from "./components/liveProvider";
interface PageProps {
resource: "spools" | "filaments" | "vendors";
@@ -84,6 +85,7 @@ function App() {
notificationProvider={SpoolmanNotificationProvider}
i18nProvider={i18nProvider}
routerProvider={routerBindings}
liveProvider={liveProvider(import.meta.env.VITE_APIURL)}
resources={[
{
name: "spool",