fix(updater): improve update dialog layout and strip downloads section
Widen dialog (max-w-lg → max-w-2xl), remove prose max-width constraint that caused empty space on the right, and filter out the Downloads heading with everything below it from release notes.
This commit is contained in:
parent
344bf41fe5
commit
9f8287755c
1 changed files with 9 additions and 4 deletions
|
|
@ -81,6 +81,11 @@ export const UpdateDialog = (): React.JSX.Element | null => {
|
||||||
|
|
||||||
const isDownloaded = updateStatus === 'downloaded';
|
const isDownloaded = updateStatus === 'downloaded';
|
||||||
|
|
||||||
|
// Strip "Downloads" section (and everything after it) from release notes
|
||||||
|
const filteredNotes = releaseNotes
|
||||||
|
? releaseNotes.replace(/\n#{1,3}\s+Downloads[\s\S]*$/i, '').trimEnd()
|
||||||
|
: releaseNotes;
|
||||||
|
|
||||||
const releaseUrl = availableVersion
|
const releaseUrl = availableVersion
|
||||||
? `https://github.com/777genius/claude_agent_teams_ui/releases/tag/v${availableVersion}`
|
? `https://github.com/777genius/claude_agent_teams_ui/releases/tag/v${availableVersion}`
|
||||||
: null;
|
: null;
|
||||||
|
|
@ -106,7 +111,7 @@ export const UpdateDialog = (): React.JSX.Element | null => {
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
ref={dialogRef}
|
ref={dialogRef}
|
||||||
className="relative mx-4 w-full max-w-lg rounded-md border p-5 shadow-lg"
|
className="relative mx-4 w-full max-w-2xl rounded-md border p-5 shadow-lg"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
aria-label="Update available"
|
aria-label="Update available"
|
||||||
|
|
@ -145,20 +150,20 @@ export const UpdateDialog = (): React.JSX.Element | null => {
|
||||||
|
|
||||||
{/* Release notes */}
|
{/* Release notes */}
|
||||||
<div
|
<div
|
||||||
className="prose prose-sm prose-invert mb-4 max-h-[60vh] overflow-y-auto rounded border p-3 text-xs"
|
className="prose prose-sm prose-invert mb-4 max-h-[60vh] max-w-none overflow-y-auto rounded border p-3 text-xs"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: 'var(--color-surface)',
|
backgroundColor: 'var(--color-surface)',
|
||||||
borderColor: 'var(--color-border)',
|
borderColor: 'var(--color-border)',
|
||||||
color: 'var(--color-text-secondary)',
|
color: 'var(--color-text-secondary)',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{releaseNotes ? (
|
{filteredNotes ? (
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
remarkPlugins={[remarkGfm]}
|
remarkPlugins={[remarkGfm]}
|
||||||
rehypePlugins={REHYPE_PLUGINS}
|
rehypePlugins={REHYPE_PLUGINS}
|
||||||
components={markdownComponents}
|
components={markdownComponents}
|
||||||
>
|
>
|
||||||
{releaseNotes}
|
{filteredNotes}
|
||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
) : (
|
) : (
|
||||||
<p className="italic" style={{ color: 'var(--color-text-muted)' }}>
|
<p className="italic" style={{ color: 'var(--color-text-muted)' }}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue