Files
supabase/apps/studio/components/interfaces/JwtSecrets/algorithm-hover-card.tsx
T
Stojan DimitrovskiandIvan Vasilov 4945ba1861 feat: add asymmetric JWT UI (#36519)
* original files from previous PR

* get rid of router in jwt-secrets to make it show up

* rename jwt-secrets page to jwt-signing-keys

* add jwt-signing-keys query

* add legacy jwt signing keys query

* wire-up JwtSecretKeysTable with queries

* add jwt signing keys page to settings menu

* deduplicate labels, descriptions, etc

* add create, update jwt-signing-key mutations

* update types

* remove unused components, to be refactored later

* make everything into a mostly working state

* legacy migration added

* put jwt keys page like api keys

* fully migrate legacy jwt secret page

* fix prettier

* fix typecheck ts-expect-error

* rm unneeded file

* Fix compile errors.

* Rename the files and move them to the same folder.

* Merge the two constant files.

* Fix the imports.

* Fix a bug in the API keys page when opening it in a new tab.

* Change the page to be at /signing-keys

* Fix some minor types.

* Break apart some of the components in the signing keys UI.

* Use a feature banner for the initial action.

* Make a create key dialog and move functionality there.

* Fix some cosmetic issues.

* Minor cosmetic fixes.

* Remove extra keys in RQ cache.

* Add a missing link

* Add a banner when the feature flag is false.

* Minor type fix.

* more tiny type fix

* fix error on create standby key

* add alert to prevent revoking legacy jwt secret without disabling legacy api keys first

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-23 09:36:07 +12:00

25 lines
717 B
TypeScript

import { GlobeLock } from 'lucide-react'
import React from 'react'
import { InfoPill } from '../../ui/InfoPill'
import { AlgorithmDetail, algorithmDetails } from './algorithm-details'
interface AlgorithmHoverCardProps {
algorithm: keyof typeof algorithmDetails
legacy?: boolean
}
export const AlgorithmHoverCard: React.FC<AlgorithmHoverCardProps> = ({ algorithm, legacy }) => {
const details: AlgorithmDetail = algorithmDetails[algorithm]
return (
<InfoPill
label={legacy ? `Legacy JWT Secret ${details.label}` : details.label}
icon={<GlobeLock className="w-4" strokeWidth={1} />}
title={details.name}
description={details.description}
links={details.links}
/>
)
}