chore: minor bugfixes (#1915)

This commit is contained in:
vkamn
2025-10-07 23:15:06 +08:00
committed by GitHub
parent 1fac280497
commit 4d25e3b6f6
7 changed files with 62 additions and 15 deletions
@@ -34,6 +34,9 @@ SettingsController::SettingsController(const QSharedPointer<ServersModel> &serve
#ifdef Q_OS_ANDROID
connect(AndroidController::instance(), &AndroidController::notificationStateChanged, this, &SettingsController::onNotificationStateChanged);
#endif
m_isDevModeEnabled = m_settings->isDevGatewayEnv();
toggleDevGatewayEnv(m_isDevModeEnabled);
}
QString getPlatformName()
+28
View File
@@ -109,6 +109,34 @@ PageType {
}
}
BasicButtonType {
id: devGatewayButton
objectName: "devGatewayButton"
property bool isDevGatewayEnabled: SettingsController.isDevGatewayEnv
Layout.alignment: Qt.AlignHCenter
implicitHeight: 36
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.translucentWhite
pressedColor: AmneziaStyle.color.sheerWhite
disabledColor: AmneziaStyle.color.mutedGray
textColor: AmneziaStyle.color.mutedGray
borderWidth: 0
visible: SettingsController.isDevModeEnabled && isDevGatewayEnabled
text: qsTr("Dev gateway enabled")
Keys.onEnterPressed: this.clicked()
Keys.onReturnPressed: this.clicked()
onClicked: {
PageController.goToPage(PageEnum.PageDevMenu)
}
}
ConnectButton {
id: connectButton
objectName: "connectButton"