From 3de0e95569aec738fc683f916ffb8ad07c7656ea Mon Sep 17 00:00:00 2001 From: FullGreaM Date: Mon, 27 Apr 2026 04:01:37 +0300 Subject: [PATCH] prepare authentication page class --- frontend/src/main.ts | 7 ++++++- frontend/src/pages/auth/auth.ts | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 frontend/src/pages/auth/auth.ts diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 46349f7..04d68b2 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -3,6 +3,7 @@ import { Navbar } from "./pages/navbar"; import { DarkStyle, LightStyle, defaultStyle } from "./styles"; import { ControllerAPI } from "./api/RESTful"; import { NewsFeed } from "./pages/feed/news"; +import { AuthenticationPage } from "./pages/auth/auth"; // I'll add a dark mode toggle later, but for now let's just use the light style by default let currentStyle = defaultStyle; @@ -27,7 +28,11 @@ async function authInit() { async function logInInit () { console.log("User is not authenticated"); - // Load the auth page + const authPage = new AuthenticationPage(); + authPage.style = currentStyle; + const appElement = document.getElementById("app"); + if (appElement) + appElement.innerHTML = authPage.build(); } async function main() { diff --git a/frontend/src/pages/auth/auth.ts b/frontend/src/pages/auth/auth.ts new file mode 100644 index 0000000..10dd3f7 --- /dev/null +++ b/frontend/src/pages/auth/auth.ts @@ -0,0 +1,7 @@ +import { DefaultElement } from "../default-element"; + +export class AuthenticationPage extends DefaultElement { + constructor() { + super([]); + } +} \ No newline at end of file