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 [ return [
'readme' => $this->readFirstExisting($path, ['README.md', 'readme.md'], 7000), 'readme' => $this->readFirstExisting($path, ['README.md', 'readme.md'], 7000),
'changelog' => $this->readFirstExisting($path, [ 'changelog' => $this->readFirstExisting($path, ['CHANGELOG.md', 'changelog.md', 'changelog.yaml'], 7000),
'changelog.yaml',
'CHANGELOG.md',
'CHANGELOG',
'CHANGELOG.txt',
'changelog.md',
'changelog.txt',
], 12000),
'routes' => $this->filesUnder($path, ['Routes/*.php', 'routes/*.php']), 'routes' => $this->filesUnder($path, ['Routes/*.php', 'routes/*.php']),
'migrations' => $this->filesUnder($path, ['Database/Migrations/*.php', 'database/migrations/*.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']), '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"> <tbody class="divide-y divide-zinc-200 dark:divide-zinc-800">
@forelse ($modules as $module) @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"> <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" /> <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> </td>
+62 -54
View File
@@ -183,72 +183,80 @@
</div> </div>
</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">
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Developer files</h2> <summary class="flex cursor-pointer list-none items-center justify-between gap-4 p-6 [&::-webkit-details-marker]:hidden">
<div class="mt-5 grid gap-4 md:grid-cols-2 xl:grid-cols-3"> <div>
@foreach ($fileGroups as $label => $files) <h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Developer files</h2>
<div class="rounded-xl border border-zinc-200 bg-zinc-50 p-4 dark:border-zinc-800 dark:bg-zinc-950/60"> <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 class="flex items-center justify-between gap-3"> </div>
<h3 class="text-sm font-semibold text-zinc-900 dark:text-zinc-100">{{ $label }}</h3> <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>
<span class="rounded-full border border-zinc-300 px-2 py-0.5 text-xs font-semibold text-zinc-600 dark:border-zinc-700 dark:text-zinc-300">{{ count($files) }}</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">
<h3 class="text-sm font-semibold text-zinc-900 dark:text-zinc-100">{{ $label }}</h3>
<span class="rounded-full border border-zinc-300 px-2 py-0.5 text-xs font-semibold text-zinc-600 dark:border-zinc-700 dark:text-zinc-300">{{ count($files) }}</span>
</div>
<ul class="mt-3 max-h-36 space-y-1 overflow-auto text-xs text-zinc-600 dark:text-zinc-400">
@forelse ($files as $file)
<li class="break-all">{{ $file }}</li>
@empty
<li>None found.</li>
@endforelse
</ul>
</div> </div>
<ul class="mt-3 max-h-36 space-y-1 overflow-auto text-xs text-zinc-600 dark:text-zinc-400"> @endforeach
@forelse ($files as $file) </div>
<li class="break-all">{{ $file }}</li>
@empty
<li>None found.</li>
@endforelse
</ul>
</div>
@endforeach
</div> </div>
</div> </details>
<div class="grid gap-6 lg:grid-cols-2"> <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"> <details class="group rounded-2xl border border-zinc-200 bg-white 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> <summary class="flex cursor-pointer list-none items-center justify-between gap-4 p-6 [&::-webkit-details-marker]:hidden">
<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">
<div> <div>
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Changelog</h2> <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"> <p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">Open to inspect the module README where available.</p>
Latest module changes from changelog.yaml, CHANGELOG.md, or CHANGELOG where available.
</p>
</div> </div>
@if (! empty($module['changelog'])) <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>
<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"> </summary>
Available
</span>
@endif
</div>
@if (! empty($module['changelog'])) <div class="border-t border-zinc-200 p-6 dark:border-zinc-800">
<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> <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>
@else </div>
<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"> </details>
No changelog found for this module.
</div> <div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
@endif <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> </div>
</div> </div>
<aside class="space-y-6"> <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">
<h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Developer information</h2> <summary class="flex cursor-pointer list-none items-center justify-between gap-4 p-6 [&::-webkit-details-marker]:hidden">
<dl class="mt-5 space-y-4 text-sm"> <div>
<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> <h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Developer information</h2>
<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> <p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">Path, namespace, composer, git and database metadata.</p>
<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> </div>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Git commit</dt><dd class="mt-1 text-zinc-900 dark:text-zinc-100">{{ $module['git_commit'] ?: '—' }}</dd></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>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Build date</dt><dd class="mt-1 text-zinc-900 dark:text-zinc-100">{{ $module['build_date'] ?: '—' }}</dd></div> </summary>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Database record</dt><dd class="mt-1 text-zinc-900 dark:text-zinc-100">ID {{ $module['status_record']?->id ?? '—' }}</dd></div>
<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> <div class="border-t border-zinc-200 p-6 dark:border-zinc-800">
</dl> <dl class="space-y-4 text-sm">
</div> <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>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Git commit</dt><dd class="mt-1 text-zinc-900 dark:text-zinc-100">{{ $module['git_commit'] ?: '—' }}</dd></div>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Build date</dt><dd class="mt-1 text-zinc-900 dark:text-zinc-100">{{ $module['build_date'] ?: '—' }}</dd></div>
<div><dt class="text-xs font-semibold uppercase text-zinc-500">Database record</dt><dd class="mt-1 text-zinc-900 dark:text-zinc-100">ID {{ $module['status_record']?->id ?? '—' }}</dd></div>
<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"> <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> <h2 class="text-lg font-semibold text-zinc-950 dark:text-zinc-100">Disk metadata</h2>