fixed mtproxy update secret

This commit is contained in:
dranik
2026-06-17 12:11:56 +03:00
parent db57aa29a9
commit 5b88b18e9d
2 changed files with 4 additions and 14 deletions
@@ -16,7 +16,6 @@ import "../Controls2/TextTypes"
import "../Config" import "../Config"
import "../Components" import "../Components"
PageType { PageType {
id: root id: root
@@ -884,10 +883,9 @@ PageType {
} }
function mtProxyRemoveAdditionalSecret(idx) { function mtProxyRemoveAdditionalSecret(idx) {
// Symmetric with "Add additional secret": only mutate the model here; the change
// is pushed to the server on Save (no immediate server update on add/remove).
MtProxyConfigModel.removeAdditionalSecret(idx) MtProxyConfigModel.removeAdditionalSecret(idx)
if (root.containerStatus === 1) {
root.mtProxyScheduleUpdate(false)
}
} }
SwitcherType { SwitcherType {
@@ -1118,7 +1116,7 @@ PageType {
Layout.leftMargin: 16 Layout.leftMargin: 16
Layout.rightMargin: 16 Layout.rightMargin: 16
Layout.bottomMargin: 16 Layout.bottomMargin: 16
headerText: qsTr("MTProxy bot tag (optional)") headerText: qsTr("Promoted channel tag (optional)")
textField.placeholderText: qsTr("32 hex chars from @MTProxyBot (e.g. 3b7b2fa9…)") textField.placeholderText: qsTr("32 hex chars from @MTProxyBot (e.g. 3b7b2fa9…)")
textField.text: tag textField.text: tag
textField.maximumLength: MtProxyConfigModel.mtProxyBotTagHexLength() textField.maximumLength: MtProxyConfigModel.mtProxyBotTagHexLength()
@@ -304,9 +304,6 @@ PageType {
root.savedPublicHost = TelemtConfigModel.getPublicHost() root.savedPublicHost = TelemtConfigModel.getPublicHost()
root.telemtRefreshPersistedAdditionalSecrets() root.telemtRefreshPersistedAdditionalSecrets()
PageController.showNotificationMessage(message) PageController.showNotificationMessage(message)
if (closePage) {
PageController.closePage()
}
} }
function onInstallationErrorOccurred() { function onInstallationErrorOccurred() {
@@ -1084,11 +1081,6 @@ PageType {
} }
textField.onEditingFinished: { textField.onEditingFinished: {
textField.text = TelemtConfigModel.sanitizePortFieldText(textField.text) textField.text = TelemtConfigModel.sanitizePortFieldText(textField.text)
var portValue = textField.text === "" ? TelemtConfigModel.defaultPort() : textField.text
if (portValue !== port) {
port = portValue
TelemtConfigModel.setPort(port)
}
} }
} }
@@ -1208,7 +1200,7 @@ PageType {
Layout.bottomMargin: 16 Layout.bottomMargin: 16
drawerParent: root drawerParent: root
drawerHeight: 0.35 drawerHeight: 0.4
headerText: qsTr("Transport mode") headerText: qsTr("Transport mode")
text: transportMode === "faketls" ? qsTr("FakeTLS") : qsTr("Standard MTProto") text: transportMode === "faketls" ? qsTr("FakeTLS") : qsTr("Standard MTProto")