feat(ui): make workflow support link work like a link

This commit is contained in:
psychedelicious
2024-10-10 13:31:26 +10:00
parent 0399b04f29
commit 4050f7deae
2 changed files with 14 additions and 18 deletions

View File

@@ -875,7 +875,7 @@
"nodeType": "Node Type",
"noFieldsLinearview": "No fields added to Linear View",
"noFieldsViewMode": "This workflow has no selected fields to display. View the full workflow to configure values.",
"workflowHelpText": "Need Help? Check out our guide to <LinkComponent>Getting Started with Workflows</LinkComponent>",
"workflowHelpText": "Need Help? Check out our guide to <LinkComponent>Getting Started with Workflows</LinkComponent>.",
"noNodeSelected": "No node selected",
"nodeOpacity": "Node Opacity",
"nodeVersion": "Node Version",

View File

@@ -1,4 +1,4 @@
import { Button, Flex, Image, Text } from '@invoke-ai/ui-library';
import { Button, Flex, Image, Link, Text } from '@invoke-ai/ui-library';
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import { useWorkflowListMenu } from 'features/nodes/store/workflowListMenu';
import { selectCleanEditor, workflowModeChanged } from 'features/nodes/store/workflowSlice';
@@ -53,22 +53,7 @@ export const EmptyState = () => {
</Button>
</Flex>
<Text textAlign="center" fontSize="md">
<Trans
i18nKey="nodes.workflowHelpText"
size="sm"
components={{
LinkComponent: (
<Text
as="a"
color="white"
fontSize="md"
fontWeight="semibold"
href="https://support.invoke.ai/support/solutions/articles/151000159663-example-workflows"
target="_blank"
/>
),
}}
/>
<Trans i18nKey="nodes.workflowHelpText" size="sm" components={workflowHelpTextComponents} />
</Text>
</>
) : (
@@ -85,3 +70,14 @@ export const EmptyState = () => {
</Flex>
);
};
const workflowHelpTextComponents = {
LinkComponent: (
<Link
fontSize="md"
fontWeight="semibold"
href="https://support.invoke.ai/support/solutions/articles/151000159663-example-workflows"
target="_blank"
/>
),
};