mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
New start page and AmneziaFree support (#865)
New start page and AmneziaFree support
This commit is contained in:
+10
-30
@@ -10,6 +10,7 @@ import Style 1.0
|
||||
import "Config"
|
||||
import "Controls2"
|
||||
import "Components"
|
||||
import "Pages2"
|
||||
|
||||
Window {
|
||||
id: root
|
||||
@@ -22,7 +23,7 @@ Window {
|
||||
maximumWidth: 600
|
||||
maximumHeight: 800
|
||||
|
||||
color: AmneziaStyle.color.black
|
||||
color: AmneziaStyle.color.midnightBlack
|
||||
|
||||
onClosing: function() {
|
||||
console.debug("QML onClosing signal")
|
||||
@@ -31,34 +32,9 @@ Window {
|
||||
|
||||
title: "AmneziaVPN"
|
||||
|
||||
StackViewType {
|
||||
id: rootStackView
|
||||
|
||||
width: root.width
|
||||
height: root.height
|
||||
focus: true
|
||||
|
||||
Component.onCompleted: {
|
||||
var pagePath = PageController.getInitialPage()
|
||||
rootStackView.push(pagePath, { "objectName" : pagePath })
|
||||
}
|
||||
|
||||
Keys.onPressed: function(event) {
|
||||
PageController.keyPressEvent(event.key)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: PageController
|
||||
|
||||
function onReplaceStartPage() {
|
||||
var pagePath = PageController.getInitialPage()
|
||||
rootStackView.clear()
|
||||
PageController.updateNavigationBarColor(PageController.getInitialPageNavigationBarColor())
|
||||
rootStackView.replace(pagePath, { "objectName" : pagePath })
|
||||
}
|
||||
|
||||
function onRaiseMainWindow() {
|
||||
root.show()
|
||||
root.raise()
|
||||
@@ -103,6 +79,10 @@ Window {
|
||||
}
|
||||
}
|
||||
|
||||
PageStart {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
@@ -196,10 +176,10 @@ Window {
|
||||
Layout.fillWidth: true
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
hoveredColor: AmneziaStyle.color.translucentWhite
|
||||
pressedColor: AmneziaStyle.color.sheerWhite
|
||||
disabledColor: AmneziaStyle.color.mutedGray
|
||||
textColor: AmneziaStyle.color.paleGray
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Save")
|
||||
|
||||
Reference in New Issue
Block a user