mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
adds favicon route
This commit is contained in:
parent
29e9afa47e
commit
204d426663
BIN
src/pydase/frontend/favicon.ico
Normal file
BIN
src/pydase/frontend/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
@ -3,6 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="description" content="Web site displaying a pydase UI." />
|
||||
|
@ -152,6 +152,7 @@ class WebServer:
|
||||
# Define routes
|
||||
self._sio.attach(app, socketio_path="/ws/socket.io")
|
||||
app.router.add_static("/assets", self.frontend_src / "assets")
|
||||
app.router.add_get("/favicon.ico", self._favicon_route)
|
||||
app.router.add_get("/service-properties", self._service_properties_route)
|
||||
app.router.add_get("/web-settings", self._web_settings_route)
|
||||
app.router.add_get("/custom.css", self._styles_route)
|
||||
@ -169,6 +170,12 @@ class WebServer:
|
||||
shutdown_timeout=0.1,
|
||||
)
|
||||
|
||||
async def _favicon_route(
|
||||
self,
|
||||
request: aiohttp.web.Request,
|
||||
) -> aiohttp.web.FileResponse:
|
||||
return aiohttp.web.FileResponse(self.frontend_src / "favicon.ico")
|
||||
|
||||
async def _service_properties_route(
|
||||
self,
|
||||
request: aiohttp.web.Request,
|
||||
|
Loading…
x
Reference in New Issue
Block a user