mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 03:04:21 +01:00
ignore: fix stuff
This commit is contained in:
@@ -17,8 +17,8 @@ export const AuthClient = createClient({
|
||||
export const getActor = query(async (): Promise<Actor.Info> => {
|
||||
"use server"
|
||||
const evt = getRequestEvent()
|
||||
console.log(evt?.request.url)
|
||||
const url = new URL(evt!.request.headers.get("referer") ?? evt!.request.url)
|
||||
if (!evt) throw new Error("No request event")
|
||||
const url = new URL(evt.request.headers.has("x-server-id") ? evt.request.headers.get("referer")! : evt.request.url)
|
||||
const auth = await useAuthSession()
|
||||
const splits = url.pathname.split("/").filter(Boolean)
|
||||
if (splits[0] !== "workspace") {
|
||||
|
||||
@@ -167,7 +167,7 @@ const dummyApiKeyData = [
|
||||
},
|
||||
]
|
||||
|
||||
export default function() {
|
||||
export default function () {
|
||||
const actor = createAsync(() => getActor())
|
||||
onMount(() => {
|
||||
console.log("MOUNTED", actor())
|
||||
@@ -351,7 +351,7 @@ export default function() {
|
||||
</Show>
|
||||
<div data-slot="api-keys-table">
|
||||
<Show
|
||||
when={dummyApiKeyData.length > 0}
|
||||
when={keys()?.length}
|
||||
fallback={
|
||||
<div data-slot="empty-state">
|
||||
<p>Create an opencode Gateway API key</p>
|
||||
@@ -368,7 +368,7 @@ export default function() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<For each={dummyApiKeyData}>
|
||||
<For each={keys()!}>
|
||||
{/* Real data: keys() */}
|
||||
{(key) => (
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user