aboutsummaryrefslogtreecommitdiff
path: root/src/components/SearchModal.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-12 00:10:12 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-12 00:10:12 +1000
commite1ef2bf3387769de4edc4a7ec1a6d38c5a21c5e7 (patch)
treed2a8ee2f6e36cbbc723de774965c9a001b746b0d /src/components/SearchModal.vue
parent4872ce9c22cc3c7024075f66409efdaf8860e9b8 (diff)
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.
Diffstat (limited to 'src/components/SearchModal.vue')
-rw-r--r--src/components/SearchModal.vue2
1 files changed, 2 insertions, 0 deletions
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;