From fc98a4ae70093a5ee473bb892e3b99a22706647f Mon Sep 17 00:00:00 2001 From: cmliu Date: Wed, 29 Jul 2026 22:26:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E8=A1=A8=E6=8E=92=E5=BA=8F=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=91=BD=E4=BB=A4=E5=88=97=E6=8E=92=E5=BA=8F=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B9=B6=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/index.html | 2 +- frontend/src/process-manager.ts | 4 ++-- frontend/src/style.css | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 6c2e7b6..4b05cc0 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -463,7 +463,7 @@ - 名称/命令行 + diff --git a/frontend/src/process-manager.ts b/frontend/src/process-manager.ts index 122add3..9def423 100644 --- a/frontend/src/process-manager.ts +++ b/frontend/src/process-manager.ts @@ -33,7 +33,7 @@ interface ProcessEntry { command: string; } -type ProcessSortKey = 'pid' | 'user' | 'memoryBytes' | 'memoryPercent' | 'cpuPercent' | 'state' | 'time'; +type ProcessSortKey = 'pid' | 'user' | 'memoryBytes' | 'memoryPercent' | 'cpuPercent' | 'state' | 'time' | 'command'; type SortDirection = 'ascending' | 'descending'; interface ProcessSnapshot { @@ -202,7 +202,7 @@ export class ProcessManager { this.sortDirection = this.sortDirection === 'ascending' ? 'descending' : 'ascending'; } else { this.sortKey = key; - this.sortDirection = key === 'user' || key === 'state' ? 'ascending' : 'descending'; + this.sortDirection = key === 'user' || key === 'state' || key === 'command' ? 'ascending' : 'descending'; } this.updateSortHeaders(); this.render(); diff --git a/frontend/src/style.css b/frontend/src/style.css index 8b98df2..8521239 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -1395,7 +1395,8 @@ button:disabled { .process-table th:nth-child(5) { width: 7%; } .process-table th:nth-child(6) { width: 6%; } .process-table th:nth-child(7) { width: 9%; } -.process-table th:nth-child(8) { width: 47%; text-align: left; } +.process-table th:nth-child(8) { width: 47%; text-align: center; } +.process-table th:nth-child(8) .process-sort { text-align: center; } .process-sort { position: relative;