with pagination nwo with the proper view selection

This commit is contained in:
Mark Gregory
2026-07-01 12:14:59 +01:00
parent c471e1a804
commit b1f0ff5eeb
3 changed files with 64 additions and 63 deletions
+1 -8
View File
@@ -218,14 +218,7 @@ class DatabaseModuleRegistry
return [
'readme' => $this->readFirstExisting($path, ['README.md', 'readme.md'], 7000),
'changelog' => $this->readFirstExisting($path, [
'changelog.yaml',
'CHANGELOG.md',
'CHANGELOG',
'CHANGELOG.txt',
'changelog.md',
'changelog.txt',
], 12000),
'changelog' => $this->readFirstExisting($path, ['CHANGELOG.md', 'changelog.md', 'changelog.yaml'], 7000),
'routes' => $this->filesUnder($path, ['Routes/*.php', 'routes/*.php']),
'migrations' => $this->filesUnder($path, ['Database/Migrations/*.php', 'database/migrations/*.php']),
'models' => $this->filesUnder($path, ['app/Models/*.php', 'Models/*.php', 'Entities/*.php', 'app/Entities/*.php']),
+1 -1
View File
@@ -167,7 +167,7 @@
<tbody class="divide-y divide-zinc-200 dark:divide-zinc-800">
@forelse ($modules as $module)
<tr class="align-top transition hover:bg-zinc-900/55">
<tr class="align-top transition hover:bg-zinc-50 dark:hover:bg-zinc-950/50">
<td class="px-4 py-4">
<input type="checkbox" name="modules[]" value="{{ $module['name'] }}" class="rounded border-zinc-300 text-blue-600 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-950" />
</td>
+35 -27
View File
@@ -183,9 +183,17 @@
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<details class="group rounded-2xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<summary class="flex cursor-pointer list-none items-center justify-between gap-4 p-6 [&::-webkit-details-marker]:hidden">
<div>
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Developer files</h2>
<div class="mt-5 grid gap-4 md:grid-cols-2 xl:grid-cols-3">
<p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">Routes, migrations, models, controllers and providers discovered for this module.</p>
</div>
<span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-zinc-300 text-zinc-500 transition group-open:rotate-90 dark:border-zinc-700 dark:text-zinc-300" aria-hidden="true">›</span>
</summary>
<div class="border-t border-zinc-200 p-6 dark:border-zinc-800">
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
@foreach ($fileGroups as $label => $files)
<div class="rounded-xl border border-zinc-200 bg-zinc-50 p-4 dark:border-zinc-800 dark:bg-zinc-950/60">
<div class="flex items-center justify-between gap-3">
@@ -203,43 +211,42 @@
@endforeach
</div>
</div>
</details>
<div class="grid gap-6 lg:grid-cols-2">
<div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">README preview</h2>
<pre class="mt-4 max-h-96 overflow-auto whitespace-pre-wrap rounded-xl border border-zinc-200 bg-zinc-50 p-4 text-xs leading-6 text-zinc-700 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-300">{{ $module['readme'] ?: 'No README found.' }}</pre>
</div>
<div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<div class="flex items-start justify-between gap-4">
<details class="group rounded-2xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<summary class="flex cursor-pointer list-none items-center justify-between gap-4 p-6 [&::-webkit-details-marker]:hidden">
<div>
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Changelog</h2>
<p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">
Latest module changes from changelog.yaml, CHANGELOG.md, or CHANGELOG where available.
</p>
</div>
@if (! empty($module['changelog']))
<span class="rounded-full border border-emerald-500/30 bg-emerald-500/10 px-3 py-1 text-xs font-semibold text-emerald-700 dark:text-emerald-300">
Available
</span>
@endif
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">README preview</h2>
<p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">Open to inspect the module README where available.</p>
</div>
<span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-zinc-300 text-zinc-500 transition group-open:rotate-90 dark:border-zinc-700 dark:text-zinc-300" aria-hidden="true">›</span>
</summary>
@if (! empty($module['changelog']))
<pre class="mt-4 max-h-96 overflow-auto whitespace-pre-wrap rounded-xl border border-zinc-200 bg-zinc-50 p-4 text-xs leading-6 text-zinc-700 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-300">{{ $module['changelog'] }}</pre>
@else
<div class="mt-4 rounded-xl border border-dashed border-zinc-300 bg-zinc-50 p-4 text-sm text-zinc-500 dark:border-zinc-800 dark:bg-zinc-950/60 dark:text-zinc-400">
No changelog found for this module.
<div class="border-t border-zinc-200 p-6 dark:border-zinc-800">
<pre class="max-h-96 overflow-auto whitespace-pre-wrap rounded-xl border border-zinc-200 bg-zinc-50 p-4 text-xs leading-6 text-zinc-700 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-300">{{ $module['readme'] ?: 'No README found.' }}</pre>
</div>
@endif
</details>
<div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Changelog preview</h2>
<pre class="mt-4 max-h-96 overflow-auto whitespace-pre-wrap rounded-xl border border-zinc-200 bg-zinc-50 p-4 text-xs leading-6 text-zinc-700 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-300">{{ $module['changelog'] ?: 'No changelog found.' }}</pre>
</div>
</div>
</div>
<aside class="space-y-6">
<div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<details class="group rounded-2xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<summary class="flex cursor-pointer list-none items-center justify-between gap-4 p-6 [&::-webkit-details-marker]:hidden">
<div>
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Developer information</h2>
<dl class="mt-5 space-y-4 text-sm">
<p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">Path, namespace, composer, git and database metadata.</p>
</div>
<span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-zinc-300 text-zinc-500 transition group-open:rotate-90 dark:border-zinc-700 dark:text-zinc-300" aria-hidden="true">›</span>
</summary>
<div class="border-t border-zinc-200 p-6 dark:border-zinc-800">
<dl class="space-y-4 text-sm">
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Installed path</dt><dd class="mt-1 break-all text-zinc-900 dark:text-zinc-100">{{ $module['path'] }}</dd></div>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Namespace</dt><dd class="mt-1 break-all text-zinc-900 dark:text-zinc-100">{{ $module['namespace'] ?: '—' }}</dd></div>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Composer package</dt><dd class="mt-1 break-all text-zinc-900 dark:text-zinc-100">{{ $module['composer_name'] ?: '—' }}</dd></div>
@@ -249,6 +256,7 @@
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Last updated</dt><dd class="mt-1 text-zinc-900 dark:text-zinc-100">{{ $module['updated_at']?->format('d M Y H:i') ?? '—' }}</dd></div>
</dl>
</div>
</details>
<div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Disk metadata</h2>