Skip to content

Commit f849d61

Browse files
xujin177xionglinlin
authored andcommitted
feat: add security update details display
1. Display vulnerability ID and severity level for security updates 2. Add "Description:" label for security update information 3. Add mouse cursor change for clickable links in details 4. Add translatable strings for vulnerability ID, severity, and description 5. Change version label to show "Vulnerability ID:" for security updates 6. Conditionally show severity level when data is available Log: Added security update details showing vulnerability ID and severity level Influence: 1. Check security updates show vulnerability ID instead of version 2. Verify severity level displays only for security updates with valid data 3. Test mouse cursor changes to pointer when hovering over links 4. Verify internationalization of new strings (Vulnerability ID, Severity, Description) 5. Ensure non-security updates still display version number correctly 6. Test description label format change for security updates feat: 添加安全更新详细信息展示 1. 为安全更新显示漏洞编号和漏洞等级 2. 在安全更新信息前添加"漏洞描述:"标签 3. 在详情中可点击链接处添加鼠标光标样式变化 4. 添加漏洞编号、漏洞等级和漏洞描述的可翻译字符串 5. 安全更新时版本标签改为显示"漏洞编号:" 6. 有漏洞等级数据时条件显示等级 Log: 新增安全更新详情,显示漏洞编号和漏洞等级 Influence: 1. 检查安全更新是否显示漏洞编号而非版本号 2. 验证仅有有效漏洞等级数据时才显示等级 3. 测试鼠标悬停在链接上时光标变为手型 4. 验证新字符串(漏洞编号、等级、描述)的国际化翻译 5. 确保非安全更新仍正确显示版本号 6. 测试安全更新描述标签格式变化 PMS: BUG-362141 BUG-362669
1 parent 63424ee commit f849d61

46 files changed

Lines changed: 565 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: 25 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
@@ -103,6 +104,11 @@ Rectangle {
103104
onLinkActivated: (link)=> {
104105
dccData.work().openUrl(link)
105106
}
107+
MouseArea {
108+
anchors.fill: parent
109+
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
110+
acceptedButtons: Qt.NoButton
111+
}
106112
}
107113

108114
RowLayout {
@@ -167,10 +173,21 @@ Rectangle {
167173
horizontalAlignment: Text.AlignLeft
168174
Layout.fillWidth: true
169175
font: D.DTK.fontManager.t8
170-
color: D.DTK.themeType == D.ApplicationHelper.LightType ?
176+
color: D.DTK.themeType == D.ApplicationHelper.LightType ?
171177
Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
172178
visible: itemCtl.showDetails && modelData.name !== ""
173-
text: qsTr("Version:") + modelData.name
179+
text: (itemCtl.isSecurityUpdate ? qsTr("Vulnerability ID:") : qsTr("Version:")) + modelData.name
180+
}
181+
182+
D.Label {
183+
Layout.alignment: Qt.AlignLeft
184+
horizontalAlignment: Text.AlignLeft
185+
Layout.fillWidth: true
186+
font: D.DTK.fontManager.t8
187+
color: D.DTK.themeType == D.ApplicationHelper.LightType ?
188+
Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
189+
visible: itemCtl.showDetails && itemCtl.isSecurityUpdate && modelData.vulLevel !== ""
190+
text: qsTr("Severity:") + modelData.vulLevel
174191
}
175192

176193
D.Label {
@@ -179,12 +196,17 @@ Rectangle {
179196
Layout.fillWidth: true
180197
font: D.DTK.fontManager.t8
181198
visible: itemCtl.showDetails && modelData.info !== ""
182-
text: modelData.info
199+
text: itemCtl.isSecurityUpdate ? qsTr("Description:") + modelData.info : modelData.info
183200
textFormat: Text.RichText
184201
wrapMode: Text.WordWrap
185202
onLinkActivated: (link)=> {
186203
dccData.work().openUrl(link)
187204
}
205+
MouseArea {
206+
anchors.fill: parent
207+
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
208+
acceptedButtons: Qt.NoButton
209+
}
188210
}
189211

190212
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)