fix: ui and layout

This commit is contained in:
kangfenmao 2024-11-01 12:06:30 +08:00
parent 21243579b3
commit 6cb1846b23
7 changed files with 19 additions and 13 deletions

View File

@ -57,7 +57,7 @@ const TranslateButton: FC<Props> = ({ text, onTranslated, disabled, style }) =>
return (
<Button
icon={<TranslationOutlined />}
icon={<TranslationOutlined style={{ fontSize: 14 }} />}
onClick={handleTranslate}
disabled={disabled || isTranslating}
loading={isTranslating}

View File

@ -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",
"negative_prompt": "Negative Prompt",
"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?"
},
"files": {

View File

@ -154,7 +154,7 @@
"guidance_scale_tip": "无分类器指导。控制模型在寻找相关图像时对提示词的遵循程度",
"negative_prompt": "反向提示词",
"negative_prompt_tip": "描述你不想在图片中出现的内容",
"prompt_placeholder": "描述你想创建的图片,例如:'一个宁静的湖泊,夕阳西下,远处是群山'",
"prompt_placeholder": "描述你想创建的图片,例如:一个宁静的湖泊,夕阳西下,远处是群山",
"regenerate.confirm": "这将覆盖已生成的图片,是否继续?"
},
"files": {

View File

@ -154,7 +154,7 @@
"guidance_scale_tip": "無分類器指導。控制模型在尋找相關圖像時對提示詞的遵循程度",
"negative_prompt": "反向提示詞",
"negative_prompt_tip": "描述你不想在圖片中出現的內容",
"prompt_placeholder": "描述你想創建的圖片,例如:'一個寧靜的湖泊,夕陽西下,遠處是群山'",
"prompt_placeholder": "描述你想創建的圖片,例如:一個寧靜的湖泊,夕陽西下,遠處是群山",
"regenerate.confirm": "這將覆蓋已生成的圖片,是否繼續?"
},
"files": {

View File

@ -153,7 +153,7 @@ const AgentName = styled.span`
const AgentPrompt = styled.p`
color: var(--color-text-soft);
font-size: 14px;
font-size: 12px;
max-width: 100%;
opacity: 0;
transform: translateY(20px);

View File

@ -1,3 +1,4 @@
import { SearchOutlined } from '@ant-design/icons'
import { VStack } from '@renderer/components/Layout'
import { useAssistants } from '@renderer/hooks/useAssistant'
import useScrollPosition from '@renderer/hooks/useScrollPosition'
@ -35,7 +36,7 @@ const TopicsHistory: React.FC<Props> = ({ keywords, onClick, onSearch, ...props
<ListContainer {...props}>
<VStack alignItems="center">
<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')}
</Button>
</VStack>
@ -63,6 +64,13 @@ const TopicsHistory: React.FC<Props> = ({ keywords, onClick, onSearch, ...props
))}
</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>
</ContainerWrapper>
</ListContainer>

View File

@ -382,7 +382,7 @@ const PaintingsPage: FC = () => {
text={textareaRef.current?.resizableTextArea?.textArea?.value}
onTranslated={handleTranslation}
disabled={isLoading}
style={{ marginRight: 6 }}
style={{ marginRight: 6, borderRadius: '50%' }}
/>
<SendMessageButton sendMessage={onGenerate} disabled={isLoading} />
</ToolbarMenu>
@ -439,13 +439,11 @@ const MainContainer = styled.div`
const InputContainer = styled.div`
display: flex;
flex-direction: column;
min-height: 100px;
max-height: 100px;
min-height: 95px;
max-height: 95px;
position: relative;
border: 1px solid var(--color-border-soft);
border-top: 1px solid var(--color-border-soft);
transition: all 0.3s ease;
margin: 0 20px 15px 20px;
border-radius: 10px;
`
const Textarea = styled(TextArea)`
@ -466,7 +464,7 @@ const Toolbar = styled.div`
justify-content: flex-end;
padding: 0 8px;
padding-bottom: 0;
height: 36px;
height: 40px;
`
const ToolbarMenu = styled.div`