File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,15 @@ button.read-more {
1111 padding : 0 ;
1212}
1313
14+ .no-results {
15+ line-height : 2 ;
16+ text-align : center;
17+ }
18+
19+ .no-results .large-icon {
20+ font-size : 5em ;
21+ }
22+
1423.package-item {
1524 padding : 10px 0 ; /* Adjusted padding for vertical spacing */
1625 display : flex;
Original file line number Diff line number Diff line change @@ -163,7 +163,15 @@ function renderPackageList(result, searchTerm = '') {
163163 }
164164
165165 if ( packages . length === 0 ) {
166- packageList . innerHTML = '<div class="no-results">No packages found. Try a different search term.</div>' ;
166+ packageList . innerHTML = `
167+ <div class="no-results">
168+ <p class="large-icon">🤷</p>
169+ <p>No packages found. Try a different search term.</p>
170+ <p>
171+ Your favorite package is not listed? Consider adding it
172+ <a onclick="openBrowserWindow('https://github.com/arduino/package-index-py/edit/main/package-list.yaml')">here</a>.
173+ </p>
174+ </div>` ;
167175 return ;
168176 }
169177
@@ -209,7 +217,7 @@ function renderPackageList(result, searchTerm = '') {
209217
210218 moreInfoButton . addEventListener ( 'click' , ( ) => {
211219 const targetURL = pkg . docs || pkg . url ;
212- openPackageInfo ( targetURL ) ;
220+ openBrowserWindow ( targetURL ) ;
213221 } ) ;
214222 } ) ;
215223}
@@ -256,7 +264,7 @@ async function installPackage(package) {
256264 hideOverlay ( ) ;
257265}
258266
259- function openPackageInfo ( url ) {
267+ function openBrowserWindow ( url ) {
260268 if ( url ) {
261269 window . open ( url , '_blank' ) ; // Opens the URL in a new browser tab
262270 } else {
You can’t perform that action at this time.
0 commit comments