add error page and favicon
BIN
packages/doorman-ui/public/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
packages/doorman-ui/public/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
packages/doorman-ui/public/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
packages/doorman-ui/public/doorman.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
packages/doorman-ui/public/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 233 B |
BIN
packages/doorman-ui/public/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 428 B |
BIN
packages/doorman-ui/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
1
packages/doorman-ui/public/site.webmanifest
Normal file
@ -0,0 +1 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
||||
@ -3,6 +3,7 @@ import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
|
||||
import { DoorPage, loader as doorpageloader } from './pages/DoorPage';
|
||||
import { ErrorPage } from './pages/ErrorPage';
|
||||
|
||||
|
||||
const root = ReactDOM.createRoot(
|
||||
@ -13,7 +14,7 @@ const router = createBrowserRouter([
|
||||
{
|
||||
path: "/",
|
||||
element: <App />,
|
||||
errorElement: <h1>error</h1>,
|
||||
errorElement: <ErrorPage />,
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
|
||||
@ -100,11 +100,13 @@ export function DoorPage() {
|
||||
return (
|
||||
<AppLayout
|
||||
contentType="wizard"
|
||||
navigationHide
|
||||
toolsHide
|
||||
breadcrumbs={
|
||||
<BreadcrumbGroup
|
||||
items={[
|
||||
{ text: 'Door', href: '#' },
|
||||
{ text: door, href: '#' },
|
||||
{ text: door, href: `?door=${door}&edit=true` },
|
||||
{ text: 'Unlock', href: '#' },
|
||||
]}
|
||||
/>
|
||||
@ -115,15 +117,6 @@ export function DoorPage() {
|
||||
items={alerts}
|
||||
/>
|
||||
}
|
||||
navigation={
|
||||
<SideNavigation
|
||||
header={{
|
||||
href: '#',
|
||||
text: 'Doorman',
|
||||
}}
|
||||
items={[]}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<Wizard
|
||||
i18nStrings={{
|
||||
|
||||
20
packages/doorman-ui/src/pages/ErrorPage.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import { AppLayout, Container, Header, TextContent } from "@cloudscape-design/components"
|
||||
|
||||
export const ErrorPage = () => {
|
||||
return (
|
||||
<AppLayout
|
||||
contentType="dashboard"
|
||||
navigationHide
|
||||
toolsHide
|
||||
content={
|
||||
<Container>
|
||||
<Header>Doorman</Header>
|
||||
<img src="doorman.png" />
|
||||
<TextContent>
|
||||
This isn't a valid door, please double check your URL
|
||||
</TextContent>
|
||||
</Container>
|
||||
}
|
||||
/>
|
||||
)
|
||||
};
|
||||
@ -9,12 +9,12 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:3000',
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
host: "0.0.0.0",
|
||||
port: 8080
|
||||
port: 3005
|
||||
},
|
||||
build: {
|
||||
outDir: "dist",
|
||||
|
||||