Skip to content

Commit

Permalink
fix: 修复自动下滑的能力
Browse files Browse the repository at this point in the history
  • Loading branch information
SSmJaE committed Mar 23, 2023
1 parent b98a723 commit e6948f8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"welearn": {
"title": "随行课堂网课助手",
"name": "WELearn网课助手",
"version": "1.0.1",
"version": "1.0.2",
"matches": [
"*://course.sflep.com/*",
"*://welearn.sflep.com/*",
"*://courseappserver.sflep.com/*",
"*://centercourseware.sflep.com/*"
],
"namespace": "https://github.com/SSmJaE/WELearnHelper",
"description": "显示WE Learn随行课堂题目答案;支持班级测试;自动答题;刷时长;开放自定义设置",
"description": "显示WE Learn随行课堂题目答案;支持班级测试;自动答题;刷时长;基于生成式AI(ChatGPT)的答案生成",
"connect": [
"localhost",
"47.100.166.53"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "welearn_helper",
"version": "1.1.0",
"version": "1.0.1",
"author": "SSmJaE",
"license": "GPL-3.0",
"private": true,
Expand Down
6 changes: 5 additions & 1 deletion src/utils/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import Button, { IButtonProps } from "@components/Button";
function scrollDown() {
//等待message渲染完成,不然不会拉到最底
setTimeout(() => {
document.querySelector("#container-messages")?.scrollBy(0, 1000);
logger.debug("scroll down");

document
.querySelector("#log-panel-log-container .simplebar-content-wrapper")
?.scrollBy(0, 1000);
}, 10);
}

Expand Down
1 change: 1 addition & 0 deletions src/views/Log/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ export function LogPanel() {
</MenuBar>

<SimpleBar
id="log-panel-log-container"
style={{
borderTop: "black 2px solid",
padding: "4px 8px",
Expand Down

0 comments on commit e6948f8

Please sign in to comment.