Enable searching in all directories
This commit is contained in:
1 parent
e293c875b5
commit
5c4255dbbf
2 files changed
+7
-5
No files matched your search
@@ -260,10 +260,7 @@ onMount(() => {
|
||||
>
|
||||
<div class="width_container">
|
||||
{#if mode === "viewing"}
|
||||
<!-- Search only works in the user's home directory -->
|
||||
{#if $nav.path[0] && $nav.path[0].id === "me"}
|
||||
<SearchBar nav={nav}/>
|
||||
{/if}
|
||||
<SearchBar nav={nav}/>
|
||||
|
||||
<div class="toolbar">
|
||||
<button on:click={navigate_back} title="Back">
|
||||
|
||||
@@ -97,7 +97,6 @@ const input_keydown = e => {
|
||||
const input_keyup = e => {
|
||||
if (e.key === "Escape") {
|
||||
clear_search(true)
|
||||
e.preventDefault()
|
||||
} else if (e.key === "ArrowUp") {
|
||||
if (selected_result > 0) {
|
||||
selected_result--
|
||||
@@ -170,6 +169,12 @@ const window_keydown = (e) => {
|
||||
on:keydown={input_keydown}
|
||||
on:keyup={input_keyup}
|
||||
/>
|
||||
{#if search_term !== ""}
|
||||
<!-- Button needs to be of button type in order to not submit the form -->
|
||||
<button on:click={clear_search} type="button">
|
||||
<i class="icon">close</i>
|
||||
</button>
|
||||
{/if}
|
||||
</form>
|
||||
|
||||
<div class="results">
|
||||
|
||||
Reference in new issue
Block a user