The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: update context menu styling
gitstart7be4f9637a6e
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.jsindex 45d5cb5ba0d..c4b780fc109 100644--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.js+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.js@@ -2,6 +2,7 @@ import { Menu, Item, Separator, Submenu } from 'react-contexify'import 'react-contexify/dist/ReactContexify.css'import { STORAGE_VIEWS, STORAGE_SORT_BY, STORAGE_SORT_BY_ORDER } from '../Storage.constants'+import { IconEye, IconChevronRight, IconFolderPlus, IconClipboard, IconChevronsUp, IconChevronsDown } from 'ui'const ColumnContextMenu = ({id = '',@@ -18,7 +19,8 @@ const ColumnContextMenu = ({onCreateNewFolder(props.index)}}>- New folder+ <IconFolderPlus size="tiny" />+ <span className="sb-grid-context-menu__label">New folder</span></Item><Separator /><Item@@ -26,21 +28,60 @@ const ColumnContextMenu = ({onSelectAllItems(props.index)}}>- Select all items+ <IconClipboard size="tiny" />+ <span className="sb-grid-context-menu__label">Select all items</span></Item>- <Submenu label="View">- <Item onClick={() => onSelectView(STORAGE_VIEWS.COLUMNS)}>As columns</Item>- <Item onClick={() => onSelectView(STORAGE_VIEWS.LIST)}>As list</Item>+ <Separator />+ <Submenu label={+ <div className="flex items-center space-x-2">+ <IconEye size="tiny" />+ <span className="text-xs">View</span>+ </div>+ }+ arrow={<IconChevronRight size="tiny" />}+ >+ <Item onClick={() => onSelectView(STORAGE_VIEWS.COLUMNS)}>+ <span className="sb-grid-context-menu__label">As columns</span>+ </Item>+ <Item onClick={() => onSelectView(STORAGE_VIEWS.LIST)}>+ <span className="sb-grid-context-menu__label">As list</span>+ </Item></Submenu>- <Submenu label="Sort by">- <Item onClick={() => onSelectSort(STORAGE_SORT_BY.NAME)}>Name</Item>- <Item onClick={() => onSelectSort(STORAGE_SORT_BY.CREATED_AT)}>Last created</Item>- <Item onClick={() => onSelectSort(STORAGE_SORT_BY.UPDATED_AT)}>Last modified</Item>- <Item onClick={() => onSelectSort(STORAGE_SORT_BY.LAST_ACCESSED_AT)}>Last accessed</Item>+ <Submenu label={+ <div className="flex items-center space-x-2">+ <IconChevronsDown size="tiny" />+ <span className="text-xs">Sort by</span>+ </div>+ }+ arrow={<IconChevronRight size="tiny" />}+ >+ <Item onClick={() => onSelectSort(STORAGE_SORT_BY.NAME)}>+ <span className="text-xs">Name</span>+ </Item>+ <Item onClick={() => onSelectSort(STORAGE_SORT_BY.CREATED_AT)}>+ <span className="text-xs">Last created</span>+ </Item>+ <Item onClick={() => onSelectSort(STORAGE_SORT_BY.UPDATED_AT)}>+ <span className="text-xs">Last modified</span>+ </Item>+ <Item onClick={() => onSelectSort(STORAGE_SORT_BY.LAST_ACCESSED_AT)}>+ <span className="text-xs">Last accessed</span>+ </Item></Submenu>- <Submenu label="Sort by order">- <Item onClick={() => onSelectSortByOrder(STORAGE_SORT_BY_ORDER.ASC)}>Ascending</Item>- <Item onClick={() => onSelectSortByOrder(STORAGE_SORT_BY_ORDER.DESC)}>Descending</Item>+ <Submenu label={+ <div className="flex items-center space-x-2">+ <IconChevronsUp size="tiny" />+ <span className="text-xs">Sort by order</span>+ </div>+ }+ arrow={<IconChevronRight size="tiny" />}+ >+ <Item onClick={() => onSelectSortByOrder(STORAGE_SORT_BY_ORDER.ASC)}>+ <span className="text-xs">Ascending</span>+ </Item>+ <Item onClick={() => onSelectSortByOrder(STORAGE_SORT_BY_ORDER.DESC)}>+ <span className="text-xs">Descending</span>+ </Item></Submenu></Menu>)diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FolderContextMenu.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/FolderContextMenu.jsindex 72d6ae9951b..f6165af675b 100644--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FolderContextMenu.js+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FolderContextMenu.js@@ -1,6 +1,7 @@import { useStorageStore } from 'localStores/storageExplorer/StorageExplorerStore'-import { Menu, Item } from 'react-contexify'+import { Menu, Item, Separator } from 'react-contexify'import 'react-contexify/dist/ReactContexify.css'+import { IconEdit, IconDownload, IconTrash2 } from 'ui'const FolderContextMenu = ({ id = '', onRenameFolder = () => {}, onDeleteFolder = () => {} }) => {const storageExplorerStore = useStorageStore()@@ -8,9 +9,19 @@ const FolderContextMenu = ({ id = '', onRenameFolder = () => {}, onDeleteFolderreturn (<Menu id={id} animation="fade">- <Item onClick={({ props }) => onRenameFolder(props.item)}>Rename</Item>- <Item onClick={({ props }) => downloadFolder(props.item)}>Download</Item>- <Item onClick={({ props }) => onDeleteFolder(props.item)}>Delete</Item>+ <Item onClick={({ props }) => onRenameFolder(props.item)}>+ <IconEdit size="tiny" />+ <span className="ml-2 text-xs">Rename</span>+ </Item>+ <Item onClick={({ props }) => downloadFolder(props.item)}>+ <IconDownload size="tiny" />+ <span className="ml-2 text-xs">Download</span>+ </Item>+ <Separator />+ <Item onClick={({ props }) => onDeleteFolder(props.item)}>+ <IconTrash2 size="tiny" />+ <span className="ml-2 text-xs">Delete</span>+ </Item></Menu>)}diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/ItemContextMenu.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/ItemContextMenu.jsindex eb48047e271..385192f4538 100644--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/ItemContextMenu.js+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/ItemContextMenu.js@@ -37,7 +37,7 @@ const ItemContextMenu = ({ id = '' }) => {}return (- <Menu id={id} animation="fade" className="!bg-scale-300 border border-scale-500">+ <Menu id={id} animation="fade">{isPublic ? (<Item onClick={({ props }) => onHandleClick('copy', props.item)}><IconClipboard size="tiny" />diff --git a/studio/styles/contextMenu.scss b/studio/styles/contextMenu.scssindex 418b2fcd9a0..2acf83d7d31 100644--- a/studio/styles/contextMenu.scss+++ b/studio/styles/contextMenu.scss@@ -1,5 +1,5 @@.react-contexify {- @apply dark:bg-gray-700;+ @apply dark:bg-scale-300 border border-scale-500;.react-contexify__item {.react-contexify__item__content {@apply dark:text-white text-sm;