mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55: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 * Add flags for cmd K routes * Add flags for instance size in infra settings * Small refactor to DisplayApiSettings, decouple ToggleLegacyApiKeysPanel from it * Have project_connection:javascript_example toggle code example title to TS * add flag for templates dropdown in logs explorer * UsesOverview only show link to providers page if providers is enabled * API Docs UserManagement to only include docs on third party auth if providers is enabled * Hide instance size on project card if flag is off * Fix cmd k for roles, update redirect link from settings/auth to auth/providers
67 lines
2.1 KiB
TypeScript
67 lines
2.1 KiB
TypeScript
import { useParams } from 'common'
|
|
import { COMMAND_MENU_SECTIONS } from 'components/interfaces/App/CommandMenu/CommandMenu.utils'
|
|
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
|
import type { CommandOptions } from 'ui-patterns/CommandMenu'
|
|
import { useRegisterCommands } from 'ui-patterns/CommandMenu'
|
|
import { IRouteCommand } from 'ui-patterns/CommandMenu/internal/types'
|
|
|
|
export function useLogsGotoCommands(options?: CommandOptions) {
|
|
let { ref } = useParams()
|
|
ref ||= '_'
|
|
|
|
const { logsCollections } = useIsFeatureEnabled(['logs:collections'])
|
|
|
|
useRegisterCommands(
|
|
COMMAND_MENU_SECTIONS.NAVIGATE,
|
|
[
|
|
{
|
|
id: 'nav-logs-explorer',
|
|
name: 'Logs Explorer',
|
|
route: `/project/${ref}/logs/explorer`,
|
|
defaultHidden: true,
|
|
},
|
|
...(logsCollections
|
|
? ([
|
|
{
|
|
id: 'nav-logs-postgres',
|
|
name: 'Postgres Logs',
|
|
route: `/project/${ref}/logs/postgres-logs`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-logs-postgrest',
|
|
name: 'PostgREST Logs',
|
|
route: `/project/${ref}/logs/postgrest-logs`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-logs-pooler',
|
|
name: 'Pooler Logs',
|
|
route: `/project/${ref}/logs/pooler-logs`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-logs-auth',
|
|
name: 'Auth Logs',
|
|
route: `/project/${ref}/logs/auth-logs`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-logs-storage',
|
|
name: 'Storage Logs',
|
|
route: `/project/${ref}/logs/storage-logs`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-logs-realtime',
|
|
name: 'Realtime Logs',
|
|
route: `/project/${ref}/logs/realtime-logs`,
|
|
defaultHidden: true,
|
|
},
|
|
] as IRouteCommand[])
|
|
: []),
|
|
],
|
|
{ ...options, deps: [ref] }
|
|
)
|
|
}
|