@@ -2760,7 +2760,7 @@ ${item.displayPath}<span class="${type}">${name}</span>\
2760
2760
* @param {boolean } go_to_first
2761
2761
* @param {string } filterCrates
2762
2762
*/
2763
- async function showResults ( results , go_to_first , filterCrates ) {
2763
+ async function showResults ( results , go_to_first , _filterCrates ) {
2764
2764
const search = searchState . outputElement ( ) ;
2765
2765
if ( go_to_first || ( results . others . length === 1
2766
2766
&& getSettingValue ( "go-to-only-result" ) === "true" )
@@ -2815,9 +2815,7 @@ ${item.displayPath}<span class="${type}">${name}</span>\
2815
2815
}
2816
2816
}
2817
2817
2818
- let crates = "" ;
2819
-
2820
- let output = `<h1 class="search-results-title">Results${ crates } </h1>` ;
2818
+ let output = `<h1 class="search-results-title">Results</h1>` ;
2821
2819
if ( results . query . error !== null ) {
2822
2820
const error = results . query . error ;
2823
2821
error . forEach ( ( value , index ) => {
@@ -3880,16 +3878,19 @@ ${item.displayPath}<span class="${type}">${name}</span>\
3880
3878
3881
3879
3882
3880
console . log ( rawSearchIndex ) ;
3883
- let crates = "" ;
3881
+ let crates = "Searching in " ;
3884
3882
if ( rawSearchIndex . size > 1 ) {
3885
- crates = "<div id=\"crate-search-div\"> <select id=\"crate-search\">" +
3883
+ crates + = "<select id=\"crate-search\">" +
3886
3884
"<option value=\"all crates\" selected>all crates</option>" ;
3887
3885
for ( const c of rawSearchIndex . keys ( ) ) {
3886
+ console . log ( c ) ;
3888
3887
crates += `<option value="${ c } ">${ c } </option>` ;
3889
3888
}
3890
- crates += "</select></div>" ;
3889
+ crates += "</select>" ;
3890
+ } else {
3891
+ crates += rawSearchIndex . keys ( ) . next ( ) . value ;
3891
3892
}
3892
- document . getElementById ( "search-focus-panel " ) . innerHTML = crates ;
3893
+ document . getElementById ( "crate- search-div " ) . innerHTML = crates ;
3893
3894
}
3894
3895
3895
3896
if ( typeof window !== "undefined" ) {
0 commit comments