--- import { getDatabase } from "@/db"; import { gpgKeys } from "@/db/schema"; import SettingsLayout from "@/layouts/SettingsLayout.astro"; import { desc, eq } from "drizzle-orm"; const user = Astro.locals.user; if (!user) { return Astro.redirect("/login"); } const db = getDatabase(); const keys = await db.query.gpgKeys.findMany({ where: eq(gpgKeys.userId, user.id), orderBy: [desc(gpgKeys.createdAt)], }); --- GPG Keys This is a list of GPG keys associated with your account. Keys are used to verify commit signatures. Your GPG Keys New GPG Key { keys.length > 0 ? ( {keys.map((key) => ( {key.name} Key ID: {key.keyId} Added on {new Date(key.createdAt).toLocaleDateString()} Delete ))} ) : ( No GPG keys added yet. ) } Add New GPG Key Name GPG Public Key Add Key Cancel
This is a list of GPG keys associated with your account. Keys are used to verify commit signatures.
{key.name}
Key ID: {key.keyId}
Added on {new Date(key.createdAt).toLocaleDateString()}
No GPG keys added yet.