summaryrefslogtreecommitdiffhomepage
path: root/cloud
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-09-03 14:24:21 -0400
committerDax Raad <[email protected]>2025-09-03 14:24:37 -0400
commite8f54b9b382616b0d6d082662bdedeb54a28b3cb (patch)
treef808f318c302f829fce1a78ce6c2730559e6c330 /cloud
parent01b18456a30b1890370ecaf02baca414ed5da66c (diff)
downloadopencode-e8f54b9b382616b0d6d082662bdedeb54a28b3cb.tar.gz
opencode-e8f54b9b382616b0d6d082662bdedeb54a28b3cb.zip
wip: fix logout
Diffstat (limited to 'cloud')
-rw-r--r--cloud/app/src/entry-server.tsx1
-rw-r--r--cloud/app/src/routes/index.tsx2
-rw-r--r--cloud/app/src/routes/workspace.tsx4
-rw-r--r--cloud/app/src/routes/workspace/[id].tsx1
4 files changed, 5 insertions, 3 deletions
diff --git a/cloud/app/src/entry-server.tsx b/cloud/app/src/entry-server.tsx
index 41fc8fc8b..d2e6044aa 100644
--- a/cloud/app/src/entry-server.tsx
+++ b/cloud/app/src/entry-server.tsx
@@ -1,6 +1,7 @@
// @refresh reload
import { createHandler, StartServer } from "@solidjs/start/server"
+
export default createHandler(() => (
<StartServer
document={({ assets, children, scripts }) => (
diff --git a/cloud/app/src/routes/index.tsx b/cloud/app/src/routes/index.tsx
index bd2f8d1f1..fd6bc23fa 100644
--- a/cloud/app/src/routes/index.tsx
+++ b/cloud/app/src/routes/index.tsx
@@ -1,6 +1,4 @@
import "./index.css"
-import "./workspace.css"
-import "./workspace/[id].css"
import { Title } from "@solidjs/meta"
import { Match, onCleanup, onMount, Switch } from "solid-js"
import logoLight from "../asset/logo-ornate-light.svg"
diff --git a/cloud/app/src/routes/workspace.tsx b/cloud/app/src/routes/workspace.tsx
index b97e21600..e3f70cab0 100644
--- a/cloud/app/src/routes/workspace.tsx
+++ b/cloud/app/src/routes/workspace.tsx
@@ -1,3 +1,4 @@
+import "./workspace.css"
import { useAuthSession } from "~/context/auth.session"
import { IconLogo } from "../component/icon"
import { withActor } from "~/context/auth.withActor"
@@ -28,6 +29,7 @@ const logout = action(async () => {
event!.locals.actor = undefined
return val
})
+ throw redirect("/")
})
export default function WorkspaceLayout(props: RouteSectionProps) {
@@ -43,7 +45,7 @@ export default function WorkspaceLayout(props: RouteSectionProps) {
</div>
<div data-slot="header-actions">
<span>{userInfo()?.user.email}</span>
- <form onSubmit={() => (location.href = "/")} action={logout} method="post">
+ <form action={logout} method="post">
<button type="submit" formaction={logout}>
Logout
</button>
diff --git a/cloud/app/src/routes/workspace/[id].tsx b/cloud/app/src/routes/workspace/[id].tsx
index d4a3500e7..2e3f526c3 100644
--- a/cloud/app/src/routes/workspace/[id].tsx
+++ b/cloud/app/src/routes/workspace/[id].tsx
@@ -1,3 +1,4 @@
+import "./[id].css"
import { Billing } from "@opencode/cloud-core/billing.js"
import { Key } from "@opencode/cloud-core/key.js"
import { action, createAsync, query, useAction, useSubmission, json, useParams } from "@solidjs/router"