refactor(update-dialog): improve changelog formatting
This commit is contained in:
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Optimized diff view layout with smaller fonts and compact hunk separators
|
||||||
|
- Improved mobile experience: simplified header, better diff file selector
|
||||||
|
- Redesigned password-protected session unlock screen
|
||||||
|
|
||||||
|
|
||||||
## [1.1.5] - 2025-12-15
|
## [1.1.5] - 2025-12-15
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,19 @@ export const UpdateDialog: React.FC<UpdateDialogProps> = ({
|
|||||||
>
|
>
|
||||||
<div className="text-sm text-muted-foreground whitespace-pre-wrap pr-3">
|
<div className="text-sm text-muted-foreground whitespace-pre-wrap pr-3">
|
||||||
{info.body
|
{info.body
|
||||||
.replace(/^## \[(\d+\.\d+\.\d+)\] - \d{4}-\d{2}-\d{2}\s*/gm, '— v$1 —\n')
|
.split(/^## \[(\d+\.\d+\.\d+)\] - \d{4}-\d{2}-\d{2}\s*/gm)
|
||||||
.replace(/^- /gm, '• ')
|
.filter(Boolean)
|
||||||
.trim()}
|
.map((part, index) => {
|
||||||
|
if (/^\d+\.\d+\.\d+$/.test(part.trim())) {
|
||||||
|
return (
|
||||||
|
<span key={index} className="font-semibold text-foreground">
|
||||||
|
v{part.trim()}
|
||||||
|
{'\n'}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return part.replace(/^- /gm, '• ').trim() + '\n\n';
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</ScrollableOverlay>
|
</ScrollableOverlay>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user