mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
chore: format code
This commit is contained in:
parent
725f658260
commit
bc524eeb44
4 changed files with 537 additions and 2394 deletions
|
|
@ -41,13 +41,16 @@ export namespace Auth {
|
|||
|
||||
export async function all(): Promise<Record<string, Info>> {
|
||||
const file = Bun.file(filepath)
|
||||
const data = await file.json().catch(() => ({} as Record<string, unknown>))
|
||||
return Object.entries(data).reduce((acc, [key, value]) => {
|
||||
const parsed = Info.safeParse(value)
|
||||
if (!parsed.success) return acc
|
||||
acc[key] = parsed.data
|
||||
return acc
|
||||
}, {} as Record<string, Info>)
|
||||
const data = await file.json().catch(() => ({}) as Record<string, unknown>)
|
||||
return Object.entries(data).reduce(
|
||||
(acc, [key, value]) => {
|
||||
const parsed = Info.safeParse(value)
|
||||
if (!parsed.success) return acc
|
||||
acc[key] = parsed.data
|
||||
return acc
|
||||
},
|
||||
{} as Record<string, Info>,
|
||||
)
|
||||
}
|
||||
|
||||
export async function set(key: string, info: Info) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { onCleanup, onMount } from "solid-js"
|
|||
export function DialogThemeList() {
|
||||
const theme = useTheme()
|
||||
const options = Object.keys(theme.all())
|
||||
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' }))
|
||||
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: "base" }))
|
||||
.map((value) => ({
|
||||
title: value,
|
||||
value: value,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue