prepare authentication page class

This commit is contained in:
FullGreaM 2026-04-27 04:01:37 +03:00
parent 4713807f94
commit 3de0e95569
2 changed files with 13 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import { Navbar } from "./pages/navbar";
import { DarkStyle, LightStyle, defaultStyle } from "./styles"; import { DarkStyle, LightStyle, defaultStyle } from "./styles";
import { ControllerAPI } from "./api/RESTful"; import { ControllerAPI } from "./api/RESTful";
import { NewsFeed } from "./pages/feed/news"; 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 // I'll add a dark mode toggle later, but for now let's just use the light style by default
let currentStyle = defaultStyle; let currentStyle = defaultStyle;
@ -27,7 +28,11 @@ async function authInit() {
async function logInInit () { async function logInInit () {
console.log("User is not authenticated"); 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() { async function main() {

View File

@ -0,0 +1,7 @@
import { DefaultElement } from "../default-element";
export class AuthenticationPage extends DefaultElement {
constructor() {
super([]);
}
}