修复界面显示

main
落雨楓 2 years ago
parent 270eb211b5
commit 42d4dfd42a

@ -1,8 +1,9 @@
{ {
"isekai-chatcomplete": "异世界百科 智能聊天助理", "isekai-chatcomplete": "异世界百科 智能写作助手",
"isekai-chatcomplete-desc": "支持询问智能聊天助理页面相关的内容。", "isekai-chatcomplete-desc": "支持询问智能写作助手页面相关的内容。",
"isekai-chatcomplete-menubutton": "启动智能助理", "isekai-chatcomplete-menubutton": "启动智能助理",
"isekai-chatcomplete-loading": "正在加载智能写作助手",
"action-chatcomplete": "使用 Chat Complete 功能", "action-chatcomplete": "使用 Chat Complete 功能",
"right-chatcomplete": "使用 Chat Complete 功能", "right-chatcomplete": "使用 Chat Complete 功能",
@ -46,7 +47,7 @@
"apihelp-chatcompletebot+reportusage-param-error": "报告错误信息", "apihelp-chatcompletebot+reportusage-param-error": "报告错误信息",
"apihelp-chatcompletebot+reportusage-param-transactionid": "当step为end或cancel时需要事务ID", "apihelp-chatcompletebot+reportusage-param-transactionid": "当step为end或cancel时需要事务ID",
"apierror-isekai-chatcomplete-nopermission": "没有使用智能聊天助理的权限", "apierror-isekai-chatcomplete-nopermission": "没有使用智能写作助手的权限",
"apierror-isekai-chatcomplete-user-not-exists": "用户不存在", "apierror-isekai-chatcomplete-user-not-exists": "用户不存在",
"apierror-isekai-chatcomplete-noenoughpoints": "积分不足" "apierror-isekai-chatcomplete-noenoughpoints": "积分不足"
} }

@ -20,14 +20,14 @@ function launchChatComplete() {
var currentTime = new Date().getTime(); var currentTime = new Date().getTime();
if (currentTime - tokenRefreshTime > 3600000) { if (currentTime - tokenRefreshTime > 3600000) {
mw.notify(mw.msg('isekai-chatcomplete-loading'), { mw.notify(mw.msg('isekai-chatcomplete-loading'), {
id: "loading-chatcomplete-notify", id: "loading-chatcomplete-notify"
autoHide: false
}); });
createToken().done(function(data) { createToken().done(function(data) {
if (data.chatcomplete && data.chatcomplete.createtoken) { if (data.chatcomplete && data.chatcomplete.createtoken) {
authToken = data.chatcomplete.createtoken.token; authToken = data.chatcomplete.createtoken.token;
tokenRefreshTime = new Date().getTime(); tokenRefreshTime = new Date().getTime();
openChatCompletePage(authToken); openChatCompletePage(authToken);
$('#loading-chatcomplete-notify').trigger('click');
} }
}); });
} else { } else {

Loading…
Cancel
Save