🐛 fix: Fix some style problem and image info bugs

pull/477/head
canisminor1990 2023-11-29 11:05:07 +08:00
parent ab55147502
commit 3e0e9421a8
14 changed files with 107 additions and 60 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "Benutzerdefiniert"
},
"cancel": "Abbrechen",
"confirm": "Bestätigen",
"custom": {
"initializing": "StableDiffusion / LobeTheme initialisiert, bitte warten..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "Custom"
},
"cancel": "Cancel",
"confirm": "Confirm",
"custom": {
"initializing": "StableDiffusion / LobeTheme is initializing, please wait..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "Personalizado"
},
"cancel": "Cancelar",
"confirm": "Confirmar",
"custom": {
"initializing": "StableDiffusion / LobeTheme se está inicializando, por favor espere..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "Personnalisé"
},
"cancel": "Annuler",
"confirm": "Confirmer",
"custom": {
"initializing": "StableDiffusion / LobeTheme est en cours d'initialisation, veuillez patienter..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "カスタム"
},
"cancel": "キャンセル",
"confirm": "確認",
"custom": {
"initializing": "StableDiffusion / LobeTheme が初期化中です。お待ちください..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "사용자 정의"
},
"cancel": "취소",
"confirm": "확인",
"custom": {
"initializing": "StableDiffusion / LobeTheme이 초기화 중입니다. 잠시 기다려주세요..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "Personalizado"
},
"cancel": "Cancelar",
"confirm": "Confirmar",
"custom": {
"initializing": "StableDiffusion / LobeTheme está inicializando, por favor aguarde..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "Пользовательский"
},
"cancel": "Отмена",
"confirm": "Подтвердить",
"custom": {
"initializing": "StableDiffusion / LobeTheme инициализируется, пожалуйста, подождите..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "自定义"
},
"cancel": "取消",
"confirm": "确认",
"custom": {
"initializing": "StableDiffusion / LobeTheme 正在初始化,请稍候..."
},

View File

@ -4,6 +4,8 @@
"lobe": "LobeHub",
"custom": "自定義"
},
"cancel": "取消",
"confirm": "確認",
"custom": {
"initializing": "StableDiffusion / LobeTheme 正在初始化,請稍候..."
},

View File

@ -1,4 +1,4 @@
import { Button } from 'antd';
import { Button, Popconfirm } from 'antd';
import { memo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
@ -16,9 +16,17 @@ const Footer = memo(() => {
return (
<>
<Button danger onClick={onReset} style={{ borderRadius: 4 }} type="text">
{t('setting.button.reset')}
</Button>
<Popconfirm
cancelText={t('cancel')}
okText={t('confirm')}
okType={'danger'}
onConfirm={onReset}
title={t('setting.button.reset')}
>
<Button danger style={{ borderRadius: 4 }}>
{t('setting.button.reset')}
</Button>
</Popconfirm>
<Button htmlType="submit" style={{ borderRadius: 4 }} type="primary">
{t('setting.button.submit')}
</Button>

View File

@ -23,9 +23,20 @@ export const formatInfo = (info: string) => {
configs[items[0].trim()] = items[1].trim();
}
let position = data[0];
let negative = data[2] ? data[1] : '';
if (position.includes('Negative prompt:')) {
negative = position;
position = '';
}
position = formatPrompt(position);
negative = formatPrompt(negative.split('Negative prompt: ')[1]);
return {
config: configs,
negative: formatPrompt(data[2] ? decodeURI(data[1]).split('Negative prompt: ')[1] : ''),
positive: formatPrompt(decodeURI(data[0])),
negative: negative,
positive: position,
};
};

View File

@ -84,7 +84,7 @@ export default (token: Theme) => {
[id$='_gallery_container'] {
min-height: 470px;
> div {
> div:not([id$='_generate_box']) {
flex-grow: 1;
[id$='_gallery'] {
@ -92,5 +92,9 @@ export default (token: Theme) => {
}
}
}
div[id^='img2img_'].block.gradio-image {
height: auto !important;
}
`;
};