diff --git a/meshchatx/src/frontend/components/TutorialModal.vue b/meshchatx/src/frontend/components/TutorialModal.vue index 89ecdd1..b4f9b8f 100644 --- a/meshchatx/src/frontend/components/TutorialModal.vue +++ b/meshchatx/src/frontend/components/TutorialModal.vue @@ -403,8 +403,66 @@ - +
+
+

+ {{ $t("tutorial.propagation") }} +

+

+ {{ $t("tutorial.propagation_desc") }} +

+
+ +
+
+ +
+ {{ $t("tutorial.propagation_question") }} +
+

+ {{ $t("tutorial.propagation_auto") }} +

+
+ + +
+
+
+ {{ $t("tutorial.propagation_manual") }} +
+

+ {{ $t("tutorial.propagation_manual_desc") }} +

+
+
+
+
+ + +

{{ $t("tutorial.learn_create") }} @@ -530,10 +588,10 @@

- +
@@ -641,7 +699,7 @@
@@ -773,7 +831,7 @@
-
+

{{ $t("tutorial.connect") }} @@ -1068,8 +1126,67 @@

- -
+ + +
+
+

+ {{ $t("tutorial.propagation") }} +

+

+ {{ $t("tutorial.propagation_desc") }} +

+
+ +
+
+ +
+ {{ $t("tutorial.propagation_question") }} +
+

+ {{ $t("tutorial.propagation_auto") }} +

+
+ + +
+
+
+ {{ $t("tutorial.propagation_manual") }} +
+

+ {{ $t("tutorial.propagation_manual_desc") }} +

+
+
+
+
+ + +

{{ $t("tutorial.learn_create") }} @@ -1195,10 +1312,10 @@

- +
@@ -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();