mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-06-27 19:30:28 +08:00
improve conversationCard style
This commit is contained in:
@@ -8,6 +8,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import { isUsingCustomModel } from '../../config/index.mjs'
|
||||
import { useConfig } from '../../hooks/use-config.mjs'
|
||||
|
||||
// eslint-disable-next-line
|
||||
export function ConversationItem({ type, content, session, done, port, onRetry }) {
|
||||
const { t } = useTranslation()
|
||||
const [collapsed, setCollapsed] = useState(false)
|
||||
@@ -56,17 +57,6 @@ export function ConversationItem({ type, content, session, done, port, onRetry }
|
||||
: t('Loading...')}
|
||||
</p>
|
||||
<div className="gpt-util-group">
|
||||
{!done && (
|
||||
<button
|
||||
type="button"
|
||||
className="normal-button"
|
||||
onClick={() => {
|
||||
port.postMessage({ stop: true })
|
||||
}}
|
||||
>
|
||||
{t('Stop')}
|
||||
</button>
|
||||
)}
|
||||
{onRetry && (
|
||||
<span title={t('Retry')} className="gpt-util-icon" onClick={onRetry}>
|
||||
<SyncIcon size={14} />
|
||||
|
||||
@@ -49,13 +49,12 @@ export function InputBox({ onSubmit, enabled, port, reverseResizeDir }) {
|
||||
const handleKeyDownOrClick = (e) => {
|
||||
e.stopPropagation()
|
||||
if (e.type === 'click' || (e.keyCode === 13 && e.shiftKey === false)) {
|
||||
e.preventDefault()
|
||||
if (enabled) {
|
||||
e.preventDefault()
|
||||
if (!value) return
|
||||
onSubmit(value)
|
||||
setValue('')
|
||||
} else {
|
||||
e.preventDefault()
|
||||
port.postMessage({ stop: true })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
background-color: var(--theme-color);
|
||||
color: var(--font-color);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
|
||||
::-webkit-scrollbar {
|
||||
background-color: var(--theme-color);
|
||||
|
||||
Reference in New Issue
Block a user