Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text did not fit in camouflage password modal #1864

Merged
merged 1 commit into from
Jul 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions atomic_defi_design/Dex/Settings/CamouflagePasswordModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,55 @@ import "../Components"
import "../Constants"
import App 1.0

MultipageModal {
MultipageModal
{
id: root

width: 800

onClosed: {
input_password_suffix.reset()
}
onClosed: input_password_suffix.reset()

MultipageModalContent {
MultipageModalContent
{
titleText: qsTr("Setup Camouflage Password")

FloatingBackground {
FloatingBackground
{
id: warning_bg
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: 10

width: parent.width - 5
height: warning_texts.height + 20

Column {
Column
{
id: warning_texts
anchors.centerIn: parent
width: parent.width
spacing: 10

DefaultText {
DefaultText
{
width: parent.width - 40
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter

text_value: qsTr("Camouflage Password is a secret password for emergency situations.")
font: DexTypo.head6
font: DexTypo.subtitle2
}

DefaultText {
DefaultText
{
width: parent.width - 40
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
font: DexTypo.subtitle2
text_value: qsTr("Using it to login will display your balance lower than it actually is.")
}

DefaultText {
DefaultText
{
width: parent.width - 40
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
Expand All @@ -59,7 +64,8 @@ MultipageModal {
}
}

PasswordForm {
PasswordForm
{
id: input_password_suffix
Layout.fillWidth: true
field_title: qsTr("Password suffix")
Expand All @@ -70,24 +76,26 @@ MultipageModal {
}

// Buttons
footer: [
DexAppButton {
footer:
[
DexAppButton
{
text: qsTr("Cancel")
leftPadding: 40
rightPadding: 40
radius: 20
onClicked: root.close()
},
Item {
Layout.fillWidth: true
},
DexAppOutlineButton {
Item { Layout.fillWidth: true },
DexAppOutlineButton
{
text: qsTr("Save")
leftPadding: 40
rightPadding: 40
radius: 20
enabled: input_password_suffix.isValid()
onClicked: {
onClicked:
{
API.app.wallet_mgr.set_emergency_password(input_password_suffix.field.text)
root.close()
}
Expand Down