镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 14:36:48 +00:00
optimize welcome page
这个提交包含在:
@@ -96,6 +96,9 @@ class WelcomeMessage {
|
|||||||
};
|
};
|
||||||
const pageFocusHandler = new PageFocusHandler();
|
const pageFocusHandler = new PageFocusHandler();
|
||||||
pageFocusHandler.addFocusCallback(reflesh_render_status);
|
pageFocusHandler.addFocusCallback(reflesh_render_status);
|
||||||
|
|
||||||
|
// call update when page size change, call this.update when page size change
|
||||||
|
window.addEventListener('resize', this.update.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
begin_render() {
|
begin_render() {
|
||||||
@@ -207,9 +210,8 @@ class WelcomeMessage {
|
|||||||
const width_to_hide_welcome = 1200;
|
const width_to_hide_welcome = 1200;
|
||||||
if (!await this.isChatbotEmpty() || page_width < width_to_hide_welcome || welcome_card_overflow) {
|
if (!await this.isChatbotEmpty() || page_width < width_to_hide_welcome || welcome_card_overflow) {
|
||||||
if (this.visible) {
|
if (this.visible) {
|
||||||
// console.log("remove welcome");
|
console.log("remove welcome");
|
||||||
this.removeWelcome();
|
this.removeWelcome(); this.visible = false; // this two lines must always be together
|
||||||
this.visible = false;
|
|
||||||
this.card_array = [];
|
this.card_array = [];
|
||||||
this.static_welcome_message_previous = [];
|
this.static_welcome_message_previous = [];
|
||||||
}
|
}
|
||||||
@@ -218,9 +220,8 @@ class WelcomeMessage {
|
|||||||
if (this.visible) {
|
if (this.visible) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// console.log("welcome");
|
console.log("show welcome");
|
||||||
this.showWelcome();
|
this.showWelcome(); this.visible = true; // this two lines must always be together
|
||||||
this.visible = true;
|
|
||||||
this.startRefleshCards();
|
this.startRefleshCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户