fix key import

This commit is contained in:
Cyril Anisimov 2025-05-10 12:30:43 +02:00
parent cf5ecf1f1a
commit d110c96b5c

View file

@ -110,6 +110,7 @@ PageType {
CheckBoxType {
id: cloakingCheckBox
objectName: "cloakingCheckBox"
visible: ImportController.isNativeWireGuardConfig()
@ -192,7 +193,19 @@ PageType {
text: qsTr("Connect")
clickedFunc: function() {
if (cloakingCheckBox.checked) {
const headerItem = listView.headerItem;
if (!headerItem) {
console.error("Header item not found in ListView")
return
}
const cloakingCheckBoxItem = headerItem.children.find(c => c.objectName === "cloakingCheckBox");
if (!cloakingCheckBoxItem) {
console.error("cloakingCheckBox not found")
return
}
if (cloakingCheckBoxItem.checked) {
ImportController.processNativeWireGuardConfig()
}
ImportController.importConfig()