From e1ef2bf3387769de4edc4a7ec1a6d38c5a21c5e7 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 12 May 2022 00:10:12 +1000
Subject: Add reduced-tree data generation+serving+querying+setting

Add genReducedTreeData.py, which generates a reduced_nodes table.
Adjust server to serve that data for queries with a tree=reduced query param.
Adjust client to query for that data depending on a useReducedTree variable.
Add a SettingsPane setting to change that useReducedTree variable.
---
 src/components/SearchModal.vue | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/components/SearchModal.vue')

diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue
index dbe47af..eccc685 100644
--- a/src/components/SearchModal.vue
+++ b/src/components/SearchModal.vue
@@ -41,6 +41,7 @@ export default defineComponent({
 			let url = new URL(window.location.href);
 			url.pathname = '/data/chain';
 			url.search = '?name=' + encodeURIComponent(tolNodeName);
+			url.search += (this.uiOpts.useReducedTree ? '&tree=reduced' : '');
 			fetch(url.toString())
 				.then(response => response.json())
 				.then(obj => {
@@ -80,6 +81,7 @@ export default defineComponent({
 			let url = new URL(window.location.href);
 			url.pathname = '/data/search';
 			url.search = '?name=' + encodeURIComponent(input.value);
+			url.search += (this.uiOpts.useReducedTree ? '&tree=reduced' : '');
 			this.lastSuggReqId += 1;
 			let suggsId = this.lastSuggReqId;
 			let reqDelay = 0;
-- 
cgit v1.2.3

