Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Adds a global titlebar drag zone for pages without a header drag region, while leaving buttons, inputs, menus, sliders, resize handles and native drag regions untouched.
76 lines
2.5 KiB
TypeScript
76 lines
2.5 KiB
TypeScript
// import { EasterEgg } from "@/components/utils/easterEgg";
|
|
import { CssBaseline } from "@mui/material";
|
|
import { ThemeProvider } from "@mui/material/styles";
|
|
import { createRootRouteWithContext, Outlet } from "@tanstack/react-router";
|
|
import { SnackbarProvider } from "notistack";
|
|
import React from "react";
|
|
import { AppBar } from "@/components/appBar/appBar";
|
|
// import NProgress from "@/components/nProgress";
|
|
import AudioPlayer from "@/components/playback/audioPlayer";
|
|
|
|
import "../styles/global.scss";
|
|
import { theme } from "@/theme";
|
|
|
|
// Fonts
|
|
import "@fontsource-variable/jetbrains-mono";
|
|
import "@fontsource-variable/noto-sans";
|
|
import "@fontsource-variable/plus-jakarta-sans";
|
|
|
|
import "material-symbols/rounded.scss";
|
|
import type { Api, Jellyfin } from "@jellyfin/sdk";
|
|
import type { UserDto } from "@jellyfin/sdk/lib/generated-client";
|
|
import type { QueryClient } from "@tanstack/react-query";
|
|
import { DndProvider } from "react-dnd";
|
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
import Backdrop from "@/components/backdrop";
|
|
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
|
import OverlayScrollbar from "@/components/overlayScrollbar";
|
|
import PlaybackSync from "@/components/playback/PlaybackSync";
|
|
import RemoteControlDialog from "@/components/remoteControl";
|
|
import RouterLoading from "@/components/routerLoading";
|
|
import Search from "@/components/search";
|
|
import Updater from "@/components/updater";
|
|
import WindowChrome from "@/components/windowControls/windowChrome";
|
|
import WindowDrag from "@/components/windowControls/windowDrag";
|
|
import WindowResizeHandles from "@/components/windowControls/resizeHandles";
|
|
|
|
type ApiContext = {
|
|
api: Api | undefined;
|
|
createApi: (serverAddress: string, accessToken: string | undefined) => void;
|
|
user: UserDto | null | undefined;
|
|
jellyfinSDK: Jellyfin;
|
|
fetchCurrentUser: (api: Api | undefined) => Promise<void>;
|
|
queryClient: QueryClient;
|
|
};
|
|
|
|
export const Route = createRootRouteWithContext<ApiContext>()({
|
|
component: () => {
|
|
return (
|
|
<DndProvider backend={HTML5Backend}>
|
|
<ThemeProvider theme={theme}>
|
|
<SnackbarProvider maxSnack={5}>
|
|
<CssBaseline />
|
|
{/* <NProgress /> */}
|
|
|
|
<RouterLoading />
|
|
|
|
<Updater />
|
|
<Backdrop />
|
|
<Search />
|
|
<RemoteControlDialog />
|
|
<AppBar />
|
|
<WindowChrome />
|
|
<WindowDrag />
|
|
<WindowResizeHandles />
|
|
<AudioPlayer />
|
|
<PlaybackSync />
|
|
<OverlayScrollbar />
|
|
<Outlet />
|
|
</SnackbarProvider>
|
|
</ThemeProvider>
|
|
</DndProvider>
|
|
);
|
|
},
|
|
errorComponent: ErrorNotice,
|
|
});
|