mirror of
https://github.com/anomalyco/opencode.git
synced 2026-06-01 23:09:37 +00:00
feat: show other distro install options
This commit is contained in:
parent
c1dc769b5f
commit
2cd61113c1
1 changed files with 25 additions and 0 deletions
|
|
@ -44,6 +44,11 @@ export function DialogLocalServer() {
|
|||
const busy = createMemo(() => !!current()?.job)
|
||||
const mode = createMemo(() => current()?.config.mode ?? "windows")
|
||||
const selected = createMemo(() => current()?.checks.distro?.selected)
|
||||
const otherDistros = createMemo(() =>
|
||||
(current()?.checks.distro?.online ?? [])
|
||||
.filter((item) => item.name !== "Debian" && item.name !== "Ubuntu-24.04")
|
||||
.slice(0, 8),
|
||||
)
|
||||
const configuredRuntime = createMemo(() => {
|
||||
const state = current()
|
||||
if (!state) return { mode: "windows" as const, distro: null as string | null }
|
||||
|
|
@ -224,6 +229,26 @@ export function DialogLocalServer() {
|
|||
</Button>
|
||||
</div>
|
||||
|
||||
<Show when={otherDistros().length > 0}>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="text-12-medium text-text-strong">Other distros</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<For each={otherDistros()}>
|
||||
{(item) => (
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="large"
|
||||
disabled={busy()}
|
||||
onClick={() => void run(() => localServer()!.installDistro(item.name))}
|
||||
>
|
||||
{item.label}
|
||||
</Button>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="text-12-medium text-text-strong">Installed distros</div>
|
||||
<Show
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue