Repository navigation
feat(ui): 服务、启动与连接列表也可复制名称、所在列与详细信息 - #161
Conversation
与进程列表一致:Ctrl+C 复制名称列显示的名称,Ctrl+Shift+C 以“列名: 内容”逐行复制该行显示的各列 (空白与暂无读数的列除外),有选中的文字时仍复制所选文字。右键菜单新增复制名称列(标注 Ctrl+C)与 “复制详细信息”(Ctrl+Shift+C),在某一列上单击右键时可复制该列。详细信息在菜单打开时取得,连接在 菜单打开期间离开列表也能复制。快捷键说明与使用文档同步更新。
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22259e6a27
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
此前新增的三项使服务菜单在 480 px 最小窗口高度下超出窗口,底部的置顶与备注无法选择。与进程列表一致,各页原有的复制项、名称(Ctrl+C)与详细信息(Ctrl+Shift+C)合为“复制”子菜单,位于原先第一个复制项的位置;所在列的复制仍紧随子菜单。服务菜单不在列上右键时与改动前等高。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c14554908
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
服务的“复制服务名称”与名称列项(服务)并列时看似重复。与进程列表的复制子菜单一致,子菜单中的各项改用对应的列名:服务为名称与服务,启动为命令,连接为本地地址与远程地址。移除不再使用的四个文案。
右键菜单的“复制“列名””依赖右键所在的列,此前只有 Argus 自绘的行记录该列;由组件绘制的行(ARGUS_TABLE_ROWS=component 或辅助功能启用时)不显示该项,进程列表同样受影响。现在单元格在右键按下时记下其列,先于行打开菜单。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47e795b46a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
服务行已有备注时菜单多出“删除备注”,在 480 px 最小窗口高度下加上所在列的复制项仍会超出窗口。这三个列表的所在列复制项改为位于“复制”子菜单中的名称之后,菜单高度在任何状态下都与改动前相同;进程列表仍放在子菜单之后。
协议单元格将 v6 作为独立标记绘制,复制的文字只有 TCP 或 UDP,与 IPv4 连接无法区分。复制所在列与详细信息时改为 TCPv6、UDPv6,与协议筛选的名称一致。
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Ray-lea
left a comment
There was a problem hiding this comment.
已核对四个既有评审讨论。隔离实例通过服务、启动、连接列表的名称与详细信息复制,IPv6 协议保留 v6 标记。组件绘制模式通过 process-copy,官网演示使用的四个翻译键也已保留。
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
改动概述 / Summary
在 5c30e74 的进程复制基础上,把同样的复制方式扩展到服务、启动与连接列表:Ctrl+C 复制名称,Ctrl+Shift+C 复制详细信息;右键菜单与进程列表一样提供“复制”子菜单,并可复制单击所在的列。同时修复由组件绘制的表格行无法复制所在列的问题(进程列表同样受影响)。
Extends 5c30e74's process copying to the Services, Startup and Connections lists: Ctrl+C copies the name, Ctrl+Shift+C the details, and the row menu gets the same "Copy" submenu as processes, including the clicked column's copy. Also makes the column copy work on component-rendered rows, which affected the process list too.
改动原因 / Motivation
Refs #150,按 #157 中的讨论单独提交。5c30e74 只覆盖进程列表,其他三个列表仍无法用快捷键复制,也不能复制单击所在的列。
Follow-up agreed in #157: 5c30e74 covers the process list only.
改动思路 / Approach
行为与进程列表保持一致:Ctrl+C 复制名称列显示的内容,有选中的文字时仍复制所选文字(沿用
TextSelection::has_selection判断)。这三个列表没有详细信息面板,详细信息取自表格当前显示的各列(Desktop::row_cells,与绘制使用同一格式化函数),以details.copy.field格式逐行输出,与进程详细信息的行格式一致,空白与暂无读数的列不复制。复制的文字保留单元格另行绘制的标记:IPv6 连接的协议复制为 TCPv6 / UDPv6,与协议筛选的名称一致。右键菜单沿用进程列表的结构:各页原有的复制项、名称(Ctrl+C)、单击所在的列与详细信息(Ctrl+Shift+C)合为“复制”子菜单,放在原先第一个复制项的位置。所在列的复制项也在子菜单内,因此无论是否有备注等附加项,菜单高度都与改动前相同,480 px 最小窗口高度下仍完整显示;进程列表仍沿用 5c30e74 的位置(子菜单之后)。子菜单中的各项与进程列表一样以列名命名(服务为“名称”与“服务”),与表头一致,不会看似重复。复制内容在菜单打开时取得:连接列表每两秒刷新,菜单打开期间连接离开列表也能复制菜单所对应的行。
“复制“列名””依赖右键所在的列,此前只有 Argus 自绘的行(
tables/body.rs)记录该列;由组件绘制的行(ARGUS_TABLE_ROWS=component或辅助功能启用时)不显示该项。现在这些行的单元格在右键按下时记下所在的列,先于行打开菜单。改动明细 / Changes
frontend/list_copy.rs(新增):适用的列表、单元格筛选、行文本格式、复制子菜单的合并(gather_copies)与插入位置,均带测试;Desktop::cells_text。backend.rs:Ctrl+C / Ctrl+Shift+C 的判断扩展到四个列表;进程仍使用CopyDetails,其他列表使用cells_text。menus.rs:“复制“列名””扩展到四个列表;其他三个列表的复制项合为“复制”子菜单,子菜单内新增名称列(Ctrl+C)、所在列与详细信息(Ctrl+Shift+C),各项以列名命名(服务为名称与服务,启动为命令,连接为本地地址与远程地址)。tables.rs:Desktop::row_cells返回当前表格每列的列名与单元格文本;复制的单元格文字保留 IPv6 标记(copied_cell,带测试);由组件绘制的行在单元格右键按下时记下所在的列(render_td)。settings.shortcuts.copyName/copyDetails不再限定为进程列表,8 种语言;子菜单复用列名与现有文案,官网演示继续使用的四个菜单翻译键已保留。docs/guide/README.md的复制说明与键盘操作表。新增功能(可选)/ New features (optional)
影响与依赖 / Impact and dependencies
改动后界面截图 / UI screenshots
开发构建,实时数据,英文界面,深色主题,100% 缩放;服务行的右键菜单,展开“复制”子菜单。
Dev build, live data, English UI, dark theme, 100% scale; a service row's context menu with the "Copy" submenu open.
维护者复核
已保留官网演示引用的四个复制菜单翻译键。八种语言的键与占位符检查通过。隔离实例实测服务、启动、连接三页的名称与详细信息复制,IPv6 的协议复制为
UDPv6。组件绘制模式通过现有process-copy界面步骤。提交时验证 / Original validation
cargo test -p argus --liblist_copy的 4 项与copied_protocols_keep_the_ipv6_tagcargo clippy -p argus --all-targets -- -D warningsnode scripts/i18n.mjsARGUS_TABLE_ROWS=component下在状态列、CPU 列上右键pnpm check。提交前检查 / Checklist
pnpm i18n/ Added or changed UI text covers all supported locales, follows the glossary and passespnpm i18n.THIRD-PARTY-NOTICES.txt/ N/A