Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85629179
D339.1786151434.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D339.1786151434.diff
View Options
diff --git a/src/contents/ui/device-mgmt/Device.qml b/src/contents/ui/device-mgmt/Device.qml
--- a/src/contents/ui/device-mgmt/Device.qml
+++ b/src/contents/ui/device-mgmt/Device.qml
@@ -6,12 +6,12 @@
import QtQuick 2.2
import QtQuick.Layouts 1.15
-import QtQuick.Controls 2.15
+import QtQuick.Controls
import org.kde.kirigami 2.13 as Kirigami
import '..' as Kazv
-Kirigami.SwipeListItem {
+ItemDelegate {
id: device
property var item
property var userId
@@ -76,15 +76,23 @@
ColumnLayout {
Label {
text: l10n.get('device-set-trust-level-dialog-name-label', { name: item.displayName })
+ Layout.fillWidth: true
+ wrapMode: Text.Wrap
}
Label {
text: l10n.get('device-set-trust-level-dialog-id-label', { id: item.deviceId })
+ Layout.fillWidth: true
+ wrapMode: Text.Wrap
}
Label {
text: l10n.get('device-set-trust-level-dialog-ed25519-key-label', { key: item.ed25519Key })
+ Layout.fillWidth: true
+ wrapMode: Text.Wrap
}
Label {
text: l10n.get('device-set-trust-level-dialog-curve25519-key-label', { key: item.curve25519Key })
+ Layout.fillWidth: true
+ wrapMode: Text.Wrap
}
ButtonGroup {
@@ -108,8 +116,19 @@
}
}
+ Button {
+ Layout.fillWidth: true
+ text: l10n.get('device-verify-action')
+ onClicked: () => {
+ requestVerify.call();
+ popup.close();
+ }
+ }
+
RowLayout {
+ Layout.alignment: Qt.AlignHCenter
Button {
+ Layout.alignment: Qt.AlignHCenter
text: l10n.get('device-set-trust-level-dialog-save')
onClicked: {
const current = popup.getNewTrustLevel();
@@ -118,6 +137,7 @@
}
Button {
+ Layout.alignment: Qt.AlignHCenter
text: l10n.get('device-set-trust-level-dialog-cancel')
onClicked: {
popup.close();
@@ -137,14 +157,16 @@
}
}
- actions: [
+ onClicked: popup.open();
+
+ ContextMenu.menu: Menu {
Kirigami.Action {
text: l10n.get('device-set-trust-level')
icon.name: 'settings-configure'
onTriggered: {
popup.open();
}
- },
+ }
Kirigami.Action {
objectName: 'requestVerifyAction'
text: l10n.get('device-verify-action')
@@ -154,7 +176,7 @@
requestVerify.call();
}
}
- ]
+ }
property var requestVerify: Kazv.AsyncHandler {
trigger: () => {
diff --git a/src/contents/ui/device-mgmt/DeviceList.qml b/src/contents/ui/device-mgmt/DeviceList.qml
--- a/src/contents/ui/device-mgmt/DeviceList.qml
+++ b/src/contents/ui/device-mgmt/DeviceList.qml
@@ -19,6 +19,7 @@
Accessible.name: l10n.get('user-devices')
delegate: KazvDM.Device {
+ width: ListView.view.width
userId: deviceList.userId
item: devices.at(index)
}
diff --git a/src/tests/quick-tests/tst_Device.qml b/src/tests/quick-tests/tst_Device.qml
--- a/src/tests/quick-tests/tst_Device.qml
+++ b/src/tests/quick-tests/tst_Device.qml
@@ -52,6 +52,7 @@
}
function test_verifyRequest() {
+ mouseClick(device, undefined, undefined, Qt.RightButton);
const action = findChild(device, 'requestVerifyAction');
verify(action.enabled);
action.trigger();
@@ -63,6 +64,7 @@
}
function test_verifyRequestFailed() {
+ mouseClick(device, undefined, undefined, Qt.RightButton);
const action = findChild(device, 'requestVerifyAction');
verify(action.enabled);
action.trigger();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 7, 6:10 PM (18 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1722834
Default Alt Text
D339.1786151434.diff (3 KB)
Attached To
Mode
D339: Port Device away from SwipeListItem
Attached
Detach File
Event Timeline
Log In to Comment