mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 19:46:37 +08:00
reset
This commit is contained in:
parent
9deba4ae51
commit
4a4039bd7d
@ -105,41 +105,3 @@
|
|||||||
user-select: text;
|
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -582,8 +582,6 @@ export function Chat(props: {
|
|||||||
const context: RenderMessage[] = session.context.slice();
|
const context: RenderMessage[] = session.context.slice();
|
||||||
|
|
||||||
const accessStore = useAccessStore();
|
const accessStore = useAccessStore();
|
||||||
const [dialog, setDialog] = useState(false)
|
|
||||||
const [dialogValue, setDialogValue] = useState('')
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
context.length === 0 &&
|
context.length === 0 &&
|
||||||
@ -591,19 +589,11 @@ export function Chat(props: {
|
|||||||
) {
|
) {
|
||||||
const copiedHello = Object.assign({}, BOT_HELLO);
|
const copiedHello = Object.assign({}, BOT_HELLO);
|
||||||
if (!accessStore.isAuthorized()) {
|
if (!accessStore.isAuthorized()) {
|
||||||
// copiedHello.content = Locale.Error.Unauthorized;
|
copiedHello.content = Locale.Error.Unauthorized;
|
||||||
setDialog(true)
|
|
||||||
}
|
}
|
||||||
context.push(copiedHello);
|
context.push(copiedHello);
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClick = () =>{
|
|
||||||
accessStore.updateCode(dialogValue);
|
|
||||||
setDialog(false)
|
|
||||||
// const copiedHello = Object.assign({}, BOT_HELLO);
|
|
||||||
// context.push(copiedHello);
|
|
||||||
}
|
|
||||||
|
|
||||||
// preview messages
|
// preview messages
|
||||||
const messages = context
|
const messages = context
|
||||||
.concat(session.messages as RenderMessage[])
|
.concat(session.messages as RenderMessage[])
|
||||||
@ -841,19 +831,6 @@ export function Chat(props: {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{dialog ?
|
|
||||||
<div className="dialog">
|
|
||||||
<div className="dialog-modal">
|
|
||||||
<div className="title">认证过期,请重新输入ACCESS-CODE</div>
|
|
||||||
<div className="content-input">
|
|
||||||
<input value={dialogValue} type="text" placeholder='请输入ACCESS-CODE' onChange={(e) => {
|
|
||||||
accessStore.updateCode(e.currentTarget.value);
|
|
||||||
setDialogValue(e.currentTarget.value);
|
|
||||||
}} />
|
|
||||||
</div>
|
|
||||||
<button onClick={handleClick}>确定</button>
|
|
||||||
</div>
|
|
||||||
</div> : ''}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user