diff --git a/client/public/kofi_s_logo_nolabel.png b/client/public/kofi_s_logo_nolabel.png new file mode 100644 index 0000000..0268ce7 Binary files /dev/null and b/client/public/kofi_s_logo_nolabel.png differ diff --git a/client/src/App.tsx b/client/src/App.tsx index 1c1010c..6caec8f 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -2,7 +2,7 @@ import { Refine } from "@refinedev/core"; import { RefineKbar, RefineKbarProvider } from "@refinedev/kbar"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; -import { ErrorComponent, ThemedLayoutV2, ThemedSiderV2, ThemedTitleV2 } from "@refinedev/antd"; +import { ErrorComponent } from "@refinedev/antd"; import "@refinedev/antd/dist/reset.css"; import routerBindings, { @@ -13,19 +13,15 @@ import routerBindings, { import dataProvider from "./components/dataProvider"; import { useTranslation } from "react-i18next"; import { BrowserRouter, Outlet, Route, Routes } from "react-router-dom"; -import { Header } from "./components/header"; import { ColorModeContextProvider } from "./contexts/color-mode"; -// @ts-expect-error: svg file -import Logo from "./icon.svg?react"; import { FileOutlined, HighlightOutlined, UserOutlined } from "@ant-design/icons"; import { ConfigProvider } from "antd"; -import { Footer } from "antd/es/layout/layout"; -import { Version } from "./components/version"; import React from "react"; import { Locale } from "antd/es/locale"; import { languages } from "./i18n"; import loadable from "@loadable/component"; import SpoolmanNotificationProvider from "./components/notificationProvider"; +import { SpoolmanLayout } from "./components/layout"; interface PageProps { resource: "spools" | "filaments" | "vendors"; @@ -135,24 +131,9 @@ function App() {
} - Sider={() => ( - ( - } /> - )} - /> - )} - Footer={() => ( -
- Spoolman - {t("version")} -
- )} - > + - + } > } /> diff --git a/client/src/components/layout.tsx b/client/src/components/layout.tsx new file mode 100644 index 0000000..28a06c3 --- /dev/null +++ b/client/src/components/layout.tsx @@ -0,0 +1,67 @@ +import { ThemedLayoutV2, ThemedSiderV2, ThemedTitleV2 } from "@refinedev/antd"; +import { Header } from "./header"; +import { Footer } from "antd/es/layout/layout"; +import { Version } from "./version"; +import { Button } from "antd"; +// @ts-expect-error: svg file +import Logo from "../icon.svg?react"; +import { useTranslate } from "@refinedev/core"; + +const SpoolmanFooter: React.FC = () => { + const t = useTranslate(); + + return ( +
+
+
+ {t("version")} +
+
+ +
+
+
+ ); +}; + +interface SpoolmanLayoutProps { + children: React.ReactNode; +} + +export const SpoolmanLayout: React.FC = ({ children }) => ( +
} + Sider={() => ( + } />} + /> + )} + Footer={() => } + > + {children} + +);