mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
@@ -139,6 +139,7 @@ PageType {
|
|||||||
|
|
||||||
text: qsTr("Reset settings and remove all data from the application")
|
text: qsTr("Reset settings and remove all data from the application")
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
textColor: "#EB5757"
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var headerText = qsTr("Reset settings and remove all data from the application?")
|
var headerText = qsTr("Reset settings and remove all data from the application?")
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ PageType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onClosePage() {
|
function onClosePage() {
|
||||||
|
tabBar.isServerInfoShow = tabBarStackView.currentItem.objectName !== PageController.getPagePath(PageEnum.PageSettingsServerInfo)
|
||||||
|
|
||||||
if (tabBarStackView.depth <= 1) {
|
if (tabBarStackView.depth <= 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -56,6 +58,8 @@ PageType {
|
|||||||
} else {
|
} else {
|
||||||
tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tabBar.isServerInfoShow = page === PageEnum.PageSettingsServerInfo || tabBar.isServerInfoShow
|
||||||
}
|
}
|
||||||
|
|
||||||
function onGoToStartPage() {
|
function onGoToStartPage() {
|
||||||
@@ -134,6 +138,7 @@ PageType {
|
|||||||
var pagePath = PageController.getPagePath(page)
|
var pagePath = PageController.getPagePath(page)
|
||||||
tabBarStackView.clear(StackView.Immediate)
|
tabBarStackView.clear(StackView.Immediate)
|
||||||
tabBarStackView.replace(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
tabBarStackView.replace(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
||||||
|
tabBar.isServerInfoShow = false
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
@@ -147,6 +152,7 @@ PageType {
|
|||||||
id: tabBar
|
id: tabBar
|
||||||
|
|
||||||
property int previousIndex: 0
|
property int previousIndex: 0
|
||||||
|
property bool isServerInfoShow: false
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -177,7 +183,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TabImageButtonType {
|
TabImageButtonType {
|
||||||
isSelected: tabBar.currentIndex === 0
|
isSelected: tabBar.isServerInfoShow ? false : tabBar.currentIndex === 0
|
||||||
image: "qrc:/images/controls/home.svg"
|
image: "qrc:/images/controls/home.svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
tabBarStackView.goToTabBarPage(PageEnum.PageHome)
|
tabBarStackView.goToTabBarPage(PageEnum.PageHome)
|
||||||
@@ -211,7 +217,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TabImageButtonType {
|
TabImageButtonType {
|
||||||
isSelected: tabBar.currentIndex === 2
|
isSelected: tabBar.isServerInfoShow ? true : tabBar.currentIndex === 2
|
||||||
image: "qrc:/images/controls/settings-2.svg"
|
image: "qrc:/images/controls/settings-2.svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
tabBarStackView.goToTabBarPage(PageEnum.PageSettings)
|
tabBarStackView.goToTabBarPage(PageEnum.PageSettings)
|
||||||
|
|||||||
Reference in New Issue
Block a user