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

fix: Adding Beta user agreement #11100

Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions storybook/PagesModel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ ListModel {
title: "SendModal"
section: "Popups"
}
ListElement {
title: "UserAgreementPopup"
section: "Popups"
}
ListElement {
title: "MembersSelector"
section: "Components"
Expand Down
3 changes: 3 additions & 0 deletions storybook/figma.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,8 @@
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?type=design&node-id=29528%3A588403&t=GUxMZEWcfRO7pXJb-1",
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?type=design&node-id=29528%3A588563&t=GUxMZEWcfRO7pXJb-1",
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?type=design&node-id=29528%3A587660&t=GUxMZEWcfRO7pXJb-1"
],
"UserAgreementPopup": [
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba⎜Desktop?type=design&node-id=31450-560694&t=Q4MOViPCoHsTjhs6-0"
]
}
34 changes: 34 additions & 0 deletions storybook/pages/UserAgreementPopupPage.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import QtQuick 2.15
import QtQuick.Controls 2.15

import shared.popups 1.0

import Storybook 1.0

SplitView {
orientation: Qt.Vertical

Item {

SplitView.fillWidth: true
SplitView.fillHeight: true

PopupBackground {
anchors.fill: parent
}

Button {
anchors.centerIn: parent
text: "Reopen"

onClicked: popup.open()
}
}

UserAgreementPopup {
id: popup
anchors.centerIn: parent
modal: false
visible: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add for convenience:

        anchors.centerIn: parent
        modal: false

}
}
9 changes: 9 additions & 0 deletions ui/app/mainui/AppMain.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1388,4 +1388,13 @@ Item {
width: appMain.width
height: appMain.height
}

Loader {
id: userAgreementLoader
active: production && !localAppSettings.testEnvironment
sourceComponent: UserAgreementPopup {
visible: appMain.visible
onClosed: userAgreementLoader.active = false
}
}
}
124 changes: 124 additions & 0 deletions ui/imports/shared/popups/UserAgreementPopup.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Popups.Dialog 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1

import utils 1.0

StatusModal {
id: root
width: 640
headerSettings.title: qsTr("Welcome to Status Desktop Beta")
hasCloseButton: false

closePolicy: Popup.NoAutoClose

component Paragraph: StatusBaseText {
font.pixelSize: 15
lineHeightMode: Text.FixedHeight
lineHeight: 22
visible: !!text
wrapMode: Text.Wrap
}

component AgreementSection: ColumnLayout {
property alias title: titleItem.text
property alias body: bodyItem.text
spacing: 12
Paragraph {
id: titleItem
Layout.fillWidth: true
Layout.fillHeight: true
font.weight: Font.DemiBold
}

Paragraph {
id: bodyItem
Layout.fillWidth: true
Layout.fillHeight: true
}
}

StatusScrollView {
id: scrollView
anchors.fill: parent
contentWidth: availableWidth

ColumnLayout {
id: layout
width: scrollView.availableWidth
spacing: 22
StatusRoundedImage {
id: statusRoundedImage
objectName: "headerImage"
Layout.preferredWidth: 64
Layout.preferredHeight: 64
Layout.alignment: Qt.AlignHCenter
image.source: Style.png("status-logo")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding image.mipmap: true here improves quality a bit bc the original image is much bigger than 64x64

image.mipmap: true
}

AgreementSection {
title: qsTr("Warning - Status desktop is currently in Beta")
body: qsTr("• The Wallet is not yet safe or secure to use
• Do not use real funds in the Wallet
• Do not use accounts that contain tokens of value in the Wallet")
}

AgreementSection {
title: qsTr("Also be aware")
body: qsTr("• Status Desktop is incompatible with Status Mobile versions 1.x
• This version of Status may break or stop working without warning
• Communities created with this version may be broken by future releases
• Status desktop currently consumes large amounts of bandwidth")
}

AgreementSection {
body: qsTr("We are working to fix all these issues ASAP, ahead of Status Desktop’s 1.0 release!")
}

StatusDialogDivider {
Layout.fillWidth: true
}

AgreementSection {
body: qsTr("I confirm that...")
}

StatusCheckBox {
id: agreeToUse
Layout.fillWidth: true
Layout.topMargin: -10 //reduced margin by design
contentItem: Paragraph {
text: qsTr("I’ve read the above and understand that Status Desktop is Beta software")
leftPadding: readyToUse.indicator.width + readyToUse.spacing
}
}

StatusCheckBox {
id: readyToUse
Layout.fillWidth: true
Layout.topMargin: -10 //reduced margin by design
Layout.bottomMargin: layout.spacing
contentItem: Paragraph {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe

        Layout.fillWidth: true
        Layout.fillHeight: true

could be moved from Paragraph to AgreementSection bc in this context those attached properties make no sense.

text: qsTr("I’m ready to use Status Desktop Beta")
leftPadding: readyToUse.indicator.width + readyToUse.spacing
}
}
}
}

rightButtons: [
StatusButton {
text: qsTr("I’m ready to use Status Desktop Beta")
enabled: agreeToUse.checked && readyToUse.checked
onClicked: root.close()
}
]
}
1 change: 1 addition & 0 deletions ui/imports/shared/popups/qmldir
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ GetSyncCodeInstructionsPopup 1.0 GetSyncCodeInstructionsPopup.qml
NoPermissionsToJoinPopup 1.0 NoPermissionsToJoinPopup.qml
RemoveAccountConfirmationPopup 1.0 RemoveAccountConfirmationPopup.qml
DeleteMessageConfirmationPopup 1.0 DeleteMessageConfirmationPopup.qml
UserAgreementPopup 1.0 UserAgreementPopup.qml
1 change: 1 addition & 0 deletions ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ StatusWindow {
id: app
AppMain {
sysPalette: systemPalette
visible: !appLoadingAnimation.active
}
}

Expand Down