2019-01-14 01:02:44 +01:00
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2019-04-11 03:17:29 +02:00
import QtQuick 2.9
2019-01-14 01:02:44 +01:00
import QtQuick . Dialogs 1.2
import QtQuick . Layouts 1.2
import QtQuick . Controls 2.0
import "../js/Wizard.js" as Wizard
import "../components" as MoneroComponents
Rectangle {
id: wizardModeSelection1
color: "transparent"
2019-07-24 05:07:54 +02:00
property alias pageHeight: pageRoot . height
2019-01-14 01:02:44 +01:00
property string viewName: "wizardModeSelection1"
ColumnLayout {
2019-07-24 05:07:54 +02:00
id: pageRoot
2019-01-14 01:02:44 +01:00
Layout.alignment: Qt . AlignHCenter ;
width: parent . width - 100
Layout.fillWidth: true
anchors.horizontalCenter: parent . horizontalCenter ;
2019-04-25 21:09:23 +02:00
spacing: 10
2019-01-14 01:02:44 +01:00
ColumnLayout {
Layout.fillWidth: true
Layout.maximumWidth: wizardController . wizardSubViewWidth
Layout.topMargin: wizardController . wizardSubViewTopMargin
Layout.alignment: Qt . AlignHCenter
2019-04-25 21:09:23 +02:00
spacing: 0
2019-01-14 01:02:44 +01:00
WizardHeader {
title: qsTr ( "Mode selection." ) + translationManager . emptyString
subtitle: qsTr ( "Please select the statement that best matches you." ) + translationManager . emptyString
}
WizardMenuItem {
opacity: appWindow . persistentSettings . nettype == 0 ? 1.0 : 0.5
2019-04-25 21:09:23 +02:00
Layout.topMargin: 20
2019-01-14 01:02:44 +01:00
headerText: qsTr ( "Simple mode" ) + translationManager . emptyString
bodyText: {
if ( appWindow . persistentSettings . nettype == 0 ) {
return qsTr ( "Easy access to sending, receiving and basic functionality." ) + translationManager . emptyString ;
} else {
return "Available on mainnet." ;
}
}
2019-04-11 03:17:29 +02:00
imageIcon: "qrc:///images/remote-node.png"
2019-01-14 01:02:44 +01:00
onMenuClicked: {
if ( appWindow . persistentSettings . nettype == 0 ) {
appWindow . changeWalletMode ( 0 ) ;
2019-07-24 05:07:54 +02:00
wizardController . wizardStackView . backTransition = false ;
2019-01-14 01:02:44 +01:00
wizardController . wizardState = 'wizardModeRemoteNodeWarning' ;
}
}
}
Rectangle {
Layout.preferredHeight: 1
2019-04-25 21:09:23 +02:00
Layout.topMargin: 5
Layout.bottomMargin: 10
2019-01-14 01:02:44 +01:00
Layout.fillWidth: true
color: MoneroComponents . Style . dividerColor
opacity: MoneroComponents . Style . dividerOpacity
}
WizardMenuItem {
opacity: appWindow . persistentSettings . nettype == 0 ? 1.0 : 0.5
headerText: qsTr ( "Simple mode" ) + " (bootstrap)" + translationManager . emptyString
bodyText: {
if ( appWindow . persistentSettings . nettype == 0 ) {
return qsTr ( "Easy access to sending, receiving and basic functionality. The blockchain is downloaded to your computer." ) + translationManager . emptyString ;
} else {
return "Available on mainnet." ;
}
}
2019-04-11 03:17:29 +02:00
imageIcon: "qrc:///images/local-node.png"
2019-01-14 01:02:44 +01:00
onMenuClicked: {
if ( appWindow . persistentSettings . nettype == 0 ) {
appWindow . changeWalletMode ( 1 ) ;
2019-07-24 05:07:54 +02:00
wizardController . wizardStackView . backTransition = false ;
2019-01-14 01:02:44 +01:00
wizardController . wizardState = 'wizardModeBootstrap' ;
}
}
}
Rectangle {
Layout.preferredHeight: 1
2019-04-25 21:09:23 +02:00
Layout.topMargin: 5
Layout.bottomMargin: 10
2019-01-14 01:02:44 +01:00
Layout.fillWidth: true
color: MoneroComponents . Style . dividerColor
opacity: MoneroComponents . Style . dividerOpacity
}
WizardMenuItem {
headerText: qsTr ( "Advanced mode" ) + translationManager . emptyString
bodyText: qsTr ( "Includes extra features like mining and message verification. The blockchain is downloaded to your computer." ) + translationManager . emptyString
2019-04-11 03:17:29 +02:00
imageIcon: "qrc:///images/local-node-full.png"
2019-01-14 01:02:44 +01:00
onMenuClicked: {
2019-04-15 04:59:04 +02:00
wizardController . wizardStackView . backTransition = false ;
2019-01-14 01:02:44 +01:00
appWindow . changeWalletMode ( 2 ) ;
wizardController . wizardState = 'wizardHome' ;
}
}
WizardNav {
2019-04-25 21:09:23 +02:00
Layout.topMargin: 5
2019-11-27 19:13:32 +01:00
btnPrevText: qsTr ( "Back to menu" ) + translationManager . emptyString
2019-01-14 01:02:44 +01:00
btnNext.visible: false
progressSteps: 0
onPrevClicked: {
2019-11-27 19:13:32 +01:00
wizardController . wizardStackView . backTransition = wizardController . wizardStatePrevious . viewName == 'wizardLanguage' ;
wizardController . wizardState = wizardController . wizardStatePrevious . viewName == 'wizardLanguage' ? 'wizardLanguage' : 'wizardHome' ;
2019-01-14 01:02:44 +01:00
}
}
}
}
Behavior on opacity {
NumberAnimation {
duration: 200 ;
easing.type: Easing . InCubic ;
}
}
}