From f8e7a0f5f42119a1c0fdeed62a18e08b113765f6 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Thu, 18 Jun 2020 21:08:06 +0200 Subject: [PATCH] first implementation of HushChat TOS --- application.qrc | 1 + src/firsttimewizard.cpp | 22 ++-- src/firsttimewizard.h | 1 + src/newwallet.ui | 224 +++++++++++++++++++++++++++------------- 4 files changed, 170 insertions(+), 78 deletions(-) diff --git a/application.qrc b/application.qrc index 6002ea6..5c3f586 100644 --- a/application.qrc +++ b/application.qrc @@ -47,6 +47,7 @@ res/addContactBlack.png res/unknownBlack.png res/unknownWhite.png + res/hush-passion.png res/hushdlogo.gif diff --git a/src/firsttimewizard.cpp b/src/firsttimewizard.cpp index 9e360aa..5b04cf1 100644 --- a/src/firsttimewizard.cpp +++ b/src/firsttimewizard.cpp @@ -51,12 +51,13 @@ int FirstTimeWizard::nextId() const { NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent) { setTitle("Create or Restore wallet."); - - QWidget* pageWidget = new QWidget(); Ui_CreateWalletForm form; form.setupUi(pageWidget); - + + parent->button(QWizard::CommitButton)->setEnabled(false); + setButtonText(QWizard::CommitButton, "Next"); + auto fnPasswordEdited = [=](const QString&) { // Enable the Finish button if the passwords match. @@ -66,11 +67,11 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent if (!form.txtPassword->text().isEmpty() && - form.txtPassword->text() == form.txtConfirmPassword->text() && passphraseBlank.size() >= 16) { + form.txtPassword->text() == form.txtConfirmPassword->text() && passphraseBlank.size() >= 16 ){ form.lblPasswordMatch->setText(""); - parent->button(QWizard::CommitButton)->setEnabled(true); - setButtonText(QWizard::CommitButton, "Next"); + + form.radioRestoreWallet->setEnabled(true); form.radioNewWallet->setEnabled(true); form.radioNewWallet->setChecked(true); @@ -109,7 +110,7 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent //qDebug()<<"Objekt gesetzt"; - + // Exclusive buttons QObject::connect(form.radioNewWallet, &QRadioButton::clicked, [=](bool checked) { if (checked) { @@ -124,6 +125,13 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent } }); + + QObject::connect(form.TOS, &QRadioButton::clicked, [=](bool checked) { + if (checked) { + parent->button(QWizard::CommitButton)->setEnabled(true); + + } + }); diff --git a/src/firsttimewizard.h b/src/firsttimewizard.h index 8d84b61..324f115 100644 --- a/src/firsttimewizard.h +++ b/src/firsttimewizard.h @@ -5,6 +5,7 @@ #include "ui_newseed.h" #include "ui_restoreseed.h" +#include "ui_newwallet.h" #include "mainwindow.h" diff --git a/src/newwallet.ui b/src/newwallet.ui index 9f1e76c..6168e47 100644 --- a/src/newwallet.ui +++ b/src/newwallet.ui @@ -6,90 +6,205 @@ 0 0 - 437 - 381 + 936 + 736 + + + 936 + 736 + + Create New SDL Wallet - + + + + + 918 + 481 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<h1 style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:xx-large; font-weight:600;">Hush + HushChat ToS</span></h1> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All users of this platform agree to not use it for initiating or threatening any forceful interference or violence on an individual or their property, aka, the <a href="https://en.wikipedia.org/wiki/Non-aggression_principle"><span style=" text-decoration: underline; color:#0000ff;">Non-Aggression Principle</span></a>.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">THE SERVICE IS PROVIDED “AS IS” AND The Hush Developers DO NOT MAKE ANY SPECIFIC COMMITMENTS OR WARRANTIES ABOUT THE SERVICE.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">By clicking OK, you agree to use Hush, SilentDragon, and HushChat in accordance with your local laws, that all liabilities related to using this service are your own, and The Hush Developers WILL NOT BE RESPONSIBLE FOR any losses related to using this software.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + true + + + + + + + Qt::Vertical + + + + 20 + 38 + + + + + + + + + 0 + 0 + + + + color: red; + + + <html><head/><body><p><span style=" font-style:italic;">Passphrase don't match</span></p></body></html> + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + <html><head/><body><p><span style=" font-style:italic;">16 letters minimum</span></p></body></html> + + + + + + + Encryption Passphrase: + + + + + + + QLineEdit::Password + + + + Confirm Passphrase: - + QLineEdit::Password - - + + + + Qt::Horizontal + + + + + 0 0 + + + 431 + 0 + + + + + 431 + 16777215 + + - - - - - Restore wallet from seed - - - + - + - Restore an existing wallet, using the 24-word seed. + Create a new wallet with a randomly generated seed. true + + + + Create a new wallet + + + - - - - QLineEdit::Password - - - - - + + 0 0 + + + 431 + 0 + + + + + 431 + 16777215 + + - + - + - Create a new wallet + Restore wallet from seed - + - Create a new wallet with a randomly generated seed. + Restore an existing wallet, using the 24-word seed. true @@ -99,49 +214,16 @@ - - - - Qt::Horizontal - - - - - - - Encryption Passphrase: - - - - - - - - 0 - 0 - - - - color: red; - - - <html><head/><body><p><span style=" font-style:italic;">Passphrase don't match</span></p></body></html> - - - Qt::AlignCenter - - - - - - - - 0 - 0 - + + + + + 251 + 16777215 + - <html><head/><body><p><span style=" font-style:italic;">16 letters minimum</span></p></body></html> + I accept the TOS