You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Muscle memory has me cmd+T-ing then immediately typing a url or search term, since browsers default to focusing the url bar. When setting an actual Homepage though, focus is on the page and not the URL bar anymore.
What do you think about mixing best of both worlds: Flame local-search primarily does just that, searches your apps and bookmarks, but when there are zero matches, it can use a default search engine?
I've never written TypeScript or React, but I've mocked something up that works on my fork.
It would need to be made configurable, and probably require some changes to the Settings page.
It's ugly, but it's working pretty good for me so far.
diff --git a/client/src/components/SearchBar/SearchBar.tsx b/client/src/components/SearchBar/SearchBar.tsx
index 7a91525..e150bc3 100644
--- a/client/src/components/SearchBar/SearchBar.tsx+++ b/client/src/components/SearchBar/SearchBar.tsx@@ -91,8 +91,11 @@ const SearchBar = (props: ComponentProps): JSX.Element => {
// Local query -> redirect if at least 1 result found
if (appSearchResult?.length) {
redirectUrl(appSearchResult[0].url, sameTab);
- } else if (bookmarkSearchResult?.length) {+ } else if (bookmarkSearchResult?.[0]?.bookmarks?.length) {
redirectUrl(bookmarkSearchResult[0].bookmarks[0].url, sameTab);
+ } else {+ const url = `https://google.com/search?q=${search}`;+ redirectUrl(url, sameTab);
}
} else {
// Valid query -> redirect to search results
The text was updated successfully, but these errors were encountered:
Muscle memory has me cmd+T-ing then immediately typing a url or search term, since browsers default to focusing the url bar. When setting an actual Homepage though, focus is on the page and not the URL bar anymore.
What do you think about mixing best of both worlds: Flame local-search primarily does just that, searches your apps and bookmarks, but when there are zero matches, it can use a default search engine?
I've never written TypeScript or React, but I've mocked something up that works on my fork.
It would need to be made configurable, and probably require some changes to the Settings page.
It's ugly, but it's working pretty good for me so far.
The text was updated successfully, but these errors were encountered: