Reload member device list after trust/blacklisting

This commit is contained in:
miruka 2020-07-08 17:33:02 -04:00
parent 963b022f3d
commit ea0a7517e4
3 changed files with 22 additions and 13 deletions

View File

@ -17,6 +17,8 @@ HFlickableColumnPage {
property string ed25519Key
property HStackView stackView
signal trustSet(bool trust)
footer: ButtonLayout {
ApplyButton {
@ -31,6 +33,7 @@ HFlickableColumnPage {
[deviceOwner, deviceId],
() => {
loading = false
page.trustSet(true)
stackView.pop()
}
)
@ -49,6 +52,7 @@ HFlickableColumnPage {
[deviceOwner, deviceId],
() => {
loading = false
page.trustSet(false)
stackView.pop()
}
)

View File

@ -15,7 +15,7 @@ HTile {
property string deviceOwnerDisplayName
property HStackView stackView
signal trustChanged()
signal trustSet(bool trust)
backgroundColor: "transparent"
@ -49,16 +49,19 @@ HTile {
}
}
onClicked: stackView.push(
"DeviceVerification.qml",
{
userId: deviceTile.userId,
deviceOwner: deviceTile.deviceOwner,
deviceOwnerDisplayName: deviceTile.deviceOwnerDisplayName,
deviceId: model.id,
deviceName: model.display_name,
ed25519Key: model.ed25519_key,
stackView: deviceTile.stackView
},
)
onClicked: {
const item = stackView.push(
"DeviceVerification.qml",
{
userId: deviceTile.userId,
deviceOwner: deviceTile.deviceOwner,
deviceOwnerDisplayName: deviceTile.deviceOwnerDisplayName,
deviceId: model.id,
deviceName: model.display_name,
ed25519Key: model.ed25519_key,
stackView: deviceTile.stackView
},
)
item.trustSet.connect(deviceTile.trustSet)
}
}

View File

@ -34,6 +34,8 @@ HListView {
deviceOwner: member.id
deviceOwnerDisplayName: member.display_name
stackView: profile.stackView
onTrustSet: trust => profile.loadDevices()
}
section.property: "type"