merge with server

This commit is contained in:
2023-12-11 10:57:51 +01:00
33 changed files with 528 additions and 91 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 Search from "./views/Search.js";
import Chat from "./views/Chat.js";
@ -11,6 +9,9 @@ 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 +36,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 },
@ -44,6 +45,7 @@ const router = async (uri = "") => {
{ path: "/search", view: Search },
{ path: "/chat", view: Chat },
{ path: "/home", view: HomeView },
{ path: "/me", view: MeView },
];
// Test each route for potential match