mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-25 03:34:22 +01:00
ignore: sync
This commit is contained in:
@@ -52,7 +52,10 @@
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
a {
|
||||
a,
|
||||
button {
|
||||
border: none;
|
||||
padding: 0;
|
||||
color: var(--color-text);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: var(--space-0-75);
|
||||
@@ -1,6 +1,20 @@
|
||||
import { useAuthSession } from "~/context/auth.session"
|
||||
import { IconLogo } from "../component/icon"
|
||||
import "./workspace/workspace.css"
|
||||
import { RouteSectionProps } from "@solidjs/router"
|
||||
import "./workspace.css"
|
||||
import { action, redirect, RouteSectionProps } from "@solidjs/router"
|
||||
|
||||
const logout = action(async () => {
|
||||
"use server"
|
||||
const auth = await useAuthSession()
|
||||
const current = auth.data.current
|
||||
if (current)
|
||||
await auth.update((val) => {
|
||||
delete val.account[current]
|
||||
return val
|
||||
})
|
||||
|
||||
return redirect("/")
|
||||
})
|
||||
|
||||
export default function WorkspaceLayout(props: RouteSectionProps) {
|
||||
return (
|
||||
@@ -13,7 +27,9 @@ export default function WorkspaceLayout(props: RouteSectionProps) {
|
||||
</div>
|
||||
<div data-slot="header-actions">
|
||||
<span>name@example.com</span>
|
||||
<a href="/logout">Logout</a>
|
||||
<form action={logout} method="post">
|
||||
<button type="submit" formaction={logout}>Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
</header>
|
||||
<div data-slot="content">{props.children}</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Billing } from "@opencode/cloud-core/billing.js"
|
||||
import { Key } from "@opencode/cloud-core/key.js"
|
||||
import { action, createAsync, revalidate, query, useAction, useSubmission, json } from "@solidjs/router"
|
||||
import { createEffect, createSignal, For, onMount, Show } from "solid-js"
|
||||
import { action, createAsync, query, useAction, useSubmission, json } from "@solidjs/router"
|
||||
import { createSignal, For, onMount, Show } from "solid-js"
|
||||
import { getActor } from "~/context/auth"
|
||||
import { withActor } from "~/context/auth.withActor"
|
||||
import { IconCopy, IconCheck } from "~/component/icon"
|
||||
import "./index.css"
|
||||
import "./[id].css"
|
||||
import { User } from "@opencode/cloud-core/user.js"
|
||||
import { Actor } from "@opencode/cloud-core/actor.js"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user