mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
udo
This commit is contained in:
parent
0770e757c3
commit
615639c72e
@ -1,4 +1,4 @@
|
|||||||
import { Editable, EditableInput, EditablePreview, Text } from '@invoke-ai/ui-library';
|
import { Text } from '@invoke-ai/ui';
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
import { useAppSelector } from 'app/store/storeHooks';
|
||||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||||
import { memo, useMemo } from 'react';
|
import { memo, useMemo } from 'react';
|
||||||
@ -13,50 +13,24 @@ const TopCenterPanel = () => {
|
|||||||
|
|
||||||
const displayName = useMemo(() => {
|
const displayName = useMemo(() => {
|
||||||
let _displayName = name || t('workflows.unnamedWorkflow');
|
let _displayName = name || t('workflows.unnamedWorkflow');
|
||||||
|
if (isTouched && isWorkflowLibraryEnabled) {
|
||||||
|
_displayName += ` (${t('common.unsaved')})`;
|
||||||
|
}
|
||||||
return _displayName;
|
return _displayName;
|
||||||
}, [t, name, isTouched, isWorkflowLibraryEnabled]);
|
}, [t, name, isTouched, isWorkflowLibraryEnabled]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Editable defaultValue={displayName}>
|
<Text
|
||||||
<EditablePreview
|
m={2}
|
||||||
m={2}
|
fontSize="lg"
|
||||||
fontSize="lg"
|
userSelect="none"
|
||||||
noOfLines={1}
|
noOfLines={1}
|
||||||
wordBreak="break-all"
|
wordBreak="break-all"
|
||||||
fontWeight="semibold"
|
fontWeight="semibold"
|
||||||
opacity={0.8}
|
opacity={0.8}
|
||||||
/>
|
>
|
||||||
<EditableInput />
|
{displayName}
|
||||||
{isTouched && isWorkflowLibraryEnabled ? (
|
</Text>
|
||||||
<Text
|
|
||||||
m={2}
|
|
||||||
fontSize="lg"
|
|
||||||
userSelect="none"
|
|
||||||
noOfLines={1}
|
|
||||||
wordBreak="break-all"
|
|
||||||
fontWeight="semibold"
|
|
||||||
opacity={0.8}
|
|
||||||
>
|
|
||||||
({t('common.unsaved')})
|
|
||||||
</Text>
|
|
||||||
) : (
|
|
||||||
''
|
|
||||||
)}
|
|
||||||
</Editable>
|
|
||||||
// <Text
|
|
||||||
// m={2}
|
|
||||||
// fontSize="lg"
|
|
||||||
// userSelect="none"
|
|
||||||
// noOfLines={1}
|
|
||||||
// wordBreak="break-all"
|
|
||||||
// fontWeight="semibold"
|
|
||||||
// opacity={0.8}
|
|
||||||
// >
|
|
||||||
// <Editable
|
|
||||||
// {displayName}
|
|
||||||
// {isTouched && isWorkflowLibraryEnabled ? `(${t('common.unsaved')})` : ''}
|
|
||||||
// </Text>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user