Files
supabase/apps/studio/components/interfaces/App/CommandMenu/CommandMenu.tsx
Charis d6f96780e9 feat: add configure org command (#29092)
* feat: add switch org command

* fix: change switch org to configure org

The org doesn't really get globally switched, you just land on the
settings page, so this seems more accurate.

* fix: allow cjk ime input on commandinput component
2024-09-09 11:25:22 -04:00

47 lines
2.0 KiB
TypeScript

import { IS_PLATFORM } from 'common'
import { useBranchCommands } from 'components/interfaces/BranchManagement/Branch.Commands'
import { useSnippetCommands } from 'components/layouts/SQLEditorLayout/SqlEditor.Commands'
import { useGenerateSqlCommand } from 'components/interfaces/SqlGenerator/SqlGenerator.Commands'
import { useProjectLevelTableEditorCommands } from 'components/layouts/TableEditorLayout/TableEditor.Commands'
import { useLayoutNavCommands } from 'components/layouts/useLayoutNavCommands'
import { CommandHeader, CommandInput, CommandList, CommandMenu } from 'ui-patterns/CommandMenu'
import { useChangelogCommand } from 'ui-patterns/CommandMenu/prepackaged/Changelog'
import { useDocsAiCommands } from 'ui-patterns/CommandMenu/prepackaged/DocsAi'
import { useDocsSearchCommands } from 'ui-patterns/CommandMenu/prepackaged/DocsSearch'
import { useThemeSwitcherCommands } from 'ui-patterns/CommandMenu/prepackaged/ThemeSwitcher'
import { useApiKeysCommands } from './ApiKeys'
import { useApiUrlCommand } from './ApiUrl'
import { useProjectSwitchCommand, useConfigureOrganizationCommand } from './OrgProjectSwitcher'
import { useSupportCommands } from './Support'
import { orderCommandSectionsByPriority } from './ordering'
export default function StudioCommandMenu() {
useGenerateSqlCommand()
useApiKeysCommands()
useApiUrlCommand()
useProjectLevelTableEditorCommands()
useProjectSwitchCommand()
useConfigureOrganizationCommand()
useBranchCommands()
useSnippetCommands()
useLayoutNavCommands()
useDocsSearchCommands({
options: { orderSection: orderCommandSectionsByPriority, sectionMeta: { priority: 3 } },
})
useDocsAiCommands({
options: { orderSection: orderCommandSectionsByPriority, sectionMeta: { priority: 3 } },
})
useSupportCommands()
useChangelogCommand({ enabled: IS_PLATFORM })
useThemeSwitcherCommands()
return (
<CommandMenu>
<CommandHeader>
<CommandInput />
</CommandHeader>
<CommandList />
</CommandMenu>
)
}