@@ -1292,7 +1409,7 @@ export default {
return {
visible: false,
currentStep: 1,
- totalSteps: 4,
+ totalSteps: 5,
logoUrl,
communityInterfaces: [],
loadingInterfaces: false,
@@ -1302,6 +1419,7 @@ export default {
discoveredActive: [],
loadingDiscovered: false,
savingDiscovery: false,
+ savingPropagation: false,
discoveryInterval: null,
};
},
@@ -1415,6 +1533,21 @@ export default {
this.savingDiscovery = false;
}
},
+ async enableAutoPropagation() {
+ this.savingPropagation = true;
+ try {
+ await window.axios.patch("/api/v1/config", {
+ lxmf_preferred_propagation_node_auto_select: true,
+ });
+ ToastUtils.success("Auto-propagation enabled");
+ this.nextStep();
+ } catch (e) {
+ console.error("Failed to enable auto-propagation:", e);
+ ToastUtils.error("Failed to enable auto-propagation");
+ } finally {
+ this.savingPropagation = false;
+ }
+ },
getDiscoveryIcon(iface) {
switch (iface.type) {
case "AutoInterface":
diff --git a/meshchatx/src/frontend/components/settings/SettingsPage.vue b/meshchatx/src/frontend/components/settings/SettingsPage.vue
index 894d4d5..6857cea 100644
--- a/meshchatx/src/frontend/components/settings/SettingsPage.vue
+++ b/meshchatx/src/frontend/components/settings/SettingsPage.vue
@@ -1335,6 +1335,19 @@
}}
+
{{ $t("app.preferred_propagation_node") }}
@@ -1514,6 +1527,7 @@ export default {
show_suggested_community_interfaces: null,
lxmf_local_propagation_node_enabled: null,
lxmf_preferred_propagation_node_destination_hash: null,
+ lxmf_preferred_propagation_node_auto_select: null,
archives_max_storage_gb: 1,
backup_max_count: 5,
banished_effect_enabled: true,
@@ -1944,6 +1958,15 @@ export default {
);
}, 1000);
},
+ async onLxmfPreferredPropagationNodeAutoSelectChange() {
+ await this.updateConfig(
+ {
+ lxmf_preferred_propagation_node_auto_select:
+ this.config.lxmf_preferred_propagation_node_auto_select,
+ },
+ "auto_select_node"
+ );
+ },
async onLxmfLocalPropagationNodeEnabledChangeWrapper(value) {
this.config.lxmf_local_propagation_node_enabled = value;
await this.onLxmfLocalPropagationNodeEnabledChange();