Show currently active key in settings (#542)
This commit is contained in:
@@ -14,10 +14,13 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
|
import { envCredential } from "@/util/env";
|
||||||
|
import { HiddenCopyableInput } from "@/components/ui/hidden-copyable-input";
|
||||||
|
|
||||||
function Settings() {
|
function Settings() {
|
||||||
const { environment, organization, setEnvironment, setOrganization } =
|
const { environment, organization, setEnvironment, setOrganization } =
|
||||||
useSettingsStore();
|
useSettingsStore();
|
||||||
|
const apiKey = envCredential;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-8">
|
<div className="flex flex-col gap-8">
|
||||||
@@ -55,6 +58,15 @@ function Settings() {
|
|||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader className="border-b-2">
|
||||||
|
<CardTitle className="text-lg">API Key</CardTitle>
|
||||||
|
<CardDescription>Currently active API key</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="p-8">
|
||||||
|
<HiddenCopyableInput value={apiKey ?? "API key not found"} />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user