镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-07 23:16:48 +00:00
update
这个提交包含在:
@@ -172,7 +172,7 @@
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
flex: 0 0 calc(30% - 10px);
|
flex: 0 0 calc(30% - 10px);
|
||||||
transition: opacity 0.5s ease-in-out;
|
transition: opacity 0.2s ease-in-out;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,18 +54,21 @@ class WelcomeMessage {
|
|||||||
this.max_welcome_card_num = 6;
|
this.max_welcome_card_num = 6;
|
||||||
this.card_array = [];
|
this.card_array = [];
|
||||||
this.static_welcome_message_previous = [];
|
this.static_welcome_message_previous = [];
|
||||||
|
this.reflesh_time_interval = 15*1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
begin_render() {
|
begin_render() {
|
||||||
this.update();
|
this.update();
|
||||||
this.startRefleshCards();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async startRefleshCards() {
|
async startRefleshCards() {
|
||||||
|
await new Promise(r => setTimeout(r, this.reflesh_time_interval));
|
||||||
await this.reflesh_cards();
|
await this.reflesh_cards();
|
||||||
|
if (this.visible){
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.startRefleshCards.call(this);
|
this.startRefleshCards.call(this);
|
||||||
}, 15000);
|
}, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async reflesh_cards() {
|
async reflesh_cards() {
|
||||||
@@ -110,8 +113,8 @@ class WelcomeMessage {
|
|||||||
|
|
||||||
card.classList.add('hide');
|
card.classList.add('hide');
|
||||||
|
|
||||||
// 等待 500 毫秒
|
// 等待 250 毫秒
|
||||||
await new Promise(r => setTimeout(r, 250));
|
await new Promise(r => setTimeout(r, 200));
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
@@ -135,19 +138,23 @@ class WelcomeMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async update() {
|
async update() {
|
||||||
console.log('update')
|
// console.log('update')
|
||||||
if (!await this.isChatbotEmpty()) {
|
if (!await this.isChatbotEmpty()) {
|
||||||
if (this.visible) {
|
if (this.visible) {
|
||||||
this.removeWelcome();
|
this.removeWelcome();
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
this.card_array = [];
|
||||||
|
this.static_welcome_message_previous = [];
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.visible){
|
if (this.visible){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// console.log("welcome");
|
||||||
this.showWelcome();
|
this.showWelcome();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.startRefleshCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
showCard(message) {
|
showCard(message) {
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户