add prompt

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

View File

@ -589,8 +589,13 @@ export function Chat(props: {
) {
const copiedHello = Object.assign({}, BOT_HELLO);
if (!accessStore.isAuthorized()) {
var code = prompt("请输入授权码");
if(code != null) {
accessStore.updateCode(code);
} else {
copiedHello.content = Locale.Error.Unauthorized;
}
}
context.push(copiedHello);
}