fix: api key details section (#7488)

This commit is contained in:
Frane Polić authored and GitHub committed 2024-05-28 08:45:34 +02:00
1 parent ad21bd30b1
commit 582c9c9acf
2 files changed
+17 -6

No files matched your search

@@ -1452,6 +1452,7 @@
"fields": { "fields": {
"lastUsedAtLabel": "Last used at", "lastUsedAtLabel": "Last used at",
"revokedByLabel": "Revoked by", "revokedByLabel": "Revoked by",
"revokedAtLabel": "Revoked at",
"createdByLabel": "Created by" "createdByLabel": "Created by"
} }
}, },
@@ -195,12 +195,22 @@ export const ApiKeyGeneralSection = ({ apiKey }: ApiKeyGeneralSectionProps) => {
<ActionBy userId={apiKey.created_by} /> <ActionBy userId={apiKey.created_by} />
</div> </div>
{apiKey.revoked_at && ( {apiKey.revoked_at && (
<div className="grid grid-cols-2 items-center px-6 py-4"> <>
<Text size="small" leading="compact" weight="plus"> <div className="text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4">
{t("apiKeyManagement.fields.revokedByLabel")} <Text size="small" leading="compact" weight="plus">
</Text> {t("apiKeyManagement.fields.revokedAtLabel")}
<ActionBy userId={apiKey.revoked_by} /> </Text>
</div> <Text size="small" leading="compact">
{getFullDate({ date: apiKey.revoked_at, includeTime: true })}
</Text>
</div>
<div className="text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4">
<Text size="small" leading="compact" weight="plus">
{t("apiKeyManagement.fields.revokedByLabel")}
</Text>
<ActionBy userId={apiKey.revoked_by} />
</div>
</>
)} )}
</Container> </Container>
) )