Skip to content
This repository was archived by the owner on Jan 3, 2026. It is now read-only.

Commit 5da743f

Browse files
committed
Loaders and OG image generation
1 parent 35a6b43 commit 5da743f

File tree

11 files changed

+1626
-118
lines changed

11 files changed

+1626
-118
lines changed

src/app/[locale]/admin/analytics/page.tsx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,17 @@ export default function AdminAnalyticsPage() {
308308

309309
<div className='grid grid-cols-1 lg:grid-cols-2 gap-6'>
310310
<div className='bg-slate-800/40 backdrop-blur-md border border-purple-500/20 rounded-xl p-6'>
311-
<h2 className='text-xl font-bold mb-4 text-white'>
312-
Recent Users
313-
</h2>
311+
<div className='flex justify-between items-center mb-4'>
312+
<h2 className='text-xl font-bold text-white'>
313+
Recent Users
314+
</h2>
315+
<Link
316+
href='/admin/users'
317+
className='text-purple-400 hover:text-purple-300 text-sm font-medium transition-colors'
318+
>
319+
Manage Users →
320+
</Link>
321+
</div>
314322
<div className='space-y-3'>
315323
{analytics.recent.users.map(u => (
316324
<div
@@ -343,9 +351,17 @@ export default function AdminAnalyticsPage() {
343351
</div>
344352

345353
<div className='bg-slate-800/40 backdrop-blur-md border border-purple-500/20 rounded-xl p-6'>
346-
<h2 className='text-xl font-bold mb-4 text-white'>
347-
Recent Scans
348-
</h2>
354+
<div className='flex justify-between items-center mb-4'>
355+
<h2 className='text-xl font-bold text-white'>
356+
Recent Scans
357+
</h2>
358+
<Link
359+
href='/admin/plugins'
360+
className='text-purple-400 hover:text-purple-300 text-sm font-medium transition-colors'
361+
>
362+
See All →
363+
</Link>
364+
</div>
349365
<div className='space-y-3'>
350366
{analytics.recent.scans.map(scan => (
351367
<div

src/app/[locale]/admin/plugins/page.tsx

Lines changed: 345 additions & 0 deletions
Large diffs are not rendered by default.

src/app/[locale]/dashboard/loader/page.tsx

Lines changed: 618 additions & 0 deletions
Large diffs are not rendered by default.

src/app/[locale]/dashboard/page.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,48 @@ export default function DashboardPage() {
437437
</p>
438438
</Link>
439439

440+
<Link
441+
href='/dashboard/loader'
442+
className='bg-slate-800/40 backdrop-blur-md border border-cyan-500/20 rounded-xl p-5 hover:border-cyan-400/50 transition-all duration-200 group'
443+
>
444+
<div className='flex items-center justify-between mb-3'>
445+
<div className='w-10 h-10 bg-cyan-600/80 rounded-lg flex items-center justify-center'>
446+
<svg
447+
className='w-5 h-5'
448+
fill='none'
449+
stroke='currentColor'
450+
viewBox='0 0 24 24'
451+
>
452+
<path
453+
strokeLinecap='round'
454+
strokeLinejoin='round'
455+
strokeWidth={2}
456+
d='M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4'
457+
/>
458+
</svg>
459+
</div>
460+
<svg
461+
className='w-4 h-4 text-cyan-400 opacity-0 group-hover:opacity-100 transition-opacity'
462+
fill='none'
463+
stroke='currentColor'
464+
viewBox='0 0 24 24'
465+
>
466+
<path
467+
strokeLinecap='round'
468+
strokeLinejoin='round'
469+
strokeWidth={2}
470+
d='M9 5l7 7-7 7'
471+
/>
472+
</svg>
473+
</div>
474+
<h3 className='font-bold text-white mb-1 group-hover:text-cyan-300 transition-colors'>
475+
{t('loader.title')}
476+
</h3>
477+
<p className='text-gray-400 text-sm leading-relaxed'>
478+
{t('loader.description')}
479+
</p>
480+
</Link>
481+
440482
{user.isAdmin && (
441483
<Link
442484
href='/admin'

src/app/[locale]/result/[hash]/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ export default function ResultPage() {
487487
}
488488

489489
const pageUrl = typeof window !== 'undefined' ? window.location.href : '';
490+
const ogImageUrl =
491+
typeof window !== 'undefined' ? `${window.location.origin}/api/og-image/${hash}` : '';
490492

491493
return (
492494
<div
@@ -501,6 +503,7 @@ export default function ResultPage() {
501503
description={metaDescription}
502504
url={pageUrl}
503505
type='article'
506+
image={ogImageUrl}
504507
/>
505508

506509
<Navigation />

0 commit comments

Comments
 (0)