UI fixes, VPN page fixes
This commit is contained in:
parent
25428c9165
commit
9dee7bb7e7
25 changed files with 251 additions and 157 deletions
|
@ -20,7 +20,7 @@ Drawer {
|
|||
height: parent.height
|
||||
|
||||
modal: true
|
||||
interactive: true
|
||||
interactive: activeFocus
|
||||
|
||||
SortFilterProxyModel {
|
||||
id: proxyModel
|
||||
|
|
|
@ -30,6 +30,7 @@ PageBase {
|
|||
id: pushButtonWizard
|
||||
text: qsTr("Run Setup Wizard")
|
||||
anchors.top: labelWizard.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.topMargin: 10
|
||||
onClicked: {
|
||||
UiLogic.goToPage(PageEnum.Wizard);
|
||||
|
|
|
@ -110,22 +110,11 @@ PageBase {
|
|||
wrapMode: Text.Wrap
|
||||
text: desc
|
||||
}
|
||||
ImageButtonType {
|
||||
x: 212
|
||||
y: 25
|
||||
width: 32
|
||||
height: 24
|
||||
checkable: true
|
||||
iconMargin: 0
|
||||
icon.source: checked ? "qrc:/images/connect_button_connected.png"
|
||||
: "qrc:/images/connect_button_disconnected.png"
|
||||
visible: false
|
||||
}
|
||||
ImageButtonType {
|
||||
x: parent.width - 30
|
||||
y: 25
|
||||
width: 24
|
||||
height: 24
|
||||
y: 15
|
||||
width: 30
|
||||
height: 30
|
||||
checkable: true
|
||||
icon.source: checked ? "qrc:/images/check.png"
|
||||
: "qrc:/images/uncheck.png"
|
||||
|
@ -138,9 +127,9 @@ PageBase {
|
|||
ImageButtonType {
|
||||
id: pushButtonSetting
|
||||
x: parent.width - 60
|
||||
y: 25
|
||||
width: 24
|
||||
height: 24
|
||||
y: 15
|
||||
width: 30
|
||||
height: 30
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
opacity: 0
|
||||
|
||||
|
|
|
@ -15,36 +15,30 @@ PageBase {
|
|||
BackButton {
|
||||
id: back
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 16
|
||||
|
||||
Caption {
|
||||
id: caption
|
||||
text: SitesLogic.labelSitesAddCustomText
|
||||
}
|
||||
|
||||
LabelType {
|
||||
id: lb_addr
|
||||
color: "#333333"
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("Web site/Hostname/IP address/Subnet")
|
||||
x: 20
|
||||
y: 110
|
||||
width: 311
|
||||
anchors.top: caption.bottom
|
||||
anchors.topMargin: 10
|
||||
width: parent.width
|
||||
height: 21
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 20
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignTop
|
||||
text: SitesLogic.labelSitesAddCustomText
|
||||
x: 20
|
||||
y: 40
|
||||
width: 340
|
||||
height: 60
|
||||
}
|
||||
|
||||
TextFieldType {
|
||||
x: 20
|
||||
y: 140
|
||||
width: 231
|
||||
anchors.top: lb_addr.bottom
|
||||
anchors.topMargin: 10
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.right: sites_add.left
|
||||
anchors.rightMargin: 10
|
||||
height: 31
|
||||
placeholderText: qsTr("yousite.com or IP address")
|
||||
text: SitesLogic.lineEditSitesAddCustomText
|
||||
|
@ -55,10 +49,13 @@ PageBase {
|
|||
SitesLogic.onPushButtonAddCustomSitesClicked()
|
||||
}
|
||||
}
|
||||
|
||||
BlueButtonType {
|
||||
id: sites_add
|
||||
x: 260
|
||||
y: 140
|
||||
anchors.right: sites_import.left
|
||||
anchors.rightMargin: 10
|
||||
anchors.top: lb_addr.bottom
|
||||
anchors.topMargin: 10
|
||||
width: 51
|
||||
height: 31
|
||||
font.pixelSize: 24
|
||||
|
@ -67,23 +64,13 @@ PageBase {
|
|||
SitesLogic.onPushButtonAddCustomSitesClicked()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
id: sites_delete
|
||||
x: 80
|
||||
y: 589
|
||||
width: 231
|
||||
height: 31
|
||||
font.pixelSize: 16
|
||||
text: qsTr("Delete selected")
|
||||
onClicked: {
|
||||
SitesLogic.onPushButtonSitesDeleteClicked(tb.currentRow)
|
||||
}
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: sites_import
|
||||
x: 320
|
||||
y: 140
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
anchors.top: lb_addr.bottom
|
||||
anchors.topMargin: 10
|
||||
width: 51
|
||||
height: 31
|
||||
background: Rectangle {
|
||||
|
@ -116,12 +103,15 @@ PageBase {
|
|||
SitesLogic.onPushButtonSitesImportClicked(fileUrl)
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: tb
|
||||
x: 20
|
||||
y: 200
|
||||
width: 341
|
||||
height: 371
|
||||
anchors.top: sites_add.bottom
|
||||
anchors.topMargin: 10
|
||||
width: parent.width - 40
|
||||
anchors.bottom: sites_delete.top
|
||||
anchors.bottomMargin: 10
|
||||
spacing: 1
|
||||
clip: true
|
||||
property int currentRow: -1
|
||||
|
@ -187,4 +177,17 @@ PageBase {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
BlueButtonType {
|
||||
id: sites_delete
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 20
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 31
|
||||
font.pixelSize: 16
|
||||
text: qsTr("Delete selected")
|
||||
onClicked: {
|
||||
SitesLogic.onPushButtonSitesDeleteClicked(tb.currentRow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ PageBase {
|
|||
anchors.top: parent.top
|
||||
anchors.topMargin: 5
|
||||
|
||||
text: qsTr("Where to get connection data →")
|
||||
text: qsTr("How to get own server? →")
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ PageBase {
|
|||
checkable: true
|
||||
checked: true
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://amnezia.org")
|
||||
Qt.openUrlExternally("https://amnezia.org/instruction.html")
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.15
|
||||
import PageEnum 1.0
|
||||
import "./"
|
||||
import "../Controls"
|
||||
|
@ -11,12 +12,11 @@ PageBase {
|
|||
logic: VpnLogic
|
||||
|
||||
Image {
|
||||
id: bg_top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 0
|
||||
width: parent.width
|
||||
|
||||
// width: 380
|
||||
// height: 325
|
||||
height: parent.height * 0.28
|
||||
source: "qrc:/images/background_connected.png"
|
||||
}
|
||||
|
||||
|
@ -31,38 +31,26 @@ PageBase {
|
|||
}
|
||||
}
|
||||
|
||||
LabelType {
|
||||
id: error_text
|
||||
x: 0
|
||||
y: 280
|
||||
width: 381
|
||||
height: 61
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.Wrap
|
||||
text: VpnLogic.labelErrorText
|
||||
}
|
||||
Text {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 250
|
||||
width: 380
|
||||
height: 31
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 15
|
||||
color: "#181922"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.Wrap
|
||||
text: VpnLogic.labelStateText
|
||||
AnimatedImage {
|
||||
id: connect_anim
|
||||
source: "qrc:/images/animation.gif"
|
||||
anchors.top: bg_top.bottom
|
||||
anchors.topMargin: 10
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
width: Math.min(parent.width, parent.height) / 4
|
||||
height: width
|
||||
|
||||
visible: !VpnLogic.pushButtonConnectVisible
|
||||
paused: VpnLogic.pushButtonConnectVisible
|
||||
//VisibleBehavior on visible { }
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: button_connect
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 200
|
||||
width: 80
|
||||
height: 40
|
||||
anchors.horizontalCenter: connect_anim.horizontalCenter
|
||||
anchors.verticalCenter: connect_anim.verticalCenter
|
||||
width: connect_anim.width
|
||||
height: width
|
||||
checkable: true
|
||||
checked: VpnLogic.pushButtonConnectChecked
|
||||
onCheckedChanged: {
|
||||
|
@ -71,12 +59,96 @@ PageBase {
|
|||
}
|
||||
background: Image {
|
||||
anchors.fill: parent
|
||||
source: button_connect.checked ? "qrc:/images/connect_button_connected.png"
|
||||
: "qrc:/images/connect_button_disconnected.png"
|
||||
source: button_connect.checked ? "qrc:/images/connected.png"
|
||||
: "qrc:/images/disconnected.png"
|
||||
}
|
||||
contentItem: Item {}
|
||||
antialiasing: true
|
||||
enabled: VpnLogic.pushButtonConnectEnabled
|
||||
opacity: VpnLogic.pushButtonConnectVisible ? 1 : 0
|
||||
|
||||
// transitions: Transition {
|
||||
// NumberAnimation { properties: "opacity"; easing.type: Easing.InOutQuad; duration: 500 }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
LabelType {
|
||||
id: lb_state
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: button_connect.bottom
|
||||
width: parent.width
|
||||
height: 21
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: VpnLogic.labelStateText
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: layout1
|
||||
anchors.top: lb_state.bottom
|
||||
//anchors.topMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 21
|
||||
|
||||
|
||||
LabelType {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
height: 21
|
||||
text: qsTr("Server") + ": "
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
height: 21
|
||||
background: Item {}
|
||||
text: VpnLogic.labelCurrentServer
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 16
|
||||
onClicked: {
|
||||
UiLogic.goToPage(PageEnum.ServersList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: layout2
|
||||
anchors.top: layout1.bottom
|
||||
anchors.topMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 21
|
||||
|
||||
|
||||
LabelType {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
height: 21
|
||||
text: qsTr("Service") + ": "
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
height: 21
|
||||
background: Item {}
|
||||
text: VpnLogic.labelCurrentService
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 16
|
||||
onClicked: {
|
||||
UiLogic.onGotoCurrentProtocolsPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LabelType {
|
||||
id: error_text
|
||||
anchors.top: layout2.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width
|
||||
height: 21
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.Wrap
|
||||
text: VpnLogic.labelErrorText
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
|
@ -36,8 +36,7 @@ PageShareProtocolBase {
|
|||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: content.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
|
@ -60,8 +60,7 @@ PageShareProtocolBase {
|
|||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: content.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ PageShareProtocolBase {
|
|||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: content.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ PageShareProtocolBase {
|
|||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: content.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ PageShareProtocolBase {
|
|||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: content.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.top: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue