add error page and favicon
All checks were successful
Build and push image for doorman-homeassistant / docker (push) Successful in 51s
Build and push Doorman UI / API / docker (push) Successful in 1m28s
Build and push image for doorman-homeassistant / deploy-gitainer (push) Successful in 8s

This commit is contained in:
Martin Dimitrov 2024-11-02 15:11:45 -07:00
parent 99d0353af3
commit 7eacce0c61
12 changed files with 28 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View 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"}

View File

@ -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: "",

View File

@ -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={{

View 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>
}
/>
)
};

View File

@ -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",