ui fixes
This commit is contained in:
parent
2db1bbae4b
commit
ac07d62344
4 changed files with 16 additions and 3 deletions
|
@ -51,6 +51,14 @@ void VpnLogic::onUpdatePage()
|
|||
DockerContainer selectedContainer = m_settings.defaultContainer(m_settings.defaultServerIndex());
|
||||
QString selectedContainerName = ContainerProps::containerHumanNames().value(selectedContainer);
|
||||
set_labelCurrentService(selectedContainerName);
|
||||
|
||||
set_isContainerWorkingOnPlatform(ContainerProps::isWorkingOnPlatform(selectedContainer));
|
||||
if (!isContainerWorkingOnPlatform()) {
|
||||
set_labelErrorText(tr("AmneziaVPN not supporting selected protocol on this device. Select another protocol."));
|
||||
}
|
||||
else {
|
||||
set_labelErrorText("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ class VpnLogic : public PageLogicBase
|
|||
AUTO_PROPERTY(bool, pushButtonConnectEnabled)
|
||||
AUTO_PROPERTY(bool, pushButtonConnectVisible)
|
||||
AUTO_PROPERTY(bool, widgetVpnModeEnabled)
|
||||
AUTO_PROPERTY(bool, isContainerWorkingOnPlatform)
|
||||
|
||||
AUTO_PROPERTY(QString, labelErrorText)
|
||||
|
||||
AUTO_PROPERTY(bool, radioButtonVpnModeAllSitesChecked)
|
||||
|
|
|
@ -61,7 +61,7 @@ PageBase {
|
|||
}
|
||||
contentItem: Item {}
|
||||
antialiasing: true
|
||||
enabled: VpnLogic.pushButtonConnectEnabled
|
||||
enabled: VpnLogic.pushButtonConnectEnabled && VpnLogic.isContainerWorkingOnPlatform
|
||||
opacity: VpnLogic.pushButtonConnectVisible ? 1 : 0
|
||||
|
||||
// transitions: Transition {
|
||||
|
@ -141,11 +141,14 @@ PageBase {
|
|||
id: error_text
|
||||
anchors.top: layout2.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width
|
||||
anchors.topMargin: 20
|
||||
width: parent.width - 20
|
||||
|
||||
height: 21
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.Wrap
|
||||
text: VpnLogic.labelErrorText
|
||||
color: "red"
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
|
@ -36,7 +36,7 @@ PageShareProtocolBase {
|
|||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue