mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 13:54:31 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { PermissionAction } from '@supabase/shared-types/out/constants'
|
|
import { Trash2 } from 'lucide-react'
|
|
|
|
import { DropdownMenuItemTooltip } from 'components/ui/DropdownMenuItemTooltip'
|
|
import type { APIKeysData } from 'data/api-keys/api-keys-query'
|
|
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
|
|
|
|
interface APIKeyDeleteDialogProps {
|
|
apiKey: Extract<APIKeysData[number], { type: 'secret' | 'publishable' }>
|
|
setKeyToDelete: (id: string | null) => void
|
|
}
|
|
|
|
export const APIKeyDeleteDialog = ({ apiKey, setKeyToDelete }: APIKeyDeleteDialogProps) => {
|
|
const { can: canDeleteAPIKeys } = useAsyncCheckPermissions(
|
|
PermissionAction.TENANT_SQL_ADMIN_WRITE,
|
|
'*'
|
|
)
|
|
|
|
return (
|
|
<DropdownMenuItemTooltip
|
|
className="flex gap-2"
|
|
onClick={() => {
|
|
if (canDeleteAPIKeys) {
|
|
setKeyToDelete(apiKey.id)
|
|
}
|
|
}}
|
|
disabled={!canDeleteAPIKeys}
|
|
tooltip={{
|
|
content: {
|
|
side: 'left',
|
|
text: !canDeleteAPIKeys
|
|
? 'You need additional permissions to delete API keys'
|
|
: undefined,
|
|
},
|
|
}}
|
|
>
|
|
<Trash2 size={14} strokeWidth={1.5} /> Delete API key
|
|
</DropdownMenuItemTooltip>
|
|
)
|
|
}
|