DUNGEONS-34: implement Webka local streaming app

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-09-06 16:23:09 +05:00
parent 5540b9a1f4
commit 7c737c1011
36 changed files with 21596 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
export default defineNuxtRouteMiddleware(async (to) => {
if (to.path === "/login") return;
const session = useSessionStore();
if (!(await session.refresh())) return navigateTo("/login");
if (
(to.path === "/host" || to.path.startsWith("/settings/accounts")) &&
session.user?.role !== "admin"
)
return navigateTo("/watch");
if (to.path === "/")
return navigateTo(session.user?.role === "admin" ? "/host" : "/watch");
});