mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
feat: Add warning in wallet to backup seed phrase
This commit is contained in:
parent
6f76d079ae
commit
60702ee639
64
ui/app/AppLayouts/Wallet/SeedPhraseBackupWarning.qml
Normal file
64
ui/app/AppLayouts/Wallet/SeedPhraseBackupWarning.qml
Normal file
@ -0,0 +1,64 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import "../../../imports"
|
||||
import "../../../shared"
|
||||
import "../Profile/Sections"
|
||||
import "."
|
||||
|
||||
Rectangle {
|
||||
visible: !profileModel.isMnemonicBackedUp
|
||||
height: visible ? 32 : 0
|
||||
Layout.fillWidth: true
|
||||
color: Style.current.red
|
||||
Row {
|
||||
spacing: Style.current.halfPadding
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Back up your seed phrase")
|
||||
font.pixelSize: 13
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: Style.current.white
|
||||
}
|
||||
|
||||
Button {
|
||||
width: 58
|
||||
height: 24
|
||||
contentItem: Item {
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
text: "Back up"
|
||||
font.pixelSize: 13
|
||||
font.weight: Font.Medium
|
||||
font.family: Style.current.fontRegular.name
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: Style.current.white
|
||||
}
|
||||
}
|
||||
background: Rectangle {
|
||||
radius: 4
|
||||
anchors.fill: parent
|
||||
border.color: Style.current.white
|
||||
color: "#19FFFFFF"
|
||||
}
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: backupSeedModal.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BackupSeedModal {
|
||||
id: backupSeedModal
|
||||
}
|
||||
|
||||
}
|
@ -5,29 +5,7 @@ import "../../../imports"
|
||||
import "../../../shared"
|
||||
import "."
|
||||
|
||||
SplitView {
|
||||
id: walletView
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
handle: SplitViewHandle {}
|
||||
|
||||
Connections {
|
||||
target: applicationWindow
|
||||
onSettingsLoaded: {
|
||||
// Add recent
|
||||
walletView.restoreState(appSettings.walletSplitView)
|
||||
}
|
||||
}
|
||||
Component.onDestruction: appSettings.walletSplitView = this.saveState()
|
||||
|
||||
LeftTab {
|
||||
id: leftTab
|
||||
SplitView.preferredWidth: Style.current.leftTabPrefferedSize
|
||||
SplitView.minimumWidth: Style.current.leftTabMinimumWidth
|
||||
SplitView.maximumWidth: Style.current.leftTabMaximumWidth
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
property bool hideSignPhraseModal: false
|
||||
|
||||
SignPhraseModal {
|
||||
@ -40,101 +18,129 @@ SplitView {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: walletContainer
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.left: leftTab.right
|
||||
anchors.leftMargin: 0
|
||||
SeedPhraseBackupWarning { }
|
||||
|
||||
SplitView {
|
||||
id: walletView
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
WalletHeader {
|
||||
id: walletHeader
|
||||
changeSelectedAccount: leftTab.changeSelectedAccount
|
||||
handle: SplitViewHandle {}
|
||||
|
||||
Connections {
|
||||
target: applicationWindow
|
||||
onSettingsLoaded: {
|
||||
// Add recent
|
||||
walletView.restoreState(appSettings.walletSplitView)
|
||||
}
|
||||
}
|
||||
Component.onDestruction: appSettings.walletSplitView = this.saveState()
|
||||
|
||||
RowLayout {
|
||||
id: walletInfoContainer
|
||||
LeftTab {
|
||||
id: leftTab
|
||||
SplitView.preferredWidth: Style.current.leftTabPrefferedSize
|
||||
SplitView.minimumWidth: Style.current.leftTabMinimumWidth
|
||||
SplitView.maximumWidth: Style.current.leftTabMaximumWidth
|
||||
}
|
||||
|
||||
Item {
|
||||
id: walletContainer
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.top: walletHeader.bottom
|
||||
anchors.topMargin: 23
|
||||
anchors.left: leftTab.right
|
||||
anchors.leftMargin: 0
|
||||
|
||||
Item {
|
||||
id: walletInfoContent
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
WalletHeader {
|
||||
id: walletHeader
|
||||
changeSelectedAccount: leftTab.changeSelectedAccount
|
||||
}
|
||||
|
||||
TabBar {
|
||||
id: walletTabBar
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.bigPadding
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.bigPadding
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.padding
|
||||
height: assetBtn.height
|
||||
background: Rectangle {
|
||||
color: Style.current.transparent
|
||||
RowLayout {
|
||||
id: walletInfoContainer
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.top: walletHeader.bottom
|
||||
anchors.topMargin: 23
|
||||
|
||||
Item {
|
||||
id: walletInfoContent
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
TabBar {
|
||||
id: walletTabBar
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.bigPadding
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.bigPadding
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.padding
|
||||
height: assetBtn.height
|
||||
background: Rectangle {
|
||||
color: Style.current.transparent
|
||||
}
|
||||
|
||||
StatusTabButton {
|
||||
id: assetBtn
|
||||
tabColor: walletModel.currentAccount.iconColor
|
||||
//% "Assets"
|
||||
btnText: qsTrId("wallet-assets")
|
||||
}
|
||||
StatusTabButton {
|
||||
id: collectiblesBtn
|
||||
tabColor: walletModel.currentAccount.iconColor
|
||||
anchors.left: assetBtn.right
|
||||
anchors.leftMargin: 32
|
||||
//% "Collectibles"
|
||||
btnText: qsTrId("wallet-collectibles")
|
||||
}
|
||||
StatusTabButton {
|
||||
id: historyBtn
|
||||
tabColor: walletModel.currentAccount.iconColor
|
||||
anchors.left: collectiblesBtn.right
|
||||
anchors.leftMargin: 32
|
||||
//% "History"
|
||||
btnText: qsTrId("history")
|
||||
onClicked: historyTab.checkIfHistoryIsBeingFetched()
|
||||
}
|
||||
}
|
||||
|
||||
StatusTabButton {
|
||||
id: assetBtn
|
||||
tabColor: walletModel.currentAccount.iconColor
|
||||
//% "Assets"
|
||||
btnText: qsTrId("wallet-assets")
|
||||
}
|
||||
StatusTabButton {
|
||||
id: collectiblesBtn
|
||||
tabColor: walletModel.currentAccount.iconColor
|
||||
anchors.left: assetBtn.right
|
||||
anchors.leftMargin: 32
|
||||
//% "Collectibles"
|
||||
btnText: qsTrId("wallet-collectibles")
|
||||
}
|
||||
StatusTabButton {
|
||||
id: historyBtn
|
||||
tabColor: walletModel.currentAccount.iconColor
|
||||
anchors.left: collectiblesBtn.right
|
||||
anchors.leftMargin: 32
|
||||
//% "History"
|
||||
btnText: qsTrId("history")
|
||||
onClicked: historyTab.checkIfHistoryIsBeingFetched()
|
||||
}
|
||||
}
|
||||
StackLayout {
|
||||
id: stackLayout
|
||||
anchors.rightMargin: Style.current.bigPadding
|
||||
anchors.leftMargin: Style.current.bigPadding
|
||||
anchors.top: walletTabBar.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: Style.current.bigPadding
|
||||
currentIndex: walletTabBar.currentIndex
|
||||
|
||||
StackLayout {
|
||||
id: stackLayout
|
||||
anchors.rightMargin: Style.current.bigPadding
|
||||
anchors.leftMargin: Style.current.bigPadding
|
||||
anchors.top: walletTabBar.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: Style.current.bigPadding
|
||||
currentIndex: walletTabBar.currentIndex
|
||||
|
||||
AssetsTab {
|
||||
id: assetsTab
|
||||
}
|
||||
CollectiblesTab {
|
||||
id: collectiblesTab
|
||||
}
|
||||
HistoryTab {
|
||||
id: historyTab
|
||||
AssetsTab {
|
||||
id: assetsTab
|
||||
}
|
||||
CollectiblesTab {
|
||||
id: collectiblesTab
|
||||
}
|
||||
HistoryTab {
|
||||
id: historyTab
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:770;width:1152}
|
||||
|
Loading…
x
Reference in New Issue
Block a user