Compare commits
6
Commits
1c6d31a169
..
v2.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b27f96b31d | ||
|
|
8a984eac59 | ||
|
|
e75f56a0ba | ||
|
|
4186357380 | ||
|
|
3bec5b156e | ||
|
|
c61542574c |
@@ -0,0 +1,55 @@
|
|||||||
|
# 更新日志
|
||||||
|
|
||||||
|
## v2.0.0 - 2026-08-09
|
||||||
|
|
||||||
|
本次为大版本更新,涵盖弹窗重新设计、多个新功能窗口、性能优化和架构重构。
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
|
||||||
|
- **左键弹窗重新设计**:通透分区布局(分隔线+留白),速度数字 24px 视觉锚点,适配 Deepin 原生毛玻璃风格
|
||||||
|
- **IPv4/IPv6 一键复制**:地址旁加复制图标,点击写入剪贴板,复制后显示 ✓ 反馈
|
||||||
|
- **日/月流量统计**(持久化):右键菜单新增"流量统计"窗口,按日/按月展示累计流量,跨重启累加,JSON 持久化到磁盘
|
||||||
|
- **TCP 连接清单**:右键菜单新增"TCP 连接"窗口,展示所有 ESTABLISHED 连接的本地/远程地址端口、状态、进程名,支持搜索筛选
|
||||||
|
- **链路速率显示**:弹窗接口信息区显示协商速率(Gbps/Mbps)
|
||||||
|
- **WiFi 信号强度**:无线接口显示信号 dBm
|
||||||
|
- **包统计/错误/丢包**:弹窗累计流量区展示收发包数、错误数、丢包数
|
||||||
|
- **TCP 连接数**:弹窗显示整机活跃 TCP 连接数
|
||||||
|
- **可配置刷新间隔**:设置窗口新增 1/2/5 秒刷新间隔选项,影响全项目所有定时器
|
||||||
|
- **流量波动图时间窗口**:1/5/30 分钟可切换
|
||||||
|
- **任务栏数值小数点对齐**:双行网速数值小数点垂直对齐,箭头间距固定
|
||||||
|
|
||||||
|
### 优化
|
||||||
|
|
||||||
|
- **弹窗文字颜色修复**:改用 dock 上下文调色板,深色模式文字清晰可见
|
||||||
|
- **弹窗高度固定**:切换网卡时弹窗高度不再跳动
|
||||||
|
- **IPv4/IPv6 地址行对称**:固定宽度标签对齐,不再随地址长度错位
|
||||||
|
- **会话总量语义明确**:改为网卡开机累计值,切换网卡立即显示对应数据
|
||||||
|
- **流量波动图曲线平滑**:5 点滑动平均抑制亚秒混叠尖峰
|
||||||
|
- **C++ 后端性能优化**:正则预编译、信号脏标记、IP 检测降频、历史 QVariantList 缓存
|
||||||
|
- **TCP 进程名反查**:改用 ss 命令(netlink),解决普通用户 /proc 权限限制
|
||||||
|
|
||||||
|
### 重构
|
||||||
|
|
||||||
|
- **提取 WindowTheme + TitleBar**:消除三个独立窗口约 150 行样板重复
|
||||||
|
- **提取 interfaceIcon/interfaceDescription 到 NetCommon**:消除 SettingsWindow 与 NetworkPopup 重复
|
||||||
|
- **清理 fontScale 死代码**:移除为不存在功能预埋的 30+ 处乘法噪声
|
||||||
|
- **CMake Test 改为可选依赖**:解决无 Qt6 Test 开发包环境构建失败
|
||||||
|
|
||||||
|
### Bug 修复
|
||||||
|
|
||||||
|
- 修复关于窗口无法拖动(drag.target 对 Window 无效,改用 startSystemMove)
|
||||||
|
- 修复网卡类型描述国际化翻译 context 错误(迁移到 NetCommon 后未同步)
|
||||||
|
- 修复无 IP 地址时接口信息区塌陷/错位
|
||||||
|
- 修复 IPv6 地址行与 IPv4 行错位
|
||||||
|
- 修复切换网卡时弹窗高度跳动
|
||||||
|
- 修复复制按钮颜色在深色背景下不可见
|
||||||
|
- 修复右键菜单 TCP Connections 国际化缺失
|
||||||
|
- 修复 TextField rightItem 属性不存在导致插件加载失败
|
||||||
|
- 修复 NetworkPopup 大括号多余导致语法错误
|
||||||
|
- 修复 TrafficStatsWindow onVisibleChanged 重复设置导致插件加载失败
|
||||||
|
|
||||||
|
### 其他
|
||||||
|
|
||||||
|
- 右键菜单顺序调整:流量波动图 → 流量统计 → TCP 连接 → 设置 → 关于
|
||||||
|
- 全项目国际化翻译补全(75+ 条翻译)
|
||||||
|
- 任务栏数值右侧留边距
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
project(JNetApplet VERSION 1.2.0 LANGUAGES CXX)
|
project(JNetApplet VERSION 2.0.0 LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|||||||
@@ -106,10 +106,10 @@ Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时刷新:窗口可见时每 5 秒重建清单(与 C++ 后端降频周期一致),
|
// 定时刷新:窗口可见时按刷新间隔的 5 倍重建清单(与 C++ 后端降频周期一致),
|
||||||
// 不依赖 C++ 信号;关闭时停止,兼顾实时性与性能
|
// 不依赖 C++ 信号;关闭时停止,兼顾实时性与性能
|
||||||
Timer {
|
Timer {
|
||||||
interval: 5000
|
interval: root.applet ? root.applet.refreshInterval : 1000
|
||||||
repeat: true
|
repeat: true
|
||||||
running: root.visible
|
running: root.visible
|
||||||
onTriggered: refreshModel()
|
onTriggered: refreshModel()
|
||||||
@@ -187,7 +187,7 @@ Window {
|
|||||||
Item { Layout.fillWidth: true }
|
Item { Layout.fillWidth: true }
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Refreshes every 5 seconds")
|
text: qsTr("Refreshes every ") + ((root.applet ? root.applet.refreshInterval : 1000) / 1000) + qsTr(" seconds")
|
||||||
font.pixelSize: 11
|
font.pixelSize: 11
|
||||||
color: theme.textTertiary
|
color: theme.textTertiary
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,11 +116,11 @@ Window {
|
|||||||
onCurrentTabChanged: buildStatsModel()
|
onCurrentTabChanged: buildStatsModel()
|
||||||
Component.onCompleted: buildStatsModel()
|
Component.onCompleted: buildStatsModel()
|
||||||
|
|
||||||
// 定时刷新:窗口可见时每 5 秒重建表格,不依赖 C++ 30 秒信号
|
// 定时刷新:窗口可见时按刷新间隔的 5 倍重建表格,不依赖 C++ 30 秒信号
|
||||||
// 设计原因:C++ 降频 30 秒通知,用户打开窗口期间看不到实时更新;
|
// 设计原因:C++ 降频 30 秒通知,用户打开窗口期间看不到实时更新;
|
||||||
// 窗口可见时主动 5 秒刷新,关闭时停止,兼顾实时性与性能
|
// 窗口可见时主动刷新,间隔跟随设置中的刷新间隔(5 倍降频),关闭时停止
|
||||||
Timer {
|
Timer {
|
||||||
interval: 5000
|
interval: root.applet ? root.applet.refreshInterval : 1000
|
||||||
repeat: true
|
repeat: true
|
||||||
running: root.visible
|
running: root.visible
|
||||||
onTriggered: buildStatsModel()
|
onTriggered: buildStatsModel()
|
||||||
|
|||||||
@@ -355,15 +355,6 @@ AppletItem {
|
|||||||
Platform.Menu {
|
Platform.Menu {
|
||||||
id: contextMenu
|
id: contextMenu
|
||||||
|
|
||||||
Platform.MenuItem {
|
|
||||||
text: qsTr("Settings")
|
|
||||||
onTriggered: {
|
|
||||||
settingsWindow.show()
|
|
||||||
settingsWindow.raise()
|
|
||||||
settingsWindow.requestActivate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 流量波动图:屏幕居中独立窗口,展示活动接口最近 30 分钟网速趋势
|
// 流量波动图:屏幕居中独立窗口,展示活动接口最近 30 分钟网速趋势
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
text: qsTr("Traffic Chart")
|
text: qsTr("Traffic Chart")
|
||||||
@@ -394,6 +385,15 @@ AppletItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Platform.MenuItem {
|
||||||
|
text: qsTr("Settings")
|
||||||
|
onTriggered: {
|
||||||
|
settingsWindow.show()
|
||||||
|
settingsWindow.raise()
|
||||||
|
settingsWindow.requestActivate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Platform.MenuSeparator {}
|
Platform.MenuSeparator {}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
|
|||||||
@@ -275,6 +275,11 @@
|
|||||||
<source>Traffic Statistics</source>
|
<source>Traffic Statistics</source>
|
||||||
<translation>流量统计</translation>
|
<translation>流量统计</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/networkview.qml" line="389"/>
|
||||||
|
<source>TCP Connections</source>
|
||||||
|
<translation>TCP 连接</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TrafficStatsWindow</name>
|
<name>TrafficStatsWindow</name>
|
||||||
@@ -339,4 +344,72 @@
|
|||||||
<translation>暂无流量记录</translation>
|
<translation>暂无流量记录</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>TcpConnectionsWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="132"/>
|
||||||
|
<source>TCP Connections</source>
|
||||||
|
<translation>TCP 连接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="148"/>
|
||||||
|
<source>Active connections: </source>
|
||||||
|
<translation>活跃连接:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="159"/>
|
||||||
|
<source>Search address, port, process...</source>
|
||||||
|
<translation>搜索地址、端口、进程...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="191"/>
|
||||||
|
<source>Refreshes every </source>
|
||||||
|
<translation>每 </translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="190"/>
|
||||||
|
<source> seconds</source>
|
||||||
|
<translation> 秒刷新</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="204"/>
|
||||||
|
<source>Local Address:Port</source>
|
||||||
|
<translation>本地地址:端口</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="211"/>
|
||||||
|
<source>Remote Address:Port</source>
|
||||||
|
<translation>远程地址:端口</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="218"/>
|
||||||
|
<source>State</source>
|
||||||
|
<translation>状态</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="225"/>
|
||||||
|
<source>Process</source>
|
||||||
|
<translation>进程</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="265"/>
|
||||||
|
<source>No active TCP connections</source>
|
||||||
|
<translation>无活跃 TCP 连接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="265"/>
|
||||||
|
<source>No matching connections</source>
|
||||||
|
<translation>无匹配连接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="340"/>
|
||||||
|
<source>Total: </source>
|
||||||
|
<translation>共计:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../package/components/TcpConnectionsWindow.qml" line="340"/>
|
||||||
|
<source> connections</source>
|
||||||
|
<translation> 个连接</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|||||||
Reference in New Issue
Block a user