81 lines
41 KiB
QML
81 lines
41 KiB
QML
|
import QtQuick 2.14
|
||
|
import QtQuick.Controls 2.14
|
||
|
import QtQuick.Layouts 1.12
|
||
|
|
||
|
import utils 1.0
|
||
|
|
||
|
import StatusQ.Components 0.1
|
||
|
import StatusQ.Core.Theme 0.1
|
||
|
import Storybook 1.0
|
||
|
|
||
|
import Models 1.0
|
||
|
|
||
|
SplitView {
|
||
|
id: root
|
||
|
|
||
|
Logs { id: logs }
|
||
|
|
||
|
orientation: Qt.Vertical
|
||
|
|
||
|
|
||
|
GridLayout {
|
||
|
id: toastArea
|
||
|
|
||
|
SplitView.fillWidth: true
|
||
|
SplitView.fillHeight: true
|
||
|
|
||
|
columns: 3
|
||
|
columnSpacing: 16
|
||
|
rowSpacing: 16
|
||
|
|
||
|
Repeater {
|
||
|
id: toastRepeater
|
||
|
width: parent.width
|
||
|
height: childrenRect.height
|
||
|
model: [
|
||
|
{"title":"anna.eth wants to verify your identity", "subTitle":"Provide the code in the letter I sent to you on February 1st.", "icon":"contact", "loading":false, "type":0,"url":"", "duration":0},
|
||
|
{"title":"Verification Request Sent", "subTitle":"", "icon":"checkmark-circle", "loading":false, "type":1,"url":"", "duration":4000},
|
||
|
{"title":"Collectible is being minted...", "subTitle":"View on Etherscan", "icon":"", "loading":true, "type":0,"url":"http://google.com", "duration":0},
|
||
|
{"title":"Contact request sent", "subTitle":"", "icon":"checkmark-circle", "loading":false, "type":1,"url":"", "duration":4000},
|
||
|
{"title":"Test User", "subTitle":"Hello message...", "icon":"", "loading":false, "type":0,"url":"", "duration":4000},
|
||
|
{"title":"This device is no longer the control node for the Socks Community", "subTitle":"", "icon":"info", "loading":false, "type":0,"url":"", "duration":0},
|
||
|
{"title":`This is, but not now, probably later on the road even it doesn't make sense, a very long title with <a style="text-decoration:none" href="www.qt.io">hyperlink</a>.`, "subTitle":"", "icon":"info", "loading":false, "type":2,"url":"", "duration":0},
|
||
|
{"title":`First community asset received`, "subTitle":"Navigate to somewhere", "loading":false, "actionType": "type" ,"type":2,"url":"", "duration":0, "image": "data:image/jpeg;base64,/9j/2wCEAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSgBBwcHCggKEwoKEygaFhooKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKP/AABEIATMCcgMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APlSiiigAooooAKKKKACtrwf4cv/ABZ4jstF0mPfdXT7QT91F6s7ewGSaxa+0P2avhx/wiXhr+2tVh263qiBtrjDW8HVU9ieGb8B2q4R5nYunDndj0nwN4WsPBvhiy0XSkxDbr88hHzSufvO3uT+XA6Ct6iiuzY70raBRRRQAUUUUAFFFFABRRRQAUVS1nVbLRdOmv8AVLhLe1iGWdz+gHcn0FeKeIfjvN57J4e0qLygeJb0klv+AKRj/vo1E6kYbicktz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9LEjn6kA19hhZaNGdJ9CzRRRXUahRRRQAUUUUAFFFFABXyt+1j8PhZ3sfjLS4cQXLCHUFUcLJ0ST/AIF0PuB3avqmqGvaTZ69ot7pWpRCWzu4mhlXvgjqPQjqD2IFTOPMrEzjzqx+a9Fb/jrwzd+D/FeoaHfgmS1kwsmMCVDyrj2IIPt07VgVxPQ89q2gUUUUAFFFFABRRRQAUUUUAFFFFABX0X+yR4HF5ql14uv4yYbMm3sgRw0pHzv/AMBUgD3Y+leA6Lpl1rWr2emafGZbu7lWGJPVmOBn0HvX6I+DvD9r4W8L6botgAILOER7sY3t1Zj7liSfrWtKN3c2oQu79jZooorqOwKKKKACiiigAooooAKKKKACiiigD4n8QWxs9f1K2YENDcyxkH2cj+lfSnwz12Jvh9om1fMkSHymAOMbGK/0rxT416b/AGb8RtTwuI7nbcp77h8x/wC+g1dd8Eb7ztEvrJjlreYOB6K4/wAVP518vm9N+yb7MnDpe05WezwaxC5xKrR+/UVpKyuoZSCp6EVx1WLO8ltXzGcqeqnoa+bTO6VFfZOqIBBBGQa8c+JXwjivfN1LwrGkNzy0ll0ST3Tsp9un07+t2d5FdplDhh1U9RVit6NedGXNBnNOF9GfExF1pt9gia1vLd/dHjYfqCK91+Gfxgj
|
||
|
]
|
||
|
delegate: StatusToastMessage {
|
||
|
primaryText: modelData.title
|
||
|
secondaryText: modelData.subTitle
|
||
|
image: modelData.image ? modelData.image : ""
|
||
|
imageRadius: 8
|
||
|
icon.name: modelData.icon ? modelData.icon : ""
|
||
|
loading: modelData.loading
|
||
|
type: modelData.type
|
||
|
linkUrl: modelData.url
|
||
|
duration: modelData.duration
|
||
|
actionRequired: !!modelData.actionType
|
||
|
onLinkActivated: {
|
||
|
Qt.openUrlExternally(link);
|
||
|
}
|
||
|
onClose: {
|
||
|
logs.logEvent("StatusToastMessage::close: " + modelData.title)
|
||
|
}
|
||
|
onClicked: {
|
||
|
logs.logEvent("StatusToastMessage::clicked: " + modelData.title)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
LogsAndControlsPanel {
|
||
|
id: logsAndControlsPanel
|
||
|
|
||
|
SplitView.minimumHeight: 100
|
||
|
|
||
|
logsView.logText: logs.logText
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// category: Components
|
||
|
|
||
|
// category: Components
|