mirror of
https://gitee.com/zhangsken/aliyunpan.git
synced 2026-10-16 02:23:49 +08:00
optimize downoad ui dashboard
This commit is contained in:
@@ -330,12 +330,13 @@ func (db *DownloadDashboard) render() {
|
|||||||
|
|
||||||
// 拼接并格式化输出
|
// 拼接并格式化输出
|
||||||
builder := &strings.Builder{}
|
builder := &strings.Builder{}
|
||||||
builder.WriteString("\x1b[H\x1b[2J") // 清屏操作
|
|
||||||
builder.WriteString(renderBox(headerLines, width))
|
builder.WriteString(renderBox(headerLines, width))
|
||||||
builder.WriteString(renderTitledBox("ActiveDownloads", activeLines, width))
|
builder.WriteString(renderTitledBox("ActiveDownloads", activeLines, width))
|
||||||
builder.WriteString(renderTitledBox("History", historyBody, width))
|
builder.WriteString(renderTitledBox("History", historyBody, width))
|
||||||
|
|
||||||
fmt.Fprint(db.out, builder.String())
|
content := builder.String()
|
||||||
|
fmt.Fprint(db.out, "\x1b[H\x1b[2J") // 清屏操作
|
||||||
|
fmt.Fprint(db.out, content)
|
||||||
}
|
}
|
||||||
|
|
||||||
type dashboardSnapshot struct {
|
type dashboardSnapshot struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user