prepare authentication page class
This commit is contained in:
parent
4713807f94
commit
3de0e95569
@ -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() {
|
||||
|
||||
7
frontend/src/pages/auth/auth.ts
Normal file
7
frontend/src/pages/auth/auth.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { DefaultElement } from "../default-element";
|
||||
|
||||
export class AuthenticationPage extends DefaultElement {
|
||||
constructor() {
|
||||
super([]);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user