mirror of
https://gitlab.w-hs.de/an14051/backerup-website.git
synced 2026-07-27 17:35:29 +00:00
0d58fafe4e
- Add user management API endpoints for listing and creating users. - Implement login and logout functionality with rate limiting. - Create UI components for login form, logout button, and animated elements. - Add session management with JWT and secure cookie handling. - Seed initial admin user if no users exist. - Introduce utility functions for password hashing and user authentication. - Set up proxy middleware for route protection and security headers. - Create a JSON file for user data storage. - Add links configuration for external resources.
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import Link from "next/link";
|
|
import { readMeta, listGroups } from "@/lib/store";
|
|
import BrowseClient from "./BrowseClient";
|
|
|
|
export default async function BrowsePage() {
|
|
const [allRecords, groups] = await Promise.all([readMeta(), listGroups()]);
|
|
|
|
return (
|
|
<div className="mx-auto max-w-5xl px-6 py-16">
|
|
{/* Header */}
|
|
<div className="mb-10 flex flex-wrap items-end justify-between gap-4">
|
|
<div>
|
|
<p className="text-xs font-semibold uppercase tracking-widest text-cyan-400 mb-2">
|
|
Community
|
|
</p>
|
|
<h1 className="text-4xl font-extrabold tracking-tight text-white">
|
|
Browse shared files
|
|
</h1>
|
|
<p className="mt-2 text-slate-400">
|
|
Docker configs and backups shared by the community. Find, inspect, and restore in
|
|
seconds.
|
|
</p>
|
|
</div>
|
|
<Link
|
|
href="/share"
|
|
className="rounded-xl px-6 py-2.5 text-sm font-bold text-slate-900 transition-all hover:brightness-110 hover:scale-105 active:scale-95 shrink-0"
|
|
style={{ background: "linear-gradient(135deg, #22d3ee, #06b6d4)" }}
|
|
>
|
|
+ Share a file
|
|
</Link>
|
|
</div>
|
|
|
|
{/* Client section: search + filter + cards */}
|
|
<BrowseClient records={allRecords} groups={groups} />
|
|
</div>
|
|
);
|
|
}
|