mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-02 02:40:50 +08:00
fix(logs): auto-scroll to latest on full reload
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,5 +22,6 @@ package-lock.json
|
||||
Thumbs.db
|
||||
|
||||
CLAUDE.md
|
||||
.claude
|
||||
AGENTS.md
|
||||
.serena
|
||||
4
app.js
4
app.js
@@ -1750,8 +1750,8 @@ class CLIProxyManager {
|
||||
// 增量加载:追加新日志
|
||||
this.appendLogs(response.lines, response['line-count'] || 0);
|
||||
} else if (!incremental && response.lines.length > 0) {
|
||||
// 全量加载:重新渲染
|
||||
this.renderLogs(response.lines, response['line-count'] || response.lines.length, false);
|
||||
// 全量加载:重新渲染,默认滚动到底部显示最新日志
|
||||
this.renderLogs(response.lines, response['line-count'] || response.lines.length, true);
|
||||
} else if (!incremental) {
|
||||
// 全量加载但没有日志
|
||||
logsContent.innerHTML = '<div class="empty-state"><i class="fas fa-inbox"></i><p data-i18n="logs.empty_title">' +
|
||||
|
||||
Reference in New Issue
Block a user