Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public function share(Request $request): array

'sidebar_pen' => $sidebar_open,

'changelog' => file_get_contents(base_path('CHANGELOG.md')),

...($request->user() ? [

'task_statuses' => TaskStatusData::collect(TaskStatus::cases()),
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"format:check": "prettier --check resources/",
"lint": "eslint . --fix",
"types": "tsc --noEmit",
"version": "auto-changelog -p && git add CHANGELOG.md"
"version": "auto-changelog -p --hide-credit && git add CHANGELOG.md"
},
"devDependencies": {
"@eslint/js": "^9.19.0",
Expand Down
4 changes: 2 additions & 2 deletions src/resources/js/components/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ const footerNavItems: NavItem[] = [
icon: BookOpen,
},
{
title: 'Features & Fixes',
title: 'Changelog',
href: route('updates'),
icon: BookOpen,
}
},
];

export function AppSidebar() {
Expand Down
21 changes: 12 additions & 9 deletions src/resources/js/pages/updates.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
import AppLayout from '@/layouts/app-layout';
import { useHighlights, useMarkdown } from '@/lib/markdown';
import { type SharedData } from '@/types';
import { usePage } from '@inertiajs/react';
import { useHighlights, useMarkdown } from '@/lib/markdown';

export default function UpdatesPage() {
const { props } = usePage<SharedData & { changelog?: string }>();
const { props } = usePage<SharedData>();
const changelog = props.changelog ?? '';

const highlights = useHighlights(changelog);
const rendered = useMarkdown(changelog);

return (
<AppLayout breadcrumbs={[{ title: 'Home', href: route('index') }, { title: 'Features & Fixes', href: route('updates') }]}>
<AppLayout
breadcrumbs={[
{ title: 'Home', href: route('index') },
{ title: 'Changelog', href: route('updates') },
]}
>
<div className="mx-auto w-full max-w-6xl px-4 py-8 sm:py-10 lg:px-8">
{/* Header */}
<div className="mb-8 flex flex-col gap-2">
<h1 className="text-3xl font-bold tracking-tight text-neutral-900 dark:text-neutral-100">Features & Fixes</h1>
<h1 className="text-3xl font-bold tracking-tight text-neutral-900 dark:text-neutral-100">Changelog</h1>
<p className="text-neutral-600 dark:text-neutral-300">What’s new and improved in this release.</p>
</div>

{/* Highlights section */}
<div className="grid grid-cols-1 gap-6 md:grid-cols-3">
<div className="flex flex-col gap-2">
<div className="rounded-xl border border-neutral-200 bg-white p-6 shadow-sm dark:border-neutral-800 dark:bg-neutral-900">
<h2 className="mb-3 text-lg font-semibold text-neutral-900 dark:text-neutral-100">New & Improved</h2>
{highlights.added.length ? (
Expand Down Expand Up @@ -75,10 +80,8 @@ export default function UpdatesPage() {
View raw file
</a>
</div>
<article className="prose max-w-none text-neutral-800 dark:prose-invert dark:text-neutral-200">
{rendered.length ? rendered : (
<p className="text-neutral-600 dark:text-neutral-400">No changelog available.</p>
)}
<article className="prose dark:prose-invert max-w-none text-neutral-800 dark:text-neutral-200">
{rendered.length ? rendered : <p className="text-neutral-600 dark:text-neutral-400">No changelog available.</p>}
</article>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/resources/js/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface SharedData {
ziggy: Config & { location: string };
sidebar_open: boolean;
[key: string]: unknown;
changelog: string;
}

export interface User {
Expand Down