Skip to content

Commit

Permalink
refactory the forceCloseDrawer
Browse files Browse the repository at this point in the history
  • Loading branch information
ronoaer committed Sep 15, 2023
1 parent 10d869f commit 2fb85bc
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 141 deletions.
3 changes: 2 additions & 1 deletion client/ui/qml/Components/QuestionDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ DrawerType {

width: parent.width
height: parent.height * 0.5
needCloseButton: false
needCloseButton: true


ColumnLayout {
anchors.top: parent.top
Expand Down
8 changes: 8 additions & 0 deletions client/ui/qml/Controls2/DrawerType.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import QtQuick.Controls
Drawer {
property bool needCloseButton: true

Connections {
target: PageController

function onForceCloseDrawer() {
visible = false
}
}

edge: Qt.BottomEdge

clip: true
Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Controls2/DropDownType.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ Item {
implicitWidth: rootButtonContent.implicitWidth
implicitHeight: rootButtonContent.implicitHeight

Connections {
target: PageController

function onForceCloseDrawer() {
menu.visible = false
}
}

onMenuVisibleChanged: {
if (menuVisible) {
rootButtonBackground.border.color = rootButtonPressedBorderColor
Expand Down
9 changes: 0 additions & 9 deletions client/ui/qml/Pages2/PageHome.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
menu.visible = false
connectionTypeSelection.visible = false
}
}

Rectangle {
id: buttonBackground
anchors.fill: buttonContent
Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageProtocolOpenVpnSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
//questionDrawer.visible = false;
}
}

ColumnLayout {
id: backButton

Expand Down
16 changes: 0 additions & 16 deletions client/ui/qml/Pages2/PageProtocolRaw.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
// questionDrawer.visible = false;
}
}

FlickableType {
id: fl
anchors.top: header.bottom
Expand Down Expand Up @@ -98,14 +90,6 @@ PageType {

DividerType {}

Connections {
target: PageController

function onForceCloseDrawer() {
configContentDrawer.close()
}
}

DrawerType {
id: configContentDrawer

Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageServiceSftpSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
// questionDrawer.visible = false;
}
}

ColumnLayout {
id: backButton

Expand Down
9 changes: 0 additions & 9 deletions client/ui/qml/Pages2/PageSettingsApplication.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ import "../Components"
PageType {
id: root

Connections {
target: PageController

function onForceCloseDrawer() {
selectLanguageDrawer.close()
//questionDrawer.visible = false
}
}

BackButtonType {
id: backButton

Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageSettingsLogging.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ import "../Controls2/TextTypes"
PageType {
id: root

Connections {
target: PageController

function onForceCloseDrawer() {
// questionDrawer.visible = false;
}
}

BackButtonType {
id: backButton

Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageSettingsServerData.qml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
// questionDrawer.visible = false;
}
}

FlickableType {
id: fl
anchors.top: parent.top
Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageSettingsServerInfo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
serverNameEditDrawer.visible = false
}
}

DrawerType {
id: serverNameEditDrawer

Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageSettingsServerProtocol.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
// questionDrawer.visible = false;
}
}

FlickableType {
id: fl
anchors.top: header.bottom
Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageSettingsServersList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
connectionTypeSelection.visible = false
}
}

ConnectionTypeSelectionDrawer {
id: connectionTypeSelection
}
Expand Down
9 changes: 0 additions & 9 deletions client/ui/qml/Pages2/PageSettingsSplitTunneling.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
moreActionsDrawer.close()
importSitesDrawer.close()
}
}

QtObject {
id: routeMode
property int allSites: 0
Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageSetupWizardProtocolSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ import "../Components"
PageType {
id: root

Connections {
target: PageController

function onForceCloseDrawer() {
showDetailsDrawer.close()
}
}

SortFilterProxyModel {
id: proxyContainersModel
sourceModel: ContainersModel
Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/Pages2/PageSetupWizardStart.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
connectionTypeSelection.visible = false
}
}

FlickableType {
id: fl
anchors.top: parent.top
Expand Down
9 changes: 0 additions & 9 deletions client/ui/qml/Pages2/PageShare.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,6 @@ PageType {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
protocolSelector.visible = false
shareConnectionDrawer.close()
}
}

property string fullConfigServerSelectorText
property string connectionServerSelectorText
property bool showContent: false
Expand Down
8 changes: 0 additions & 8 deletions client/ui/qml/main2.qml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ Window {
}
}

Connections {
target: PageController

function onForceCloseDrawer() {
privateKeyPassphraseDrawer.close()
}
}

Item {
anchors.right: parent.right
anchors.left: parent.left
Expand Down

0 comments on commit 2fb85bc

Please sign in to comment.