mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-24 06:45:22 +00:00
fixes
This commit is contained in:
@@ -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/"],
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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) => (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user