mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 03:45:06 +03:00
* Add flags for policies, third party auth, and manual linking + providers in sign in page * Add flag for rate limitm page * Add UnknownInterface components * Update comment * Flip flags to true * Add flags for realtime policies and reports page * Temp * Add flag for sign in providers page * Add flag for stripe wrapper * Add flag for custom domains * Add flag for dedicated ipv4 address addon * Add empty state for realtime policies * Add empty state for reports page * Add flag for disable legacy JWT keys section * Add flag for legacy jwt keys * nit * Remove ConnectionStringMoved call out * Add flag for project settings log drains * Add flag for subscription link in project settings * Deprecate settings/auth page and redirect directly to auth page * Flip back flags * Add flags for account preferences analytics marketing and account deleetion * Remove 'table_editor:enable_rls_toggle' flag and revert UI changes * Remove 'authentication:policies' flag and revert UI changes * Update flags --------- Co-authored-by: Terry Sutton <saltcod@gmail.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
|
|
import type { Project } from 'data/projects/project-detail-query'
|
|
import { IS_PLATFORM } from 'lib/constants'
|
|
|
|
export const generateRealtimeMenu = (
|
|
project: Project,
|
|
flags?: { enableRealtimeSettings: boolean }
|
|
): ProductMenuGroup[] => {
|
|
const ref = project?.ref ?? 'default'
|
|
const { enableRealtimeSettings } = flags || {}
|
|
const showRealtimeSettings = IS_PLATFORM && enableRealtimeSettings
|
|
|
|
return [
|
|
{
|
|
title: 'Tools',
|
|
items: [
|
|
{
|
|
name: 'Inspector',
|
|
key: 'inspector',
|
|
url: `/project/${ref}/realtime/inspector`,
|
|
items: [],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Configuration',
|
|
items: [
|
|
{
|
|
name: 'Policies',
|
|
key: 'policies',
|
|
url: `/project/${ref}/realtime/policies`,
|
|
items: [],
|
|
},
|
|
...(showRealtimeSettings
|
|
? [
|
|
{
|
|
name: 'Settings',
|
|
key: 'settings',
|
|
url: `/project/${ref}/realtime/settings`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
],
|
|
},
|
|
]
|
|
}
|