Skip to content

Commit 8a3a14e

Browse files
committed
feat: show vulnerability details for security updates
1. Add isSecurityUpdate property to distinguish security updates in the list 2. Display Vulnerability ID instead of Version for security updates 3. Show Severity label with vulLevel data for security updates 4. Show Description prefix for security update info text 5. Add MouseArea for cursor shape change on link hover 6. Update all translation files with new strings Log: Added vulnerability details display for security updates Influence: 1. Verify security updates show "Vulnerability ID:" instead of "Version:" 2. Check severity level is displayed for security updates 3. Verify description field shows "Description:" prefix for security updates 4. Test normal updates still show "Version:" and "Severity:" fields are hidden 5. Confirm cursor changes to pointer when hovering over links in description 6. Verify translations display correctly in different locales feat: 为安全更新显示漏洞详情 1. 添加 isSecurityUpdate 属性以区分列表中的安全更新 2. 安全更新时显示漏洞编号代替版本号 3. 安全更新时显示漏洞等级标签 4. 安全更新时显示漏洞描述前缀 5. 添加鼠标区域以实现链接悬停时光标形状变化 6. 更新所有翻译文件以添加新字符串 Log: 新增安全更新漏洞详情显示功能 Influence: 1. 验证安全更新显示"漏洞编号:"而非"版本:" 2. 检查安全更新显示漏洞等级信息 3. 验证安全更新的描述字段显示"漏洞描述:"前缀 4. 测试普通更新仍显示"版本:"且漏洞等级字段隐藏 5. 确认鼠标移动到描述中的链接上时光标变为手型 6. 验证不同语言环境下翻译显示正确 PMS: BUG-362141 BUG-362669
1 parent f6fc648 commit 8a3a14e

46 files changed

Lines changed: 560 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/dcc-update-plugin/qml/UpdateList.qml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Rectangle {
4040
spacing: 0
4141

4242
property bool showDetails: false
43+
property bool isSecurityUpdate: repeater.model.getUpdateType(index) === Common.SecurityUpdate
4344

4445
content: RowLayout {
4546
spacing: 10
@@ -167,10 +168,21 @@ Rectangle {
167168
horizontalAlignment: Text.AlignLeft
168169
Layout.fillWidth: true
169170
font: D.DTK.fontManager.t8
170-
color: D.DTK.themeType == D.ApplicationHelper.LightType ?
171+
color: D.DTK.themeType == D.ApplicationHelper.LightType ?
171172
Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
172173
visible: itemCtl.showDetails && modelData.name !== ""
173-
text: qsTr("Version:") + modelData.name
174+
text: (itemCtl.isSecurityUpdate ? qsTr("Vulnerability ID:") : qsTr("Version:")) + modelData.name
175+
}
176+
177+
D.Label {
178+
Layout.alignment: Qt.AlignLeft
179+
horizontalAlignment: Text.AlignLeft
180+
Layout.fillWidth: true
181+
font: D.DTK.fontManager.t8
182+
color: D.DTK.themeType == D.ApplicationHelper.LightType ?
183+
Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
184+
visible: itemCtl.showDetails && itemCtl.isSecurityUpdate && modelData.vulLevel !== ""
185+
text: qsTr("Severity:") + modelData.vulLevel
174186
}
175187

176188
D.Label {
@@ -179,12 +191,17 @@ Rectangle {
179191
Layout.fillWidth: true
180192
font: D.DTK.fontManager.t8
181193
visible: itemCtl.showDetails && modelData.info !== ""
182-
text: modelData.info
194+
text: itemCtl.isSecurityUpdate ? qsTr("Description:") + modelData.info : modelData.info
183195
textFormat: Text.RichText
184196
wrapMode: Text.WordWrap
185197
onLinkActivated: (link)=> {
186198
dccData.work().openUrl(link)
187199
}
200+
MouseArea {
201+
anchors.fill: parent
202+
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
203+
acceptedButtons: Qt.NoButton
204+
}
188205
}
189206

190207
RowLayout {

src/dcc-update-plugin/translations/update_ar.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation type="unfinished"></translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_az.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation>طي</translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_bn.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation type="unfinished"></translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_bo.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation type="unfinished"></translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_ca.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation>Replega</translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_cs.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation type="unfinished"></translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_da.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation type="unfinished"></translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_de.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation type="unfinished"></translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

src/dcc-update-plugin/translations/update_de_DE.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@
100100
<source>Collapse</source>
101101
<translation type="unfinished">Einfahren</translation>
102102
</message>
103+
<message>
104+
<source>Vulnerability ID:</source>
105+
<translation type="unfinished"></translation>
106+
</message>
107+
<message>
108+
<source>Severity:</source>
109+
<translation type="unfinished"></translation>
110+
</message>
111+
<message>
112+
<source>Description:</source>
113+
<translation type="unfinished"></translation>
114+
</message>
103115
</context>
104116
<context>
105117
<name>UpdateLogDialog</name>

0 commit comments

Comments
 (0)