1616 The Test website (test.cve.org) has a new drop-down menu below.
1717 <span class =" button is-ghost cve-inner-btn" >Read {{ showSearchHelpText ? 'less...' : 'more...' }}</span >
1818 </button >
19- <div v-if =" showSearchHelpText" id =" searchHelpText" class =" cve-help-text" style =" max-width : 860 px " >
19+ <div v-if =" showSearchHelpText" id =" searchHelpText" class =" cve-help-text" style =" max-width : 810 px " >
2020 <ol >
2121 <li >
2222 <span class =" has-text-weight-bold" >Search Capability (Beta) Community testers</span > – To beta-test the new search feature, select
6565 <button @click =" validate" class =" button cve-button cve-button-accent-warm"
6666 :class =" { 'is-loading': cveListSearchStore.isSearching, 'disabled': cveListSearchStore.isSeachButtonDisabled }"
6767 :aria-disabled =" cveListSearchStore.isSeachButtonDisabled" >
68- Search
68+ {{ searchTypeBoolean ? ' Search' : 'Find'}}
6969 </button >
7070 </div >
7171 </div >
@@ -112,10 +112,7 @@ let searchTypeBoolean = computed(() => {
112112});
113113
114114watch (searchType, () => {
115- cveListSearchStore .searchType = (searchType .value === ' Search CVE List (Beta)' ) ? true : false ;
116- cveId = cveRecordStore .cveId = ' ' ;
117- queryString .value = cveListSearchStore .query = ' ' ;
118- errorMessage .value = ' ' ;
115+ resetStates ();
119116});
120117
121118watch (
@@ -131,6 +128,14 @@ watch(
131128 }
132129)
133130
131+ function resetStates () {
132+ cveListSearchStore .searchType = cveGenericGlobalsStore .useSearch = searchTypeBoolean .value ;
133+ cveId = ' ' ;
134+ queryString .value = cveListSearchStore .query = ' ' ;
135+ errorMessage .value = ' ' ;
136+ cveListSearchStore .showHelpText = false ;
137+ cveListSearchStore .isSeachButtonDisabled = true ;
138+ }
134139
135140function startSearch () {
136141 // We only want to flip the search item _When we actually do a search_ otherwise we should default back to what we were on a page refresh
@@ -156,7 +161,6 @@ function startSearch() {
156161 const lookupPath = ` /CVERecord?id=${cveId }` ;
157162 router.push(lookupPath)
158163 }
159-
160164}
161165
162166function validateQueryString() {
0 commit comments