mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into patch-1
This commit is contained in:
commit
d5134325f6
@ -2,11 +2,14 @@ import { Text } from '@chakra-ui/layout';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||
|
||||
const TopCenterPanel = () => {
|
||||
const { t } = useTranslation();
|
||||
const name = useAppSelector((state) => state.workflow.name);
|
||||
const isTouched = useAppSelector((state) => state.workflow.isTouched);
|
||||
const isWorkflowLibraryEnabled =
|
||||
useFeatureStatus('workflowLibrary').isFeatureEnabled;
|
||||
|
||||
return (
|
||||
<Text
|
||||
@ -19,7 +22,7 @@ const TopCenterPanel = () => {
|
||||
opacity={0.8}
|
||||
>
|
||||
{name || t('workflows.unnamedWorkflow')}
|
||||
{isTouched ? ` (${t('common.unsaved')})` : ''}
|
||||
{isTouched && isWorkflowLibraryEnabled ? ` (${t('common.unsaved')})` : ''}
|
||||
</Text>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user