mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): use translation for unnamed workflows
This commit is contained in:
parent
6d176601cc
commit
6e028d691a
@ -5,9 +5,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
const TopCenterPanel = () => {
|
const TopCenterPanel = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const name = useAppSelector(
|
const name = useAppSelector((state) => state.workflow.name);
|
||||||
(state) => state.workflow.name || 'Untitled Workflow'
|
|
||||||
);
|
|
||||||
const isTouched = useAppSelector((state) => state.workflow.isTouched);
|
const isTouched = useAppSelector((state) => state.workflow.isTouched);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -20,7 +18,7 @@ const TopCenterPanel = () => {
|
|||||||
fontWeight={600}
|
fontWeight={600}
|
||||||
opacity={0.8}
|
opacity={0.8}
|
||||||
>
|
>
|
||||||
{name}
|
{name || t('workflows.unnamedWorkflow')}
|
||||||
{isTouched ? ` (${t('common.unsaved')})` : ''}
|
{isTouched ? ` (${t('common.unsaved')})` : ''}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user