Skip to content

Commit

Permalink
add prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
lishiyun1227 committed Apr 17, 2023
1 parent 4a4039b commit b4d60b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,12 @@ export function Chat(props: {
) {
const copiedHello = Object.assign({}, BOT_HELLO);
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);
}
Expand Down

0 comments on commit b4d60b0

Please sign in to comment.