镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 14:36:48 +00:00
fix welcome card bugs
这个提交包含在:
@@ -155,7 +155,7 @@
|
|||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
transition: opacity 1s ease-in-out;
|
transition: opacity 0.6s ease-in-out;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
.welcome-card-container.show {
|
.welcome-card-container.show {
|
||||||
|
|||||||
@@ -145,8 +145,10 @@ class WelcomeMessage {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 等待动画结束
|
|
||||||
card.addEventListener('transitionend', () => {
|
card.classList.add('hide');
|
||||||
|
const timeout = 100; // 与CSS中transition的时间保持一致(0.1s)
|
||||||
|
setTimeout(() => {
|
||||||
// 更新卡片信息
|
// 更新卡片信息
|
||||||
const message = this.static_welcome_message_previous[index];
|
const message = this.static_welcome_message_previous[index];
|
||||||
const title = card.getElementsByClassName('welcome-card-title')[0];
|
const title = card.getElementsByClassName('welcome-card-title')[0];
|
||||||
@@ -158,16 +160,14 @@ class WelcomeMessage {
|
|||||||
text.href = message.url;
|
text.href = message.url;
|
||||||
content.textContent = message.content;
|
content.textContent = message.content;
|
||||||
card.classList.remove('hide');
|
card.classList.remove('hide');
|
||||||
|
|
||||||
// 等待动画结束
|
// 等待动画结束
|
||||||
card.addEventListener('transitionend', () => {
|
|
||||||
card.classList.remove('show');
|
|
||||||
}, { once: true });
|
|
||||||
card.classList.add('show');
|
card.classList.add('show');
|
||||||
|
const timeout = 100; // 与CSS中transition的时间保持一致(0.1s)
|
||||||
|
setTimeout(() => {
|
||||||
|
card.classList.remove('show');
|
||||||
|
}, timeout);
|
||||||
|
}, timeout);
|
||||||
|
|
||||||
}, { once: true });
|
|
||||||
|
|
||||||
card.classList.add('hide');
|
|
||||||
|
|
||||||
// 等待 250 毫秒
|
// 等待 250 毫秒
|
||||||
await new Promise(r => setTimeout(r, 200));
|
await new Promise(r => setTimeout(r, 200));
|
||||||
@@ -306,6 +306,12 @@ class WelcomeMessage {
|
|||||||
welcome_card_container.addEventListener('transitionend', () => {
|
welcome_card_container.addEventListener('transitionend', () => {
|
||||||
elem_chatbot.removeChild(welcome_card_container);
|
elem_chatbot.removeChild(welcome_card_container);
|
||||||
}, { once: true });
|
}, { once: true });
|
||||||
|
const timeout = 600; // 与CSS中transition的时间保持一致(1s)
|
||||||
|
setTimeout(() => {
|
||||||
|
if (welcome_card_container.parentNode) {
|
||||||
|
elem_chatbot.removeChild(welcome_card_container);
|
||||||
|
}
|
||||||
|
}, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
async isChatbotEmpty() {
|
async isChatbotEmpty() {
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户