This commit is contained in:
Alex Yaroshuk
2026-02-04 20:35:06 +08:00
parent d364c43916
commit 1587d93b29
3 changed files with 21 additions and 17 deletions

View File

@@ -128,11 +128,6 @@
.dialog-changelog-markdown a.external-link {
color: var(--text-interactive-base);
font-weight: 500;
text-decoration: none;
}
.dialog-changelog-markdown .external-link:hover {
text-decoration: none !important;
}
.dialog-changelog-markdown a.external-link[href^="https://github.com/anomalyco/opencode/pull/"],

View File

@@ -105,10 +105,7 @@ export function DialogChangelog() {
}
return (
<Dialog
title="Changelog"
class="dialog-changelog"
>
<Dialog title="Changelog" class="dialog-changelog">
<Show when={loading()}>
<p class="text-text-weak p-6">Loading...</p>
</Show>
@@ -119,14 +116,12 @@ export function DialogChangelog() {
<p class="text-text-weak p-6">No releases found.</p>
</Show>
<Show when={!loading() && !error() && releases().length > 0}>
<ReleaseList releases={releases()} />
<Show when={hasMore()}>
<div class="p-4 flex justify-center">
<Button variant="secondary" size="small" onClick={handleLoadMore} loading={loadingMore()}>
Load more
</Button>
</div>
</Show>
<ReleaseList
releases={releases()}
hasMore={hasMore()}
loadingMore={loadingMore()}
onLoadMore={handleLoadMore}
/>
</Show>
</Dialog>
)

View File

@@ -1,6 +1,7 @@
import { Component, createEffect, createSignal, onCleanup } from "solid-js"
import { List } from "@opencode-ai/ui/list"
import { Markdown } from "@opencode-ai/ui/markdown"
import { Button } from "@opencode-ai/ui/button"
import "./dialog-changelog.css"
type Release = {
@@ -11,6 +12,9 @@ type Release = {
interface ReleaseListProps {
releases: Release[]
hasMore: boolean
loadingMore: boolean
onLoadMore: () => void
}
function StickyHeader(props: { tag: string; date: string }) {
@@ -51,6 +55,16 @@ export const ReleaseList: Component<ReleaseListProps> = (props) => {
emptyMessage="No releases found"
loadingMessage="Loading..."
class="dialog-changelog-list"
add={{
render: () =>
props.hasMore ? (
<div class="p-4 flex justify-center">
<Button variant="secondary" size="small" onClick={props.onLoadMore} loading={props.loadingMore}>
Load more
</Button>
</div>
) : null,
}}
>
{(item) => (
<>