feat: link to API docs from Settings > API keys
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { headers } from "next/headers";
|
import { headers } from "next/headers";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { ExternalLink } from "lucide-react";
|
||||||
import { auth } from "@/lib/auth/server";
|
import { auth } from "@/lib/auth/server";
|
||||||
import { db, apiKeys, eq } from "@epicure/db";
|
import { db, apiKeys, eq } from "@epicure/db";
|
||||||
import { ApiKeysManager } from "@/components/settings/api-keys-manager";
|
import { ApiKeysManager } from "@/components/settings/api-keys-manager";
|
||||||
@@ -30,6 +32,14 @@ export default async function ApiKeysPage() {
|
|||||||
<p className="text-sm text-muted-foreground mt-1">
|
<p className="text-sm text-muted-foreground mt-1">
|
||||||
{m.settings.apiKeysPage.description}
|
{m.settings.apiKeysPage.description}
|
||||||
</p>
|
</p>
|
||||||
|
<Link
|
||||||
|
href="/docs"
|
||||||
|
target="_blank"
|
||||||
|
className="inline-flex items-center gap-1 text-sm text-primary hover:underline mt-2"
|
||||||
|
>
|
||||||
|
<ExternalLink className="h-3.5 w-3.5" />
|
||||||
|
{m.settings.apiKeysPage.docsLink}
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<ApiKeysManager
|
<ApiKeysManager
|
||||||
initialKeys={keys.map((k) => ({
|
initialKeys={keys.map((k) => ({
|
||||||
|
|||||||
@@ -242,7 +242,8 @@
|
|||||||
},
|
},
|
||||||
"apiKeysPage": {
|
"apiKeysPage": {
|
||||||
"title": "API Keys",
|
"title": "API Keys",
|
||||||
"description": "Manage API keys for programmatic access to the Epicure API."
|
"description": "Manage API keys for programmatic access to the Epicure API.",
|
||||||
|
"docsLink": "View API documentation"
|
||||||
},
|
},
|
||||||
"pushNotifications": {
|
"pushNotifications": {
|
||||||
"title": "Push Notifications",
|
"title": "Push Notifications",
|
||||||
|
|||||||
@@ -242,7 +242,8 @@
|
|||||||
},
|
},
|
||||||
"apiKeysPage": {
|
"apiKeysPage": {
|
||||||
"title": "Clés API",
|
"title": "Clés API",
|
||||||
"description": "Gérez les clés API pour un accès programmatique à l'API Epicure."
|
"description": "Gérez les clés API pour un accès programmatique à l'API Epicure.",
|
||||||
|
"docsLink": "Voir la documentation de l'API"
|
||||||
},
|
},
|
||||||
"pushNotifications": {
|
"pushNotifications": {
|
||||||
"title": "Notifications push",
|
"title": "Notifications push",
|
||||||
|
|||||||
Reference in New Issue
Block a user