Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

2.1 KB
Raw Blame
import { Divider, Flex, Spacer } from '@invoke-ai/ui-library';
import { UserMenu } from 'features/auth/components/UserMenu';
import { useIsCustomNodesEnabled } from 'features/customNodes/useIsCustomNodesEnabled';
import InvokeAILogoComponent from 'features/system/components/InvokeAILogoComponent';
import SettingsMenu from 'features/system/components/SettingsModal/SettingsMenu';
import StatusIndicator from 'features/system/components/StatusIndicator';
import { VideosModalButton } from 'features/system/components/VideosModal/VideosModalButton';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import {
  PiBoundingBoxBold,
  PiCircuitryBold,
  PiCubeBold,
  PiFlowArrowBold,
  PiFrameCornersBold,
  PiQueueBold,
  PiTextAaBold,
} from 'react-icons/pi';

import { Notifications } from './Notifications';
import { TabButton } from './TabButton';

export const VerticalNavBar = memo(() => {
  const { t } = useTranslation();
  const { isAllowed: isCustomNodesAllowed } = useIsCustomNodesEnabled();

  return (
    <Flex flexDir="column" alignItems="center" py={6} ps={4} pe={2} gap={4} minW={0} flexShrink={0}>
      <InvokeAILogoComponent />

      <Flex gap={6} pt={6} h="full" flexDir="column">
        <TabButton tab="generate" icon={<PiTextAaBold />} label={t('ui.tabs.generate')} />
        <TabButton tab="canvas" icon={<PiBoundingBoxBold />} label={t('ui.tabs.canvas')} />
        <TabButton tab="upscaling" icon={<PiFrameCornersBold />} label={t('ui.tabs.upscaling')} />
        <TabButton tab="workflows" icon={<PiFlowArrowBold />} label={t('ui.tabs.workflows')} />
      </Flex>

      <Spacer />

      <StatusIndicator />
      <TabButton tab="models" icon={<PiCubeBold />} label={t('ui.tabs.models')} />
      {isCustomNodesAllowed && (
        <TabButton tab="customNodes" icon={<PiCircuitryBold />} label={t('ui.tabs.customNodes')} />
      )}
      <TabButton tab="queue" icon={<PiQueueBold />} label={t('ui.tabs.queue')} />

      <Divider />

      <UserMenu />
      <Notifications />
      <VideosModalButton />
      <SettingsMenu />
    </Flex>
  );
});

VerticalNavBar.displayName = 'VerticalNavBar';