--- import DashboardLayout from '../../layouts/DashboardLayout.astro'; import { Icon } from 'astro-icon/components'; import { db } from '../../db'; import { apiTokens } from '../../db/schema'; import { eq, desc } from 'drizzle-orm'; const user = Astro.locals.user; if (!user) return Astro.redirect('/login'); const url = new URL(Astro.request.url); const successType = url.searchParams.get('success'); const userTokens = await db.select() .from(apiTokens) .where(eq(apiTokens.userId, user.id)) .orderBy(desc(apiTokens.createdAt)) .all(); ---

Account Settings

{/* Success Messages */} {successType === 'profile' && (
Profile updated successfully!
)} {successType === 'password' && (
Password changed successfully!
)}

Profile Information

Email cannot be changed

Change Password

Minimum 8 characters

API Tokens

{userTokens.length === 0 ? ( ) : ( userTokens.map(token => ( )) )}
Name Last Used Created Actions
No API tokens found. Create one to access the API.
{token.name} {token.lastUsedAt ? token.lastUsedAt.toLocaleDateString() : 'Never'} {token.createdAt ? token.createdAt.toLocaleDateString() : 'N/A'}

Account Information

Account ID {user.id}
Email {user.email}
Site Administrator {user.isSiteAdmin ? "Yes" : "No"}