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 9528640..4e509cc 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -948,12 +948,12 @@ button:disabled { display: flex; flex: 0 0 auto; align-items: center; - gap: 4px; + gap: 0px; } .session-metrics > div { - min-width: 82px; - padding: 0 10px; + min-width: 53px; + padding: 0 7px; border-left: 1px solid #1c2932; } @@ -981,6 +981,11 @@ button:disabled { white-space: nowrap; } +.resource-metric + .resource-metric { + padding-left: 9px; + border-left: 1px solid #1c2932; +} + .resource-metric-line { display: flex; min-width: 0; @@ -1160,6 +1165,7 @@ button:disabled { } .xterm-viewport { + overflow-x: hidden; scrollbar-color: #31424e transparent; scrollbar-width: thin; } @@ -1390,7 +1396,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; @@ -1963,8 +1970,8 @@ button:disabled { } .session-metrics > div { - min-width: 72px; - padding: 0 7px; + min-width: 58px; + padding: 0 5px; } .session-metrics > div:first-child {