add prompt

This commit is contained in:
lishiyun1227 2023-04-17 15:10:01 +08:00
parent 4a4039bd7d
commit b4d60b0047

View File

@ -589,7 +589,12 @@ 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; var code = prompt("请输入授权码");
if(code != null) {
accessStore.updateCode(code);
} else {
copiedHello.content = Locale.Error.Unauthorized;
}
} }
context.push(copiedHello); context.push(copiedHello);
} }