2022-03-07 22:59:38 +00:00
|
|
|
import QtQuick 2.13
|
2022-04-14 08:26:46 +00:00
|
|
|
|
2022-03-07 22:59:38 +00:00
|
|
|
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
2022-05-23 11:35:51 +00:00
|
|
|
import StatusQ.Components 0.1
|
2022-04-14 08:26:46 +00:00
|
|
|
|
2022-03-07 22:59:38 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
2022-04-14 08:26:46 +00:00
|
|
|
Item {
|
2022-03-07 22:59:38 +00:00
|
|
|
id: root
|
2022-04-14 08:26:46 +00:00
|
|
|
|
2022-07-04 20:09:08 +00:00
|
|
|
property bool compact: false
|
2022-09-27 21:26:26 +00:00
|
|
|
property bool oneRow
|
2022-03-07 22:59:38 +00:00
|
|
|
property string publicKey
|
2022-04-14 08:26:46 +00:00
|
|
|
|
2022-07-04 20:09:08 +00:00
|
|
|
readonly property real size: compact ? 10 : 15
|
2022-04-14 08:26:46 +00:00
|
|
|
|
|
|
|
implicitHeight: positioner.implicitHeight
|
|
|
|
implicitWidth: positioner.implicitWidth
|
|
|
|
|
|
|
|
Grid {
|
|
|
|
id: positioner
|
|
|
|
|
2022-09-27 21:26:26 +00:00
|
|
|
rows: root.oneRow ? 1 : 2
|
|
|
|
columnSpacing: root.oneRow ? 4 : 2
|
2022-07-04 20:11:20 +00:00
|
|
|
rowSpacing: root.compact ? 4 : 6
|
2022-04-14 08:26:46 +00:00
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: Utils.getEmojiHashAsJson(root.publicKey)
|
|
|
|
|
2022-05-23 11:35:51 +00:00
|
|
|
StatusEmoji {
|
2022-04-14 08:26:46 +00:00
|
|
|
width: root.size
|
|
|
|
height: root.size
|
2022-05-23 11:35:51 +00:00
|
|
|
emojiId: StatusQUtils.Emoji.iconId(modelData)
|
2022-04-14 08:26:46 +00:00
|
|
|
}
|
2022-03-07 22:59:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|