add: profiles and profile page

This commit is contained in:
2023-12-09 21:51:32 +01:00
parent dd19e15e7d
commit c3c83b3168
11 changed files with 110 additions and 43 deletions

View File

@ -1,7 +1,5 @@
import LoginView from "./views/accounts/LoginView.js";
import Dashboard from "./views/Dashboard.js";
import Posts from "./views/Posts.js";
import PostView from "./views/PostView.js";
import Settings from "./views/Settings.js";
import Chat from "./views/Chat.js";
import HomeView from "./views/HomeView.js";
@ -11,6 +9,8 @@ import LogoutView from "./views/accounts/LogoutView.js";
import { Client } from "./api/client.js";
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";
let client = new Client(location.protocol + "//" + location.host)
@ -35,8 +35,8 @@ const navigateTo = async (uri) => {
const router = async (uri = "") => {
const routes = [
{ path: "/", view: Dashboard },
{ path: "/posts", view: Posts },
{ path: "/posts/:id", view: PostView },
{ path: "/profiles", view: ProfilesView},
{ path: "/profiles/:id", view: ProfilePageView },
{ path: "/settings", view: Settings },
{ path: "/login", view: LoginView },
{ path: "/logout", view: LogoutView },