UI Improvements (#7)

* Initial version with UI templates

* Implement basic screens

* Linting & bump to 0.3.0

* Tick off some TODOs
This commit is contained in:
Christiaan Goossens
2024-12-27 16:52:32 +01:00
committed by GitHub
parent 597d9cdf7d
commit 0d61861343
16 changed files with 215 additions and 34 deletions

View File

@@ -2,6 +2,7 @@
from aiohttp import web
from homeassistant.components.http import HomeAssistantView
from ..helpers import get_view
PATH = "/auth/oidc/welcome"
@@ -15,8 +16,5 @@ class OIDCWelcomeView(HomeAssistantView):
async def get(self, _: web.Request) -> web.Response:
"""Receive response."""
return web.Response(
headers={"content-type": "text/html"},
text="<h1>OIDC Login</h1><p><a href='/auth/oidc/redirect'>Login with OIDC</a></p>",
)
view_html = await get_view("welcome")
return web.Response(text=view_html, content_type="text/html")