refact 2
This commit is contained in:
parent
135b96a280
commit
84ca7e8879
11 changed files with 446 additions and 425 deletions
|
@ -48,7 +48,7 @@ Item {
|
|||
y: 90
|
||||
width: 340
|
||||
height: 501
|
||||
model: UiLogic.serverListModel
|
||||
model: ServerListLogic.serverListModel
|
||||
spacing: 5
|
||||
delegate: Item {
|
||||
height: 60
|
||||
|
@ -133,7 +133,7 @@ Item {
|
|||
icon.source: checked ? "qrc:/images/check.png"
|
||||
: "qrc:/images/uncheck.png"
|
||||
onClicked: {
|
||||
UiLogic.onServerListPushbuttonDefaultClicked(index)
|
||||
ServerListLogic.onServerListPushbuttonDefaultClicked(index)
|
||||
}
|
||||
checked: is_default
|
||||
enabled: !is_default
|
||||
|
@ -146,7 +146,7 @@ Item {
|
|||
height: 24
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
onClicked: {
|
||||
UiLogic.onServerListPushbuttonSettingsClicked(index)
|
||||
ServerListLogic.onServerListPushbuttonSettingsClicked(index)
|
||||
}
|
||||
OpacityAnimator {
|
||||
id: mouseEnterAni
|
|
@ -7,7 +7,7 @@ import "../Config"
|
|||
|
||||
Item {
|
||||
id: root
|
||||
enabled: UiLogic.pageServerSettingsEnabled
|
||||
enabled: ServerSettingsLogic.pageServerSettingsEnabled
|
||||
|
||||
ImageButtonType {
|
||||
id: back
|
||||
|
@ -47,7 +47,7 @@ Item {
|
|||
height: 31
|
||||
font.pixelSize: 20
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: UiLogic.labelServerSettingsCurrentVpnProtocolText
|
||||
text: ServerSettingsLogic.labelServerSettingsCurrentVpnProtocolText
|
||||
}
|
||||
LabelType {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
@ -56,25 +56,25 @@ Item {
|
|||
height: 31
|
||||
font.pixelSize: 20
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: UiLogic.labelServerSettingsServerText
|
||||
text: ServerSettingsLogic.labelServerSettingsServerText
|
||||
}
|
||||
LabelType {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 530
|
||||
width: 301
|
||||
height: 41
|
||||
text: UiLogic.labelServerSettingsWaitInfoText
|
||||
visible: UiLogic.labelServerSettingsWaitInfoVisible
|
||||
text: ServerSettingsLogic.labelServerSettingsWaitInfoText
|
||||
visible: ServerSettingsLogic.labelServerSettingsWaitInfoVisible
|
||||
}
|
||||
TextFieldType {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 80
|
||||
width: 251
|
||||
height: 31
|
||||
text: UiLogic.lineEditServerSettingsDescriptionText
|
||||
text: UiLoServerSettingsLogicgic.lineEditServerSettingsDescriptionText
|
||||
onEditingFinished: {
|
||||
UiLogic.lineEditServerSettingsDescriptionText = text
|
||||
UiLogic.onLineEditServerSettingsDescriptionEditingFinished()
|
||||
ServerSettingsLogic.lineEditServerSettingsDescriptionText = text
|
||||
ServerSettingsLogic.onLineEditServerSettingsDescriptionEditingFinished()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
@ -82,10 +82,10 @@ Item {
|
|||
y: 410
|
||||
width: 300
|
||||
height: 40
|
||||
text: UiLogic.pushButtonServerSettingsClearText
|
||||
visible: UiLogic.pushButtonServerSettingsClearVisible
|
||||
text: ServerSettingsLogic.pushButtonServerSettingsClearText
|
||||
visible: ServerSettingsLogic.pushButtonServerSettingsClearVisible
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonClearServer()
|
||||
ServerSettingsLogic.onPushButtonServerSettingsClearServer()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
@ -93,10 +93,10 @@ Item {
|
|||
y: 350
|
||||
width: 300
|
||||
height: 40
|
||||
text: UiLogic.pushButtonServerSettingsClearClientCacheText
|
||||
visible: UiLogic.pushButtonServerSettingsClearClientCacheVisible
|
||||
text: ServerSettingsLogic.pushButtonServerSettingsClearClientCacheText
|
||||
visible: ServerSettingsLogic.pushButtonServerSettingsClearClientCacheVisible
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonServerSettingsClearClientCacheClicked()
|
||||
ServerSettingsLogic.onPushButtonServerSettingsClearClientCacheClicked()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
@ -106,7 +106,7 @@ Item {
|
|||
height: 40
|
||||
text: qsTr("Forget this server")
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonForgetServer()
|
||||
ServerSettingsLogic.onPushButtonServerSettingsForgetServer()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
@ -116,7 +116,7 @@ Item {
|
|||
height: 40
|
||||
text: qsTr("VPN protocols")
|
||||
onClicked: {
|
||||
UiLogic.goToPage(PageEnum.ServerVpnProtocols)
|
||||
ServerSettingsLogic.goToPage(PageEnum.ServerVpnProtocols)
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
@ -125,9 +125,9 @@ Item {
|
|||
width: 300
|
||||
height: 40
|
||||
text: qsTr("Share Server (FULL ACCESS)")
|
||||
visible: UiLogic.pushButtonServerSettingsShareFullVisible
|
||||
visible: ServerSettingsLogic.pushButtonServerSettingsShareFullVisible
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonServerSettingsShareFullClicked()
|
||||
ServerSettingsLogic.onPushButtonServerSettingsShareFullClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ Window {
|
|||
if (item instanceof PageServerProtocols) {
|
||||
return PageEnum.ServerVpnProtocols
|
||||
}
|
||||
if (item instanceof PageServer) {
|
||||
if (item instanceof PageServerList) {
|
||||
return PageEnum.ServersList
|
||||
}
|
||||
if (item instanceof PageShareConnection) {
|
||||
|
@ -143,7 +143,7 @@ Window {
|
|||
console.debug(pageComponent)
|
||||
if (reset) {
|
||||
if (page === PageEnum.ServerSettings) {
|
||||
UiLogic.updateServerPage();
|
||||
ServerSettingsLogic.updateServerSettingsPage();
|
||||
}
|
||||
if (page === PageEnum.ShareConnection) {}
|
||||
if (page === PageEnum.Wizard) {
|
||||
|
@ -159,7 +159,7 @@ Window {
|
|||
GeneralSettingsLogic.updateGeneralSettingPage();
|
||||
}
|
||||
if (page === PageEnum.ServersList) {
|
||||
UiLogic.updateServersListPage();
|
||||
ServerListLogic.updateServersListPage();
|
||||
}
|
||||
if (page === PageEnum.Start) {
|
||||
UiLogic.pushButtonBackFromStartVisible = !pageLoader.empty
|
||||
|
@ -303,7 +303,7 @@ Window {
|
|||
}
|
||||
Component {
|
||||
id: page_servers
|
||||
PageServer {}
|
||||
PageServerList {}
|
||||
}
|
||||
Component {
|
||||
id: page_app_settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue