From 336257d1d0582a0b5d8a42969c185960bd7f5d52 Mon Sep 17 00:00:00 2001 From: starnakin Date: Mon, 11 Dec 2023 13:40:01 +0100 Subject: [PATCH] init view --- frontend/static/js/index.js | 2 ++ frontend/static/js/views/HomeView.js | 1 + frontend/static/js/views/MatchMakingView.js | 13 +++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 frontend/static/js/views/MatchMakingView.js diff --git a/frontend/static/js/index.js b/frontend/static/js/index.js index c263079..91d1fee 100644 --- a/frontend/static/js/index.js +++ b/frontend/static/js/index.js @@ -11,6 +11,7 @@ import AbstractRedirectView from "./views/AbstractRedirectView.js"; import MeView from "./views/MeView.js"; import ProfilePageView from "./views/profiles/ProfilePageView.js"; import ProfilesView from "./views/profiles/ProfilesView.js"; +import MatchMakingView from "./views/MatchMakingView.js"; let client = new Client(location.protocol + "//" + location.host) @@ -44,6 +45,7 @@ const router = async (uri = "") => { { path: "/chat", view: Chat }, { path: "/home", view: HomeView }, { path: "/me", view: MeView }, + { path: "/matchmaking", view: MatchMakingView }, ]; // Test each route for potential match diff --git a/frontend/static/js/views/HomeView.js b/frontend/static/js/views/HomeView.js index d9fd194..cb15693 100644 --- a/frontend/static/js/views/HomeView.js +++ b/frontend/static/js/views/HomeView.js @@ -9,6 +9,7 @@ export default class extends AbstractAuthentificateView { async getHtml() { return `

HOME

+ Play a game Me Logout `; diff --git a/frontend/static/js/views/MatchMakingView.js b/frontend/static/js/views/MatchMakingView.js new file mode 100644 index 0000000..f079328 --- /dev/null +++ b/frontend/static/js/views/MatchMakingView.js @@ -0,0 +1,13 @@ +import AbstractView from "./AbstractView.js"; + +export default class extends AbstractView { + constructor(params) { + super(params, "Dashboard"); + } + + async getHtml() { + return ` +

finding

+ `; + } +} \ No newline at end of file