2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQuick.Controls 2.15
|
2022-08-31 17:09:07 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
2023-03-22 15:48:44 +00:00
|
|
|
import shared.panels 1.0 as SharedPanels
|
2022-08-31 17:09:07 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var sharedKeycardModule
|
2023-03-22 15:48:44 +00:00
|
|
|
property alias seedPhraseRevealed: displaySeed.seedPhraseRevealed
|
2022-08-31 17:09:07 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.xlPadding
|
|
|
|
anchors.bottomMargin: Theme.halfPadding
|
|
|
|
anchors.leftMargin: Theme.xlPadding
|
|
|
|
anchors.rightMargin: Theme.xlPadding
|
|
|
|
spacing: Theme.padding
|
2022-08-31 17:09:07 +00:00
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: title
|
|
|
|
Layout.preferredHeight: Constants.keycard.general.titleHeight
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: message
|
|
|
|
Layout.preferredHeight: Constants.keycard.general.messageHeight
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
Layout.fillWidth: true
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
|
|
|
|
2023-03-22 15:48:44 +00:00
|
|
|
SharedPanels.SeedPhrase {
|
|
|
|
id: displaySeed
|
2022-08-31 17:09:07 +00:00
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
2023-03-22 15:48:44 +00:00
|
|
|
property var seedPhrase: root.sharedKeycardModule.getMnemonic().split(" ")
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
states: [
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.seedPhraseDisplay
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.seedPhraseDisplay
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Write down your seed phrase")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: qsTr("The next screen contains your seed phrase.<br/><b>Anyone</b> who sees it can use it to access to your funds.")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
textFormat: Text.RichText
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|