Skip to content

Commit

Permalink
feat: add basic scroll functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktms committed Jan 12, 2023
1 parent 789c5ef commit 87b3e23
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src-tauri/src/util/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ pub fn search(
.more_locations(more_locations.to_vec())
.depth(depth.unwrap_or(1))
.ext(extension.unwrap_or("*"))
.limit(5)
.ignore_case()
.build()
.collect();
similarity_sort(&mut result, input);
return result;
result
}
2 changes: 1 addition & 1 deletion src/routes/App/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

<style>
.container {
height: 100%;
height: 350px;
width: 750px;
background-color: var(--primary-bg-color);
border-radius: 10px;
Expand Down
8 changes: 7 additions & 1 deletion src/routes/App/lib/SearchResult.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<div class="searchResults">
{#if results.length > 0 && results[0] !== " "}
{#if resultType !== 3}
{#each results.slice(0, 5) as result}
{#each results as result}
<button on:click class="searchResult" id={result}>
{#await getIcon(result
.split("/")
Expand Down Expand Up @@ -129,6 +129,12 @@
</div>

<style>
.searchResults {
max-height: 250px;
overflow-y: auto;
overflow-x: hidden;
}
.searchResult {
margin-top: 7px;
margin-left: 12px;
Expand Down

0 comments on commit 87b3e23

Please sign in to comment.