From 8a683f5a3c6a2d0db56f7fd3ede3cb61690d4b22 Mon Sep 17 00:00:00 2001
From: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date: Thu, 7 Nov 2024 10:24:02 +1000
Subject: [PATCH] feat(ui): updated whats new handling and v5.4.1 items
---
invokeai/frontend/web/public/locales/en.json | 6 ++-
.../src/features/ui/components/WhatsNew.tsx | 46 +++++++++----------
2 files changed, 25 insertions(+), 27 deletions(-)
diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json
index e9617accbf..3564472893 100644
--- a/invokeai/frontend/web/public/locales/en.json
+++ b/invokeai/frontend/web/public/locales/en.json
@@ -2102,8 +2102,10 @@
},
"whatsNew": {
"whatsNewInInvoke": "What's New in Invoke",
- "line1": "Layer Merging: New Merge Down and improved Merge Visible for all layers, with special handling for Regional Guidance and Control Layers.",
- "line2": "HF Token Support: Upload models that require Hugging Face authentication.",
+ "items": [
+ "SD 3.5: Support for Text-to-Image in Workflows with SD 3.5 Medium and Large.",
+ "Canvas: Streamlined Control Layer processing and improved default Control settings."
+ ],
"readReleaseNotes": "Read Release Notes",
"watchRecentReleaseVideos": "Watch Recent Release Videos",
"watchUiUpdatesOverview": "Watch UI Updates Overview"
diff --git a/invokeai/frontend/web/src/features/ui/components/WhatsNew.tsx b/invokeai/frontend/web/src/features/ui/components/WhatsNew.tsx
index 4fe2e11dee..6dd1579cb7 100644
--- a/invokeai/frontend/web/src/features/ui/components/WhatsNew.tsx
+++ b/invokeai/frontend/web/src/features/ui/components/WhatsNew.tsx
@@ -2,45 +2,41 @@ import { ExternalLink, Flex, ListItem, Text, UnorderedList } from '@invoke-ai/ui
import { createSelector } from '@reduxjs/toolkit';
import { useAppSelector } from 'app/store/storeHooks';
import { selectConfigSlice } from 'features/system/store/configSlice';
+import type { ReactNode } from 'react';
import { useMemo } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { useGetAppVersionQuery } from 'services/api/endpoints/appInfo';
const selectIsLocal = createSelector(selectConfigSlice, (config) => config.isLocal);
+const components = {
+ StrongComponent: ,
+};
+
export const WhatsNew = () => {
const { t } = useTranslation();
const { data } = useGetAppVersionQuery();
const isLocal = useAppSelector(selectIsLocal);
- const highlights = useMemo(() => (data?.highlights ? data.highlights : []), [data]);
+ const items = useMemo(() => {
+ if (data?.highlights?.length) {
+ return data.highlights.map((highlight, index) => {highlight});
+ }
+
+ const tKeys = t('whatsNew.items', {
+ returnObjects: true,
+ });
+
+ return tKeys.map((key, index) => (
+
+
+
+ ));
+ }, [data?.highlights, t]);
return (
-
- {highlights.length ? (
- highlights.map((highlight, index) => {highlight})
- ) : (
- <>
-
- ,
- }}
- />
-
-
- ,
- }}
- />
-
- >
- )}
-
+ {items}