Files
supabase/studio/components/grid/constants.ts
T
Alec Merdler 2ec1d0bd2c Only show RLS warning badge if banner has been dismissed
Addresses #14130 by firing an event when the RLS warning banner
is dismissed, which triggers the RLS warning badge to be visible.
This works across browser tabs and without a page refresh by
using the BroadcastChannel API.
2023-08-11 23:46:00 +01:00

22 lines
700 B
TypeScript

import PQueue from 'p-queue'
export const SupabaseGridQueue = new PQueue({ concurrency: 1 })
export const COLUMN_MIN_WIDTH = 100
export const STORAGE_KEY_PREFIX = 'supabase_grid'
export const REFRESH_PAGE_IMMEDIATELY = -1
export const TOTAL_ROWS_INITIAL = -1
export const TOTAL_ROWS_RESET = -2
export const SELECT_COLUMN_KEY = 'supabase-grid-select-row'
export const ADD_COLUMN_KEY = 'supabase-grid-add-column'
export const ERROR_PRIMARY_KEY_NOTFOUND =
'Please add a primary key column to your table to update or delete rows'
export const RLS_ACKNOWLEDGED_KEY = 'supabase-acknowledge-rls-warning'
export const rlsAcknowledgedKey = (tableID?: string) => `${RLS_ACKNOWLEDGED_KEY}-${tableID}`