2022-02-01 15:28:47 +00:00
import QtQuick 2.14
import StatusQ . Components 0.1
Item {
id: root
anchors.fill: parent
Column {
id: toastArea
anchors.centerIn: parent
spacing: 8
Repeater {
id: toastRepeater
width: parent . width
height: childrenRect . height
model: [
2022-05-05 09:48:32 +00:00
{ "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 }
2022-02-01 15:28:47 +00:00
]
delegate: StatusToastMessage {
primaryText: modelData . title
secondaryText: modelData . subTitle
icon.name: modelData . icon
loading: modelData . loading
type: modelData . type
linkUrl: modelData . url
2022-05-05 09:48:32 +00:00
duration: modelData . duration
2022-02-01 15:28:47 +00:00
onLinkActivated: {
Qt . openUrlExternally ( link ) ;
}
2022-05-05 09:48:32 +00:00
onClose: {
console . warn ( "toast closed: " , modelData . title )
2022-02-01 15:28:47 +00:00
}
}
}
}
}