mirror of
https://github.com/amnezia-vpn/DefaultVPN.git
synced 2026-05-17 08:36:37 +03:00
fix: ui bugs (#36)
* removed unused lines in resources for local build * fix: Amnezia Free subscription text visibility * fix: add value to deactivateDevice to properly delete api server * fix: reboot 'not api' servers instead of removing api * fix: logging switch * update: text * fix: remove 'reset API' for some configs * update: reboot removed
This commit is contained in:
@@ -282,9 +282,6 @@
|
||||
<file>fonts/VelaSans-GX.ttf</file>
|
||||
<file>ui/qml/DefaultVpn/Pages/PageSettingsLanguage.qml</file>
|
||||
<file>ui/qml/DefaultVpn/Components/SettingsButtonNoBorder.qml</file>
|
||||
<file>ui/qml/Components/ApiPremV1MigrationDrawer.qml</file>
|
||||
<file>ui/qml/Components/ApiPremV1SubListDrawer.qml</file>
|
||||
<file>ui/qml/Components/OtpCodeDrawer.qml</file>
|
||||
<file>ui/qml/Components/AwgTextField.qml</file>
|
||||
<file>ui/qml/DefaultVpn/Components/BlackButtonWithBorder.qml</file>
|
||||
<file>ui/qml/Pages2/PageSettingsApiSubscriptionKey.qml</file>
|
||||
|
||||
@@ -28,6 +28,9 @@ Switch {
|
||||
property string hoveredIndicatorBackgroundColor: Style.color.fivePercentBlack
|
||||
property string defaultIndicatorBackgroundColor: Style.color.transparent
|
||||
|
||||
implicitWidth: switcher.width/2 - 6
|
||||
implicitHeight: switcher.height
|
||||
|
||||
contentItem: RowLayout {
|
||||
anchors.left: parent.left
|
||||
|
||||
@@ -41,61 +44,65 @@ Switch {
|
||||
}
|
||||
|
||||
indicator: Rectangle {
|
||||
id: switcher
|
||||
id: background
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
implicitWidth: 52
|
||||
implicitHeight: 32
|
||||
width: switcher.width + 6
|
||||
height: switcher.height + 6
|
||||
radius: switcher.radius
|
||||
|
||||
radius: 16
|
||||
color: root.checked ? (root.enabled ? root.checkedIndicatorColor : root.checkedDisabledIndicatorColor)
|
||||
: root.defaultIndicatorColor
|
||||
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : (root.checked ? (root.enabled ? root.checkedIndicatorBorderColor : root.checkedDisabledIndicatorBorderColor)
|
||||
: root.defaultIndicatorBorderColor)
|
||||
color: root.hovered ? root.hoveredIndicatorBackgroundColor : root.defaultIndicatorBackgroundColor
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
Behavior on border.color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: innerCircle
|
||||
id: switcher
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
x: root.checked ? parent.width - width - 4 : 8
|
||||
width: root.checked ? 24 : 16
|
||||
height: root.checked ? 24 : 16
|
||||
radius: 23
|
||||
color: root.checked ? (root.enabled ? root.checkedInnerCircleColor : root.checkedDisabledInnerCircleColor)
|
||||
: (root.enabled ? root.defaultInnerCircleColor : root.defaultDisabledInnerCircleColor)
|
||||
anchors.centerIn: background
|
||||
|
||||
Behavior on x {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
}
|
||||
implicitWidth: 52
|
||||
implicitHeight: 32
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: innerCircle
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 23
|
||||
color: root.hovered ? root.hoveredIndicatorBackgroundColor : root.defaultIndicatorBackgroundColor
|
||||
radius: 16
|
||||
color: root.checked ? (root.enabled ? root.checkedIndicatorColor : root.checkedDisabledIndicatorColor)
|
||||
: root.defaultIndicatorColor
|
||||
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : (root.checked ? (root.enabled ? root.checkedIndicatorBorderColor : root.checkedDisabledIndicatorBorderColor)
|
||||
: root.defaultIndicatorBorderColor)
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
}
|
||||
}
|
||||
Behavior on border.color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: false
|
||||
Rectangle {
|
||||
id: innerCircle
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
x: root.checked ? parent.width - width - 4 : 8
|
||||
width: root.checked ? 24 : 16
|
||||
height: root.checked ? 24 : 16
|
||||
radius: 23
|
||||
color: root.checked ? (root.enabled ? root.checkedInnerCircleColor : root.checkedDisabledInnerCircleColor)
|
||||
: (root.enabled ? root.defaultInnerCircleColor : root.defaultDisabledInnerCircleColor)
|
||||
|
||||
Behavior on x {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
|
||||
function handleSwitch(event) {
|
||||
|
||||
@@ -91,6 +91,8 @@ Page {
|
||||
}
|
||||
|
||||
XSmallTextType {
|
||||
visible: !ApiAccountInfoModel.data("endDate").isEmpty()
|
||||
|
||||
Layout.topMargin: 24
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -220,7 +222,7 @@ Page {
|
||||
|
||||
onConfirm: function() {
|
||||
PageController.showBusyIndicator(true)
|
||||
if (ApiConfigsController.deactivateDevice()) {
|
||||
if (ApiConfigsController.deactivateDevice(true)) {
|
||||
InstallController.removeProcessedServer()
|
||||
PageController.closePage()
|
||||
}
|
||||
|
||||
@@ -104,12 +104,14 @@ Page {
|
||||
}
|
||||
|
||||
WhiteButtonWithBorder {
|
||||
visible: ServersModel.getProcessedServerData("isServerFromTelegramApi")
|
||||
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
Layout.topMargin: 12
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Reset API Configuration")
|
||||
text: qsTr("Reset API configuration")
|
||||
defaultTextColor: Style.color.error
|
||||
hoveredTextColor: Style.color.error
|
||||
pressedTextColor: Style.color.error
|
||||
|
||||
Reference in New Issue
Block a user