mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix hotkey key & untranslated string
This commit is contained in:
parent
6930d8ba41
commit
8f9e9e639e
@ -86,6 +86,7 @@
|
||||
"copyError": "$t(gallery.copy) Error",
|
||||
"close": "Close",
|
||||
"on": "On",
|
||||
"or": "or",
|
||||
"checkpoint": "Checkpoint",
|
||||
"communityLabel": "Community",
|
||||
"controlNet": "ControlNet",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable i18next/no-literal-string */
|
||||
import { Flex, Kbd, Spacer } from '@chakra-ui/react';
|
||||
import { InvText } from 'common/components/InvText/wrapper';
|
||||
import { memo } from 'react';
|
||||
import { Fragment, memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface HotkeysModalProps {
|
||||
hotkeys: string[][];
|
||||
@ -10,6 +10,7 @@ interface HotkeysModalProps {
|
||||
}
|
||||
|
||||
const HotkeyListItem = (props: HotkeysModalProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { title, hotkeys, description } = props;
|
||||
return (
|
||||
<Flex flexDir="column" gap={2} px={2}>
|
||||
@ -18,7 +19,7 @@ const HotkeyListItem = (props: HotkeysModalProps) => {
|
||||
<Spacer />
|
||||
{hotkeys.map((hotkey, index) => {
|
||||
return (
|
||||
<>
|
||||
<Fragment key={`${hotkey}-${index}`}>
|
||||
{hotkey.map((key, index) => (
|
||||
<>
|
||||
<Kbd
|
||||
@ -41,10 +42,10 @@ const HotkeyListItem = (props: HotkeysModalProps) => {
|
||||
variant="subtext"
|
||||
fontWeight="semibold"
|
||||
>
|
||||
or
|
||||
{t('common.or')}
|
||||
</InvText>
|
||||
)}
|
||||
</>
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
</Flex>
|
||||
|
Loading…
Reference in New Issue
Block a user