@@ -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 ) => {
@@ -3879,17 +3877,19 @@ ${item.displayPath}<span class="${type}">${name}</span>\
3879
3877
}
3880
3878
3881
3879
3882
- console . log ( rawSearchIndex ) ;
3883
- let crates = "" ;
3880
+ let crates = "Searching in " ;
3884
3881
if ( rawSearchIndex . size > 1 ) {
3885
- crates = "<div id=\"crate-search-div\"> <select id=\"crate-search\">" +
3882
+ crates + = "<select id=\"crate-search\">" +
3886
3883
"<option value=\"all crates\" selected>all crates</option>" ;
3887
3884
for ( const c of rawSearchIndex . keys ( ) ) {
3885
+ console . log ( c ) ;
3888
3886
crates += `<option value="${ c } ">${ c } </option>` ;
3889
3887
}
3890
- crates += "</select></div>" ;
3888
+ crates += "</select>" ;
3889
+ } else {
3890
+ crates += rawSearchIndex . keys ( ) . next ( ) . value ;
3891
3891
}
3892
- document . getElementById ( "search-focus-panel " ) . innerHTML = crates ;
3892
+ document . getElementById ( "crate- search-div " ) . innerHTML = crates ;
3893
3893
}
3894
3894
3895
3895
if ( typeof window !== "undefined" ) {
0 commit comments