Files
supabase/apps/studio/components/interfaces/Storage/BucketsPickerDialog/BucketTableHeader.tsx
Ivan Vasilov 35905e70d5 feat: Add a logo picker for OAuth app creation sheet (#44995)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Logo field now accepts/editable logo URL, plus a new storage-based
Logo Picker to select or remove images from project storage.
* Full storage picker: browse buckets, columns/list views, search,
drag‑and‑drop uploads, file previews (image/audio/video), and
single-file selection with responsive mobile/desktop layouts.

* **Refactor**
* Logo submission streamlined to send the provided URL directly (legacy
file-read/upload flow removed).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-06 16:44:18 +02:00

42 lines
1.4 KiB
TypeScript

import { TableHead, TableHeader, TableRow } from 'ui'
import {
VirtualizedTableHead,
VirtualizedTableHeader,
VirtualizedTableRow,
} from '@/components/ui/VirtualizedTable'
type BucketTableMode = 'standard' | 'virtualized'
type BucketTableHeaderProps = {
mode: BucketTableMode
hasBuckets?: boolean
}
export const BucketTableHeader = ({ mode, hasBuckets = true }: BucketTableHeaderProps) => {
const BucketTableHeader = mode === 'standard' ? TableHeader : VirtualizedTableHeader
const BucketTableRow = mode === 'standard' ? TableRow : VirtualizedTableRow
const BucketTableHead = mode === 'standard' ? TableHead : VirtualizedTableHead
const stickyClasses = 'sticky top-0 z-10 bg-200'
return (
<BucketTableHeader>
<BucketTableRow>
{hasBuckets && (
<BucketTableHead className={`${stickyClasses} w-2 pr-1`}>
<span className="sr-only">Icon</span>
</BucketTableHead>
)}
<BucketTableHead className={stickyClasses}>Name</BucketTableHead>
<BucketTableHead className={stickyClasses}>Policies</BucketTableHead>
<BucketTableHead className={stickyClasses}>File size limit</BucketTableHead>
<BucketTableHead className={stickyClasses}>Allowed MIME types</BucketTableHead>
<BucketTableHead className={stickyClasses}>
<span className="sr-only">Actions</span>
</BucketTableHead>
</BucketTableRow>
</BucketTableHeader>
)
}