mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6572b83a97 | |||
| 7aa4b54196 |
@@ -227,5 +227,6 @@
|
|||||||
<file>ui/qml/Components/HomeSplitTunnelingDrawer.qml</file>
|
<file>ui/qml/Components/HomeSplitTunnelingDrawer.qml</file>
|
||||||
<file>images/controls/split-tunneling.svg</file>
|
<file>images/controls/split-tunneling.svg</file>
|
||||||
<file>ui/qml/Controls2/DrawerType2.qml</file>
|
<file>ui/qml/Controls2/DrawerType2.qml</file>
|
||||||
|
<file>ui/qml/Components/FadeBehavior.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void ConnectionController::onConnectionStateChanged(Vpn::ConnectionState state)
|
|||||||
m_state = state;
|
m_state = state;
|
||||||
|
|
||||||
m_isConnected = false;
|
m_isConnected = false;
|
||||||
m_connectionStateText = tr("Connection...");
|
m_connectionStateText = tr("Connecting...");
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case Vpn::ConnectionState::Connected: {
|
case Vpn::ConnectionState::Connected: {
|
||||||
m_isConnectionInProgress = false;
|
m_isConnectionInProgress = false;
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQml 2.15
|
||||||
|
|
||||||
|
Behavior {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property QtObject fadeTarget: targetProperty.object
|
||||||
|
property string fadeProperty: "opacity"
|
||||||
|
property int fadeDuration: 200
|
||||||
|
property int fadeValue: 0
|
||||||
|
property string easingType: "Quad"
|
||||||
|
|
||||||
|
property alias exitAnimation: exitAnimation
|
||||||
|
property alias enterAnimation: enterAnimation
|
||||||
|
|
||||||
|
SequentialAnimation {
|
||||||
|
NumberAnimation {
|
||||||
|
id: exitAnimation
|
||||||
|
target: root.fadeTarget
|
||||||
|
property: root.fadeProperty
|
||||||
|
duration: root.fadeDuration
|
||||||
|
to: root.fadeValue
|
||||||
|
easing.type: root.easingType === "Linear" ? Easing.Linear : Easing["In"+root.easingType]
|
||||||
|
}
|
||||||
|
PropertyAction { }
|
||||||
|
NumberAnimation {
|
||||||
|
id: enterAnimation
|
||||||
|
target: root.fadeTarget
|
||||||
|
property: root.fadeProperty
|
||||||
|
duration: root.fadeDuration
|
||||||
|
to: target[property]
|
||||||
|
easing.type: root.easingType === "Linear" ? Easing.Linear : Easing["Out"+root.easingType]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -159,6 +159,20 @@ PageType {
|
|||||||
Layout.bottomMargin: 44
|
Layout.bottomMargin: 44
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
text: ServersModel.defaultServerDescriptionCollapsed
|
text: ServersModel.defaultServerDescriptionCollapsed
|
||||||
|
|
||||||
|
FadeBehavior on text { }
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: drawer
|
||||||
|
|
||||||
|
function onOpen() {
|
||||||
|
collapsedServerMenuDescription.text = ServersModel.defaultServerDescriptionExpanded
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClose() {
|
||||||
|
collapsedServerMenuDescription.text = ServersModel.defaultServerDescriptionCollapsed
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -197,7 +211,21 @@ PageType {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
text: ServersModel.defaultServerDescriptionExpanded
|
text: ServersModel.defaultServerDescriptionCollapsed
|
||||||
|
|
||||||
|
FadeBehavior on text { }
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: drawer
|
||||||
|
|
||||||
|
function onOpen() {
|
||||||
|
expandedServersMenuDescription.text = ServersModel.defaultServerDescriptionExpanded
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClose() {
|
||||||
|
expandedServersMenuDescription.text = ServersModel.defaultServerDescriptionCollapsed
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|||||||
Reference in New Issue
Block a user