2020-06-17 15:18:31 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2021-10-12 20:26:02 +02:00
|
|
|
|
|
|
|
import "../controls"
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-06-03 16:50:59 -04:00
|
|
|
|
|
|
|
ListView {
|
2021-10-12 20:26:02 +02:00
|
|
|
id: accountsView
|
|
|
|
|
2020-06-13 11:17:54 -04:00
|
|
|
property var isSelected: function () {}
|
2020-06-11 17:23:27 -04:00
|
|
|
property var onAccountSelect: function () {}
|
2020-06-03 16:50:59 -04:00
|
|
|
|
2020-06-11 17:23:27 -04:00
|
|
|
anchors.fill: parent
|
|
|
|
focus: true
|
2020-07-02 11:14:31 -04:00
|
|
|
spacing: Style.current.smallPadding
|
2021-04-30 14:15:50 -04:00
|
|
|
clip: true
|
2020-06-03 16:50:59 -04:00
|
|
|
|
2021-10-12 20:26:02 +02:00
|
|
|
delegate: AccountViewDelegate {
|
2020-06-11 17:23:27 -04:00
|
|
|
username: model.username
|
2020-12-21 10:53:32 -05:00
|
|
|
identicon: model.thumbnailImage || model.identicon
|
2021-07-26 09:17:49 +02:00
|
|
|
keyUid: model.keyUid
|
|
|
|
address: model.address || ''
|
|
|
|
isSelected: function (index, keyUid) {
|
|
|
|
return accountsView.isSelected(index, keyUid)
|
2020-06-13 11:17:54 -04:00
|
|
|
}
|
2020-06-11 17:23:27 -04:00
|
|
|
onAccountSelect: function (index) {
|
2021-07-26 09:17:49 +02:00
|
|
|
accountsView.onAccountSelect(index)
|
2020-06-11 17:23:27 -04:00
|
|
|
}
|
2020-06-03 16:50:59 -04:00
|
|
|
}
|
2020-06-11 17:23:27 -04:00
|
|
|
}
|