2023-02-09 18:25:10 +01:00
|
|
|
/*
|
|
|
|
|
* This file is part of the Flowee project
|
2025-01-02 18:37:27 +01:00
|
|
|
* Copyright (C) 2023-2025 Tom Zander <tom@flowee.org>
|
2023-02-09 18:25:10 +01:00
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import "../Flowee" as Flowee
|
2023-05-02 10:40:04 +02:00
|
|
|
import Flowee.org.pay
|
2023-02-09 18:25:10 +01:00
|
|
|
|
|
|
|
|
Page {
|
|
|
|
|
id: root
|
|
|
|
|
headerText: qsTr("Welcome!")
|
|
|
|
|
headerButtonVisible: true
|
|
|
|
|
headerButtonText: qsTr("Continue")
|
|
|
|
|
onHeaderButtonClicked: {
|
|
|
|
|
if (!portfolio.current.isUserOwned) {
|
2023-05-02 10:40:04 +02:00
|
|
|
request.clear(); // to make the QR here the same as there
|
2023-02-09 18:25:10 +01:00
|
|
|
var mainView = thePile.get(0);
|
|
|
|
|
mainView.currentIndex = 2 // go to the receive-tab
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
thePile.pop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2025-01-02 18:37:27 +01:00
|
|
|
Item { // data
|
2023-02-09 18:25:10 +01:00
|
|
|
Connections {
|
|
|
|
|
// connect to wallet and when its no longe user owned, close this window.
|
|
|
|
|
target: portfolio.current
|
|
|
|
|
function onIsUserOwnedChanged() {
|
|
|
|
|
// transaction seen arriving, this startup screen has fulfilled its purpose.
|
|
|
|
|
thePile.pop();
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-02 10:40:04 +02:00
|
|
|
PaymentRequest {
|
|
|
|
|
id: request
|
|
|
|
|
account: portfolio.current
|
|
|
|
|
}
|
2023-02-09 18:25:10 +01:00
|
|
|
}
|
2023-05-02 10:40:04 +02:00
|
|
|
onActiveFocusChanged: request.start();
|
2023-02-09 18:25:10 +01:00
|
|
|
|
|
|
|
|
Flickable {
|
2025-01-02 18:37:27 +01:00
|
|
|
width: parent.width + 20
|
|
|
|
|
x: -10
|
|
|
|
|
height: parent.height + 20
|
|
|
|
|
contentWidth: width
|
2023-05-17 21:21:33 +02:00
|
|
|
contentHeight: column.height + 20
|
2023-02-09 18:25:10 +01:00
|
|
|
clip: true
|
|
|
|
|
Column {
|
|
|
|
|
id: column
|
|
|
|
|
width: parent.width
|
|
|
|
|
spacing: 10
|
|
|
|
|
|
2025-01-02 18:37:27 +01:00
|
|
|
Rectangle {
|
|
|
|
|
width: parent.width
|
|
|
|
|
height: 80
|
|
|
|
|
color: mainWindow.floweeBlue
|
2023-02-09 18:25:10 +01:00
|
|
|
|
|
|
|
|
Image {
|
2025-01-02 18:37:27 +01:00
|
|
|
id: img
|
|
|
|
|
source: "qrc:/FloweePay-light.svg"
|
|
|
|
|
// ratio: 449 / 77
|
|
|
|
|
width: parent.width - 20
|
|
|
|
|
height: width / 449 * 77
|
|
|
|
|
x: 10
|
|
|
|
|
y: 8
|
2023-02-09 18:25:10 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Flowee.Label {
|
2023-02-09 18:26:58 +01:00
|
|
|
text: qsTr("Moving the world towards a Bitcoin\u00a0Cash economy")
|
2023-02-09 18:25:10 +01:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
font.italic: true
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2025-01-02 18:37:27 +01:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2023-02-14 17:49:16 +01:00
|
|
|
width: column.width * 0.8
|
2025-02-01 17:42:21 +01:00
|
|
|
font.pixelSize: root.font.pixelSize * 1.2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item { width: 1; height: 10 } // spacer
|
|
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
|
id: videoSection
|
|
|
|
|
property QtObject infoObject:
|
|
|
|
|
ModuleManager.moduleSection("socialFeedModule");
|
|
|
|
|
columnSpacing: 20
|
|
|
|
|
rowSpacing: 0
|
|
|
|
|
width: 120 + 120 + 20
|
|
|
|
|
|
|
|
|
|
columns: infoObject == null ? 1 : 2
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: logo
|
|
|
|
|
height: 120
|
|
|
|
|
width: 120
|
|
|
|
|
radius: 26
|
|
|
|
|
color: mainWindow.floweeBlue
|
|
|
|
|
Item {
|
|
|
|
|
// clip the logo only, ignore the text part
|
|
|
|
|
width: 85
|
|
|
|
|
height: 85
|
|
|
|
|
clip: true
|
|
|
|
|
x: 20
|
|
|
|
|
y: 25
|
|
|
|
|
Image {
|
|
|
|
|
source: "qrc:/FloweePay-light.svg"
|
|
|
|
|
// ratio: 449 / 77
|
|
|
|
|
width: height / 77 * 449
|
|
|
|
|
height: 85
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Image {
|
|
|
|
|
source: "qrc:/play-button.svg"
|
|
|
|
|
width: 90
|
|
|
|
|
height: 90
|
|
|
|
|
opacity: 0.8
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
}
|
|
|
|
|
MouseArea { anchors.fill: parent; onClicked: Qt.openUrlExternally("https://flowee.org/v/gettingstarted.mp4") }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
source: "qrc:/social-feed/social-feed.svg"
|
|
|
|
|
Layout.minimumWidth: 120
|
|
|
|
|
Layout.minimumHeight: 120
|
|
|
|
|
visible: parent.infoObject !== null
|
|
|
|
|
MouseArea { anchors.fill: parent; onClicked: thePile.push(videoSection.infoObject.qml); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
text: qsTr("Getting Started")
|
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
Layout.maximumWidth: 140
|
|
|
|
|
MouseArea { anchors.fill: parent; onClicked: Qt.openUrlExternally("https://flowee.org/v/gettingstarted.mp4") }
|
|
|
|
|
}
|
|
|
|
|
TextButton {
|
|
|
|
|
text: qsTr("All Videos")
|
|
|
|
|
visible: parent.infoObject !== null
|
|
|
|
|
Layout.maximumWidth: 140
|
|
|
|
|
pageButton: true
|
|
|
|
|
onClicked: thePile.push(parent.infoObject.qml);
|
|
|
|
|
}
|
2023-02-09 18:25:10 +01:00
|
|
|
}
|
2025-01-02 18:37:27 +01:00
|
|
|
|
|
|
|
|
Item { width: 1; height: 10 } // spacer
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
radius: 20
|
|
|
|
|
height:button2Text.height + 20
|
|
|
|
|
width: button2Text.width + 40
|
|
|
|
|
color: "#178b3a"
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
property QtObject infoObject:
|
|
|
|
|
ModuleManager.sectionOnPlugin("sendSweepModule", "main");
|
|
|
|
|
|
|
|
|
|
visible: infoObject !== null
|
|
|
|
|
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
id: button2Text
|
|
|
|
|
color: "white"
|
|
|
|
|
text: qsTr("Claim a Cash Stamp")
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
}
|
|
|
|
|
MouseArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
onClicked: thePile.replace(parent.infoObject.qml);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item { width: 1; height: 5 } // spacer
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
spacing: 15
|
|
|
|
|
x: (column.width - width) / 2
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: 50
|
|
|
|
|
height: 1
|
|
|
|
|
color: palette.button
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
}
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
text: qsTr("OR")
|
|
|
|
|
}
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: 50
|
|
|
|
|
height: 1
|
|
|
|
|
color: palette.button
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-02-09 18:25:10 +01:00
|
|
|
|
2023-05-17 21:21:33 +02:00
|
|
|
Flowee.Label {
|
|
|
|
|
id: instructions
|
2025-01-02 18:37:27 +01:00
|
|
|
text: qsTr("Scan to send to your wallet") + ":"
|
2023-05-17 21:21:33 +02:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
width: column.width * 0.8
|
|
|
|
|
x: column.width / 10
|
2023-02-09 18:25:10 +01:00
|
|
|
}
|
2023-05-17 21:21:33 +02:00
|
|
|
Flowee.QRWidget {
|
2025-01-28 14:01:46 +01:00
|
|
|
width: parent.width - 20
|
|
|
|
|
x: 10
|
2023-05-17 21:21:33 +02:00
|
|
|
qrText: request.qr
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-09 18:25:10 +01:00
|
|
|
Row {
|
|
|
|
|
spacing: 15
|
2023-02-14 17:49:16 +01:00
|
|
|
x: (column.width - width) / 2
|
2023-02-09 18:25:10 +01:00
|
|
|
Rectangle {
|
|
|
|
|
width: 50
|
|
|
|
|
height: 1
|
2023-02-21 16:40:46 +01:00
|
|
|
color: palette.button
|
2023-02-09 18:25:10 +01:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
}
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
text: qsTr("OR")
|
|
|
|
|
}
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: 50
|
|
|
|
|
height: 1
|
2023-02-21 16:40:46 +01:00
|
|
|
color: palette.button
|
2023-02-09 18:25:10 +01:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-14 17:49:16 +01:00
|
|
|
Item { width: 1; height: 5 } // spacer
|
2023-02-09 18:25:10 +01:00
|
|
|
|
2023-05-17 21:21:33 +02:00
|
|
|
Rectangle {
|
|
|
|
|
radius: 20
|
|
|
|
|
height:buttonText.height + 20
|
|
|
|
|
width: buttonText.width + 40
|
|
|
|
|
color: "#178b3a"
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
id: buttonText
|
|
|
|
|
color: "white"
|
|
|
|
|
text: qsTr("Add a different wallet")
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
}
|
|
|
|
|
MouseArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
onClicked: thePile.replace("./NewAccount.qml");
|
|
|
|
|
}
|
2023-02-09 18:25:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item { width: 1; height: 40 } // spacer
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|