Alexandra Betouni 4ee21ada05 feat(desktop) Added image function in Style
Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
   source: Style.svg("check)
   ....

Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths

Closes #3678
2021-09-28 15:28:00 -04:00

48 lines
1.4 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.3
import utils 1.0
import "../../../../shared"
ScrollView {
property alias membersData: membersData
property string searchString
property bool selectMode: true
property var onItemChecked
anchors.fill: parent
id: root
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: groupMembers.contentHeight > groupMembers.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
ListView {
anchors.fill: parent
model: ListModel {
id: membersData
}
spacing: 0
clip: true
id: groupMembers
delegate: Contact {
isVisible: {
if (selectMode) {
return !searchString || model.name.toLowerCase().includes(searchString)
}
return isChecked || isUser
}
showCheckbox: root.selectMode
pubKey: model.pubKey
isContact: !!model.isContact
isUser: model.isUser
name: !model.name.endsWith(".eth") && !!model.localNickname ?
model.localNickname : Utils.removeStatusEns(model.name)
address: model.address
identicon: model.thumbnailImage || model.identicon
onItemChecked: function (pubKey, itemChecked) {
root.onItemChecked(pubKey, itemChecked)
}
}
}
}