fix: ui and layout
This commit is contained in:
parent
21243579b3
commit
6cb1846b23
@ -57,7 +57,7 @@ const TranslateButton: FC<Props> = ({ text, onTranslated, disabled, style }) =>
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
icon={<TranslationOutlined />}
|
icon={<TranslationOutlined style={{ fontSize: 14 }} />}
|
||||||
onClick={handleTranslate}
|
onClick={handleTranslate}
|
||||||
disabled={disabled || isTranslating}
|
disabled={disabled || isTranslating}
|
||||||
loading={isTranslating}
|
loading={isTranslating}
|
||||||
|
|||||||
@ -154,7 +154,7 @@
|
|||||||
"guidance_scale_tip": "Classifier Free Guidance. How close you want the model to stick to your prompt when looking for a related image to show you",
|
"guidance_scale_tip": "Classifier Free Guidance. How close you want the model to stick to your prompt when looking for a related image to show you",
|
||||||
"negative_prompt": "Negative Prompt",
|
"negative_prompt": "Negative Prompt",
|
||||||
"negative_prompt_tip": "Describe what you don't want included in the image",
|
"negative_prompt_tip": "Describe what you don't want included in the image",
|
||||||
"prompt_placeholder": "Describe the image you want to create, e.g. 'A serene lake at sunset with mountains in the background'",
|
"prompt_placeholder": "Describe the image you want to create, e.g. A serene lake at sunset with mountains in the background",
|
||||||
"regenerate.confirm": "This will replace your existing generated images. Do you want to continue?"
|
"regenerate.confirm": "This will replace your existing generated images. Do you want to continue?"
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
|
|||||||
@ -154,7 +154,7 @@
|
|||||||
"guidance_scale_tip": "无分类器指导。控制模型在寻找相关图像时对提示词的遵循程度",
|
"guidance_scale_tip": "无分类器指导。控制模型在寻找相关图像时对提示词的遵循程度",
|
||||||
"negative_prompt": "反向提示词",
|
"negative_prompt": "反向提示词",
|
||||||
"negative_prompt_tip": "描述你不想在图片中出现的内容",
|
"negative_prompt_tip": "描述你不想在图片中出现的内容",
|
||||||
"prompt_placeholder": "描述你想创建的图片,例如:'一个宁静的湖泊,夕阳西下,远处是群山'",
|
"prompt_placeholder": "描述你想创建的图片,例如:一个宁静的湖泊,夕阳西下,远处是群山",
|
||||||
"regenerate.confirm": "这将覆盖已生成的图片,是否继续?"
|
"regenerate.confirm": "这将覆盖已生成的图片,是否继续?"
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
|
|||||||
@ -154,7 +154,7 @@
|
|||||||
"guidance_scale_tip": "無分類器指導。控制模型在尋找相關圖像時對提示詞的遵循程度",
|
"guidance_scale_tip": "無分類器指導。控制模型在尋找相關圖像時對提示詞的遵循程度",
|
||||||
"negative_prompt": "反向提示詞",
|
"negative_prompt": "反向提示詞",
|
||||||
"negative_prompt_tip": "描述你不想在圖片中出現的內容",
|
"negative_prompt_tip": "描述你不想在圖片中出現的內容",
|
||||||
"prompt_placeholder": "描述你想創建的圖片,例如:'一個寧靜的湖泊,夕陽西下,遠處是群山'",
|
"prompt_placeholder": "描述你想創建的圖片,例如:一個寧靜的湖泊,夕陽西下,遠處是群山",
|
||||||
"regenerate.confirm": "這將覆蓋已生成的圖片,是否繼續?"
|
"regenerate.confirm": "這將覆蓋已生成的圖片,是否繼續?"
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
|
|||||||
@ -153,7 +153,7 @@ const AgentName = styled.span`
|
|||||||
|
|
||||||
const AgentPrompt = styled.p`
|
const AgentPrompt = styled.p`
|
||||||
color: var(--color-text-soft);
|
color: var(--color-text-soft);
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(20px);
|
transform: translateY(20px);
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import { SearchOutlined } from '@ant-design/icons'
|
||||||
import { VStack } from '@renderer/components/Layout'
|
import { VStack } from '@renderer/components/Layout'
|
||||||
import { useAssistants } from '@renderer/hooks/useAssistant'
|
import { useAssistants } from '@renderer/hooks/useAssistant'
|
||||||
import useScrollPosition from '@renderer/hooks/useScrollPosition'
|
import useScrollPosition from '@renderer/hooks/useScrollPosition'
|
||||||
@ -35,7 +36,7 @@ const TopicsHistory: React.FC<Props> = ({ keywords, onClick, onSearch, ...props
|
|||||||
<ListContainer {...props}>
|
<ListContainer {...props}>
|
||||||
<VStack alignItems="center">
|
<VStack alignItems="center">
|
||||||
<Empty description={t('history.search.topics.empty')} />
|
<Empty description={t('history.search.topics.empty')} />
|
||||||
<Button style={{ width: 200, marginTop: 20 }} type="primary" onClick={onSearch}>
|
<Button style={{ width: 200, marginTop: 20 }} type="primary" onClick={onSearch} icon={<SearchOutlined />}>
|
||||||
{t('history.search.messages')}
|
{t('history.search.messages')}
|
||||||
</Button>
|
</Button>
|
||||||
</VStack>
|
</VStack>
|
||||||
@ -63,6 +64,13 @@ const TopicsHistory: React.FC<Props> = ({ keywords, onClick, onSearch, ...props
|
|||||||
))}
|
))}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
|
{keywords.length >= 2 && (
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
||||||
|
<Button style={{ width: 200, marginTop: 20 }} type="primary" onClick={onSearch} icon={<SearchOutlined />}>
|
||||||
|
{t('history.search.messages')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div style={{ minHeight: 30 }}></div>
|
<div style={{ minHeight: 30 }}></div>
|
||||||
</ContainerWrapper>
|
</ContainerWrapper>
|
||||||
</ListContainer>
|
</ListContainer>
|
||||||
|
|||||||
@ -382,7 +382,7 @@ const PaintingsPage: FC = () => {
|
|||||||
text={textareaRef.current?.resizableTextArea?.textArea?.value}
|
text={textareaRef.current?.resizableTextArea?.textArea?.value}
|
||||||
onTranslated={handleTranslation}
|
onTranslated={handleTranslation}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
style={{ marginRight: 6 }}
|
style={{ marginRight: 6, borderRadius: '50%' }}
|
||||||
/>
|
/>
|
||||||
<SendMessageButton sendMessage={onGenerate} disabled={isLoading} />
|
<SendMessageButton sendMessage={onGenerate} disabled={isLoading} />
|
||||||
</ToolbarMenu>
|
</ToolbarMenu>
|
||||||
@ -439,13 +439,11 @@ const MainContainer = styled.div`
|
|||||||
const InputContainer = styled.div`
|
const InputContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100px;
|
min-height: 95px;
|
||||||
max-height: 100px;
|
max-height: 95px;
|
||||||
position: relative;
|
position: relative;
|
||||||
border: 1px solid var(--color-border-soft);
|
border-top: 1px solid var(--color-border-soft);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
margin: 0 20px 15px 20px;
|
|
||||||
border-radius: 10px;
|
|
||||||
`
|
`
|
||||||
|
|
||||||
const Textarea = styled(TextArea)`
|
const Textarea = styled(TextArea)`
|
||||||
@ -466,7 +464,7 @@ const Toolbar = styled.div`
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
height: 36px;
|
height: 40px;
|
||||||
`
|
`
|
||||||
|
|
||||||
const ToolbarMenu = styled.div`
|
const ToolbarMenu = styled.div`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user