Skip to content

Commit 8d696b0

Browse files
Mary HippMary Hipp
authored andcommitted
update announcements
1 parent a2486a5 commit 8d696b0

File tree

5 files changed

+36
-32
lines changed

5 files changed

+36
-32
lines changed

invokeai/frontend/web/public/locales/en.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,13 +2081,11 @@
20812081
},
20822082
"whatsNew": {
20832083
"whatsNewInInvoke": "What's New in Invoke",
2084-
"canvasV2Announcement": {
2085-
"newCanvas": "A powerful new control canvas",
2086-
"newLayerTypes": "New layer types for even more control",
2087-
"fluxSupport": "Support for the Flux family of models",
2088-
"readReleaseNotes": "Read Release Notes",
2089-
"watchReleaseVideo": "Watch Release Video",
2090-
"watchUiUpdatesOverview": "Watch UI Updates Overview"
2091-
}
2084+
"line1": "<ItalicComponent>Select Object</ItalicComponent> tool for precise object selection and editing",
2085+
"line2": "Expanded Flux support, now with Global Reference Images",
2086+
"line3": "Improved tooltips and context menus",
2087+
"readReleaseNotes": "Read Release Notes",
2088+
"watchRecentReleaseVideos": "Watch Recent Release Videos",
2089+
"watchUiUpdatesOverview": "Watch UI Updates Overview"
20922090
}
20932091
}

invokeai/frontend/web/src/features/ui/components/Notifications.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ import { useTranslation } from 'react-i18next';
2121
import { PiLightbulbFilamentBold } from 'react-icons/pi';
2222
import { useGetAppVersionQuery } from 'services/api/endpoints/appInfo';
2323

24-
import { CanvasV2Announcement } from './CanvasV2Announcement';
24+
import { WhatsNew } from './WhatsNew';
2525

2626
const selectIsLocal = createSelector(selectConfigSlice, (config) => config.isLocal);
2727

2828
export const Notifications = () => {
2929
const { t } = useTranslation();
3030
const dispatch = useAppDispatch();
31-
const shouldShowNotification = useAppSelector((s) => s.ui.shouldShowNotification);
31+
const shouldShowNotification = useAppSelector((s) => s.ui.shouldShowNotificationV2);
3232
const resetIndicator = useCallback(() => {
3333
dispatch(shouldShowNotificationChanged(false));
3434
}, [dispatch]);
@@ -58,11 +58,16 @@ export const Notifications = () => {
5858
<Flex alignItems="center" gap={3}>
5959
<Image src={InvokeSymbol} boxSize={6} />
6060
{t('whatsNew.whatsNewInInvoke')}
61-
{isLocal && <Text variant="subtext">{`v${data.version}`}</Text>}
61+
{!!data.version.length &&
62+
(isLocal ? (
63+
<Text variant="subtext">{`v${data.version}`}</Text>
64+
) : (
65+
<Text variant="subtext">{data.version}</Text>
66+
))}
6267
</Flex>
6368
</PopoverHeader>
64-
<PopoverBody p={2}>
65-
<CanvasV2Announcement />
69+
<PopoverBody p={2} maxW={300}>
70+
<WhatsNew />
6671
</PopoverBody>
6772
</PopoverContent>
6873
</Popover>

invokeai/frontend/web/src/features/ui/components/CanvasV2Announcement.tsx renamed to invokeai/frontend/web/src/features/ui/components/WhatsNew.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
import { ExternalLink, Flex, ListItem, UnorderedList } from '@invoke-ai/ui-library';
1+
import { ExternalLink, Flex, ListItem, Text, UnorderedList } from '@invoke-ai/ui-library';
22
import { createSelector } from '@reduxjs/toolkit';
33
import { useAppSelector } from 'app/store/storeHooks';
44
import { selectConfigSlice } from 'features/system/store/configSlice';
5-
import { useTranslation } from 'react-i18next';
5+
import { Trans, useTranslation } from 'react-i18next';
66

77
const selectIsLocal = createSelector(selectConfigSlice, (config) => config.isLocal);
88

9-
export const CanvasV2Announcement = () => {
9+
export const WhatsNew = () => {
1010
const { t } = useTranslation();
1111
const isLocal = useAppSelector(selectIsLocal);
1212

1313
return (
1414
<Flex gap={4} flexDir="column">
1515
<UnorderedList fontSize="sm">
16-
<ListItem>{t('whatsNew.canvasV2Announcement.newCanvas')}</ListItem>
17-
<ListItem>{t('whatsNew.canvasV2Announcement.newLayerTypes')}</ListItem>
18-
<ListItem>{t('whatsNew.canvasV2Announcement.fluxSupport')}</ListItem>
16+
<ListItem>
17+
<Trans
18+
i18nKey="whatsNew.line1"
19+
components={{
20+
ItalicComponent: <Text as="span" color="white" fontSize="sm" fontStyle="italic" />,
21+
}}
22+
/>
23+
</ListItem>
24+
<ListItem>{t('whatsNew.line2')}</ListItem>
25+
<ListItem>{t('whatsNew.line3')}</ListItem>
1926
</UnorderedList>
2027
<Flex flexDir="column" gap={1}>
2128
<ExternalLink
2229
fontSize="sm"
2330
fontWeight="semibold"
24-
label={t('whatsNew.canvasV2Announcement.readReleaseNotes')}
31+
label={t('whatsNew.readReleaseNotes')}
2532
href={
2633
isLocal
2734
? 'https://github.com/invoke-ai/InvokeAI/releases/tag/v5.0.0'
@@ -31,14 +38,8 @@ export const CanvasV2Announcement = () => {
3138
<ExternalLink
3239
fontSize="sm"
3340
fontWeight="semibold"
34-
label={t('whatsNew.canvasV2Announcement.watchReleaseVideo')}
35-
href="https://www.youtube.com/watch?v=y80W3PjR0Gc"
36-
/>
37-
<ExternalLink
38-
fontSize="sm"
39-
fontWeight="semibold"
40-
label={t('whatsNew.canvasV2Announcement.watchUiUpdatesOverview')}
41-
href="https://www.youtube.com/watch?v=Tl-69JvwJ2s"
41+
label={t('whatsNew.watchRecentReleaseVideos')}
42+
href="https://www.youtube.com/@invokeai/videos"
4243
/>
4344
</Flex>
4445
</Flex>

invokeai/frontend/web/src/features/ui/store/uiSlice.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const initialUIState: UIState = {
1515
shouldShowProgressInViewer: true,
1616
accordions: {},
1717
expanders: {},
18-
shouldShowNotification: true,
18+
shouldShowNotificationV2: true,
1919
};
2020

2121
export const uiSlice = createSlice({
@@ -43,7 +43,7 @@ export const uiSlice = createSlice({
4343
state.expanders[id] = isOpen;
4444
},
4545
shouldShowNotificationChanged: (state, action: PayloadAction<boolean>) => {
46-
state.shouldShowNotification = action.payload;
46+
state.shouldShowNotificationV2 = action.payload;
4747
},
4848
},
4949
extraReducers(builder) {

invokeai/frontend/web/src/features/ui/store/uiTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface UIState {
3131
*/
3232
expanders: Record<string, boolean>;
3333
/**
34-
* Whether or not to show the user the open notification.
34+
* Whether or not to show the user the open notification. Bump version to reset users who may have closed previous version.
3535
*/
36-
shouldShowNotification: boolean;
36+
shouldShowNotificationV2: boolean;
3737
}

0 commit comments

Comments
 (0)