From b4d60b00476894d5ae9b42ad5dca6734bdb8a46f Mon Sep 17 00:00:00 2001 From: lishiyun1227 Date: Mon, 17 Apr 2023 15:10:01 +0800 Subject: [PATCH] add prompt --- app/components/chat.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 00d3f1b5902..1d842a786b5 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -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); }