diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-06-23 17:41:23 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-06-23 17:41:53 +1000 |
| commit | 71c8ae8398b347b36ca6b08e3b10493fbcf3f6af (patch) | |
| tree | cf2e2c92bdc04a7e6f58ae267f20747188c22232 /src | |
| parent | 549d932d7b54946a2dc622ce12ff3415acd23880 (diff) | |
Make suggestion-limit client-configurable
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.vue | 1 | ||||
| -rw-r--r-- | src/components/SearchModal.vue | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue index 3309879..0c9a96c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -84,6 +84,7 @@ const defaultUiOpts = { ancestryBarBgColor: '#44403c', ancestryTileMargin: 5, //px (gap between detached-ancestor tiles) infoModalImgSz: 200, + searchSuggLimit: 5, autoWaitTime: 500, //ms (time to wait between actions (with their transitions)) tutorialPaneSz: 200, tutorialPaneBgColor: '#1c1917', diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue index 93f7a59..af6aca5 100644 --- a/src/components/SearchModal.vue +++ b/src/components/SearchModal.vue @@ -92,7 +92,8 @@ 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' : ''); + url.search += this.uiOpts.useReducedTree ? '&tree=reduced' : ''; + url.search += '&limit=' + this.uiOpts.searchSuggLimit; // Query server, delaying/ignoring if a request was recently sent this.pendingSuggReqUrl = url.toString(); let doReq = () => { |
