diff --git a/app/components/chat.module.scss b/app/components/chat.module.scss index 366ffd05f..91c38e58c 100644 --- a/app/components/chat.module.scss +++ b/app/components/chat.module.scss @@ -104,42 +104,4 @@ font-size: 12px; user-select: text; } -} -.dialog{ - position: relative; - margin: 0 auto; - background-color: rgba(0,0,0,0.2); - color: var(--black); - .dialog-modal{ - position: absolute; - left: 10%; - right: 10%; - width: 30%; - height: 300px; - top: 20%; - background-color: var(--white); - font-size: 12px; - color: var(--black); - - border: var(--border-in-light); - box-shadow: var(--card-shadow); - padding: 10px 20px; - border-radius: 8px; - animation: slide-in-from-top ease 0.3s; - .title{ - border-bottom: 1px solid #e6e5e5; - position: relative; - color: var(--black); - font-size: 14px; - } - .content-input{ - padding: 20px; - margin-bottom: 30px; - } - button{ - background-color: #009999; - padding: 9px 20px; - - } - } } \ No newline at end of file diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 3fd30e28a..00d3f1b59 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -582,8 +582,6 @@ export function Chat(props: { const context: RenderMessage[] = session.context.slice(); const accessStore = useAccessStore(); - const [dialog, setDialog] = useState(false) - const [dialogValue, setDialogValue] = useState('') if ( context.length === 0 && @@ -591,19 +589,11 @@ export function Chat(props: { ) { const copiedHello = Object.assign({}, BOT_HELLO); if (!accessStore.isAuthorized()) { - // copiedHello.content = Locale.Error.Unauthorized; - setDialog(true) + copiedHello.content = Locale.Error.Unauthorized; } context.push(copiedHello); } - const handleClick = () =>{ - accessStore.updateCode(dialogValue); - setDialog(false) - // const copiedHello = Object.assign({}, BOT_HELLO); - // context.push(copiedHello); - } - // preview messages const messages = context .concat(session.messages as RenderMessage[]) @@ -841,19 +831,6 @@ export function Chat(props: { /> - {dialog ? -
-
-
认证过期,请重新输入ACCESS-CODE
-
- { - accessStore.updateCode(e.currentTarget.value); - setDialogValue(e.currentTarget.value); - }} /> -
- -
-
: ''} ); -} +} \ No newline at end of file