2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
2023-03-24 14:03:47 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
2023-03-30 13:00:55 +00:00
|
|
|
import shared.controls 1.0
|
2023-03-24 14:03:47 +00:00
|
|
|
|
|
|
|
Column {
|
|
|
|
id: root
|
|
|
|
|
2023-03-30 13:00:55 +00:00
|
|
|
property string addressText: ""
|
|
|
|
property string addressColor: Theme.palette.directColor1
|
2023-03-24 14:03:47 +00:00
|
|
|
property var addressDetailsItem
|
|
|
|
property bool addressResolved: true
|
2023-03-30 13:00:55 +00:00
|
|
|
property bool displayDetails: true
|
|
|
|
property bool displayCopyButton: true
|
2023-08-04 12:41:57 +00:00
|
|
|
property bool alreadyCreatedAccountIsAnError: true
|
2023-03-24 14:03:47 +00:00
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
spacing: Theme.halfPadding
|
2023-03-24 14:03:47 +00:00
|
|
|
|
|
|
|
StatusBaseText {
|
2023-03-30 13:00:55 +00:00
|
|
|
text: root.addressText
|
2023-03-24 14:03:47 +00:00
|
|
|
font.pixelSize: Constants.addAccountPopup.labelFontSize1
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
width: parent.width
|
|
|
|
text: root.addressDetailsItem.address
|
2023-03-30 13:00:55 +00:00
|
|
|
input.edit.enabled: false
|
|
|
|
input.edit.color: root.addressColor
|
2023-03-24 14:03:47 +00:00
|
|
|
input.background.color: "transparent"
|
|
|
|
input.background.border.color: Theme.palette.baseColor2
|
2023-03-30 13:00:55 +00:00
|
|
|
input.rightComponent: CopyButton {
|
|
|
|
visible: root.displayCopyButton
|
|
|
|
textToCopy: root.addressDetailsItem.address
|
|
|
|
}
|
2023-03-24 14:03:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
AddressDetails {
|
|
|
|
width: parent.width
|
2023-03-30 13:00:55 +00:00
|
|
|
visible: root.displayDetails
|
2023-03-24 14:03:47 +00:00
|
|
|
addressDetailsItem: root.addressDetailsItem
|
|
|
|
defaultMessage: ""
|
|
|
|
defaultMessageCondition: !root.addressResolved
|
2023-08-04 12:41:57 +00:00
|
|
|
alreadyCreatedAccountIsAnError: root.alreadyCreatedAccountIsAnError
|
2023-03-24 14:03:47 +00:00
|
|
|
}
|
|
|
|
}
|