mirror of
https://github.com/supabase/supabase.git
synced 2026-05-12 13:19:37 +08:00
<!-- 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 -->
42 lines
1.4 KiB
TypeScript
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>
|
|
)
|
|
}
|