Skip to content

Commit

Permalink
feat(ui): add links to studio sessions/discord
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious committed Nov 8, 2024
1 parent 340880b commit 666b609
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
2 changes: 2 additions & 0 deletions invokeai/frontend/web/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,8 @@
"gettingStarted": "Getting Started",
"controlCanvas": "Control Canvas",
"watchOnYoutube": "Watch on YouTube",
"studioSessionsDesc1": "Check out the <StudioSessionsPlaylistLink /> for Invoke deep dives.",
"studioSessionsDesc2": "Join our <DiscordLink /> to participate in the live sessions and ask questions. Sessions are uploaded to the playlist the following week.",
"videos": {
"creatingYourFirstImage": {
"title": "Creating Your First Image",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
ExternalLink,
Flex,
Modal,
ModalBody,
Expand All @@ -7,16 +8,42 @@ import {
ModalFooter,
ModalHeader,
ModalOverlay,
Text,
} from '@invoke-ai/ui-library';
import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent';
import { buildUseDisclosure } from 'common/hooks/useBoolean';
import { controlCanvasVideos, gettingStartedVideos } from 'features/system/components/VideosModal/data';
import {
controlCanvasVideos,
gettingStartedVideos,
studioSessionsPlaylistLink,
} from 'features/system/components/VideosModal/data';
import { VideoCardList } from 'features/system/components/VideosModal/VideoCardList';
import { discordLink } from 'features/system/store/constants';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Trans, useTranslation } from 'react-i18next';

export const [useVideosModal] = buildUseDisclosure(false);

const StudioSessionsPlaylistLink = () => {
return (
<ExternalLink
fontWeight="semibold"
href={studioSessionsPlaylistLink}
display="inline-flex"
label="Studio Sessions playlist"
/>
);
};

const DiscordLink = () => {
return <ExternalLink fontWeight="semibold" href={discordLink} display="inline-flex" label="Discord" />;
};

const components = {
StudioSessionsPlaylistLink: <StudioSessionsPlaylistLink />,
DiscordLink: <DiscordLink />,
};

export const VideosModal = memo(() => {
const { t } = useTranslation();
const videosModal = useVideosModal();
Expand All @@ -27,9 +54,17 @@ export const VideosModal = memo(() => {
<ModalContent maxH="80vh" h="80vh">
<ModalHeader bg="none">{t('supportVideos.supportVideos')}</ModalHeader>
<ModalCloseButton />
<ModalBody display="flex" flexDir="column" gap={4}>
<ModalBody>
<ScrollableContent>
<Flex flexDir="column" gap={4}>
<Flex flexDir="column" gap={2} pb={2}>
<Text fontSize="md">
<Trans i18nKey="supportVideos.studioSessionsDesc1" components={components} />
</Text>
<Text fontSize="md">
<Trans i18nKey="supportVideos.studioSessionsDesc2" components={components} />
</Text>
</Flex>
<VideoCardList category={t('supportVideos.gettingStarted')} videos={gettingStartedVideos} />
<VideoCardList category={t('supportVideos.controlCanvas')} videos={controlCanvasVideos} />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ export const controlCanvasVideos: VideoData[] = [
length: { minutes: 0, seconds: 48 },
},
];

export const studioSessionsPlaylistLink = 'https://www.youtube.com/playlist?list=PLvWK1Kc8iXGq_8tWZqnwDVaf9uhlDC09U';

0 comments on commit 666b609

Please sign in to comment.