added PageSetupWizardCredentials and PageSetupWizardProtocols
- fixed hover and pressed effects for controls
This commit is contained in:
parent
905a3a30f3
commit
3d63d6c0f2
12 changed files with 314 additions and 68 deletions
|
|
@ -11,7 +11,7 @@ import "../Config"
|
|||
|
||||
PageBase {
|
||||
id: root
|
||||
page: PageEnum.Credentials
|
||||
page: PageEnum.WizardCredentials
|
||||
|
||||
FlickableType {
|
||||
id: fl
|
||||
|
|
@ -32,15 +32,11 @@ PageBase {
|
|||
|
||||
HeaderTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 16
|
||||
Layout.topMargin: 66
|
||||
|
||||
Layout.preferredWidth: 328
|
||||
Layout.topMargin: 20
|
||||
|
||||
buttonImage: "qrc:/images/controls/arrow-left.svg"
|
||||
|
||||
headerText: "Подключение к серверу"
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
|
|
@ -60,23 +56,31 @@ PageBase {
|
|||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 40
|
||||
Layout.topMargin: 24
|
||||
|
||||
text: qsTr("Настроить сервер простым образом")
|
||||
|
||||
onClicked: function() {
|
||||
UiLogic.goToPage(PageEnum.WizardEasySetup)
|
||||
}
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
Layout.topMargin: -8
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(255, 255, 255, 0.08)
|
||||
pressedColor: Qt.rgba(255, 255, 255, 0.12)
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Выбрать протокол для установки")
|
||||
|
||||
onClicked: function() {
|
||||
UiLogic.goToPage(PageEnum.WizardProtocols)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
74
client/ui/qml/Pages2/PageSetupWizardEasy.qml
Normal file
74
client/ui/qml/Pages2/PageSetupWizardEasy.qml
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import PageEnum 1.0
|
||||
|
||||
import "./"
|
||||
import "../Pages"
|
||||
import "../Controls2"
|
||||
import "../Config"
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
page: PageEnum.WizardEasySetup
|
||||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
spacing: 16
|
||||
|
||||
HeaderTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
|
||||
buttonImage: "qrc:/images/controls/arrow-left.svg"
|
||||
|
||||
headerText: "Какой уровень контроля интернета в вашем регионе?"
|
||||
}
|
||||
|
||||
CardType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
headerText: "Высокий"
|
||||
bodyText: "Многие иностранные сайты и VPN-провайдеры заблокированы"
|
||||
}
|
||||
|
||||
CardType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
checked: true
|
||||
|
||||
headerText: "Средний"
|
||||
bodyText: "Некоторые иностранные сайты заблокированы, но VPN-провайдеры не блокируются"
|
||||
}
|
||||
|
||||
CardType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
headerText: "Низкий"
|
||||
bodyText: "Хочу просто повысить уровень приватности"
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
Layout.bottomMargin: 32
|
||||
|
||||
text: qsTr("Продолжить")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
102
client/ui/qml/Pages2/PageSetupWizardProtocols.qml
Normal file
102
client/ui/qml/Pages2/PageSetupWizardProtocols.qml
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
|
||||
import "./"
|
||||
import "../Pages"
|
||||
import "../Controls2"
|
||||
import "../Config"
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
page: PageEnum.WizardProtocols
|
||||
|
||||
SortFilterProxyModel {
|
||||
id: containersModel
|
||||
sourceModel: UiLogic.containersModel
|
||||
filters: [
|
||||
ValueFilter {
|
||||
roleName: "is_installed_role"
|
||||
value: false
|
||||
},
|
||||
ValueFilter {
|
||||
roleName: "service_type_role"
|
||||
value: ProtocolEnum.Vpn
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
Column {
|
||||
id: content
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
anchors.topMargin: 20
|
||||
|
||||
spacing: 16
|
||||
|
||||
HeaderTextType {
|
||||
width: parent.width
|
||||
buttonImage: "qrc:/images/controls/arrow-left.svg"
|
||||
|
||||
headerText: "Протокол подключения"
|
||||
descriptionText: "Выберите более приоритетный для вас. Позже можно будет установить остальные протоколы и доп сервисы, вроде DNS-прокси и SFTP."
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: containers
|
||||
width: parent.width
|
||||
height: containers.contentItem.height
|
||||
currentIndex: -1
|
||||
clip: true
|
||||
interactive: false
|
||||
model: containersModel
|
||||
|
||||
delegate: Item {
|
||||
implicitWidth: containers.width
|
||||
implicitHeight: delegateContent.implicitHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: delegateContent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
LabelWithButtonType {
|
||||
id: container
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
Layout.bottomMargin: 16
|
||||
|
||||
text: name_role
|
||||
descriptionText: desc_role
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
color: "#2C2D30"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ PageBase {
|
|||
source: "qrc:/images/amneziaBigLogo.png"
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.topMargin: 80
|
||||
Layout.topMargin: 32
|
||||
Layout.leftMargin: 8
|
||||
Layout.rightMargin: 8
|
||||
Layout.preferredWidth: 344
|
||||
|
|
@ -67,8 +67,8 @@ PageBase {
|
|||
Layout.rightMargin: 16
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(255, 255, 255, 0.08)
|
||||
pressedColor: Qt.rgba(255, 255, 255, 0.12)
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
|
@ -123,6 +123,7 @@ PageBase {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
text: "Данные для подключения"
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
|
|
@ -134,7 +135,8 @@ PageBase {
|
|||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
onClickedFunc: function() {
|
||||
UiLogic.goToPage(PageEnum.Credentials)
|
||||
UiLogic.goToPage(PageEnum.WizardCredentials)
|
||||
drawer.visible = false
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue