diff --git a/docs/3-visualiser/3-1-user-guide/extensions.md b/docs/3-visualiser/3-1-user-guide/extensions.md index 6663080..a19c69a 100644 --- a/docs/3-visualiser/3-1-user-guide/extensions.md +++ b/docs/3-visualiser/3-1-user-guide/extensions.md @@ -16,9 +16,9 @@ Adapters implement the [Visualiser Adapter Protocol](/docs/visualiser-adapter-pr ### Other adapters -| Name | URL | Connection Type | Description | -| --------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------------------ | -| Warthog (WebAssembly) | `https://cdn.jsdelivr.net/gh/ShortestPathLab/posthoc-adapter-warthog@adapter-warthog-wasm-dist/warthog-wasm.mjs` | Web Worker | Solver adapter for Warthog & Roadhog | +| Name | URL | Connection Type | Description | +| --------------------- | ---------------------------------------------------------------------------------------------------- | --------------- | ------------------------------------ | +| Warthog (WebAssembly) | `https://cdn.jsdelivr.net/gh/ShortestPathLab/posthoc-app@adapter-warthog-wasm-dist/warthog-wasm.mjs` | Web Worker | Solver adapter for Warthog & Roadhog | [You can find more adapters here.](https://github.com/ShortestPathLab/posthoc-app) diff --git a/src/components/useTitleBar.tsx b/src/components/useTitleBar.tsx new file mode 100644 index 0000000..7c72c16 --- /dev/null +++ b/src/components/useTitleBar.tsx @@ -0,0 +1,11 @@ +import { useTheme } from "@mui/material"; +import { useEffect } from "react"; + +export function useTitleBar() { + const { palette } = useTheme(); + useEffect(() => { + document + .querySelector('meta[name="theme-color"]')! + .setAttribute("content", palette.background.default); + }, [palette.background.default]); +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 78401d4..7993520 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -24,6 +24,7 @@ import { makeTheme } from "../components/theme"; import l10n from "./en-au.json"; import "./index.module.css"; import { PlayArrowOutlined } from "@mui/icons-material"; +import { useTitleBar } from "../components/useTitleBar"; const themes = { dark: makeTheme("dark"), @@ -142,7 +143,7 @@ function Content() { } function ContentWithTheme() { - const [mode] = useContext(ModeContext); + useTitleBar(); return (