we found 0 result

This commit is contained in:
Simon Cambier
2022-04-20 17:19:57 +02:00
parent 0d3286de04
commit 40260d46e8
3 changed files with 6 additions and 8 deletions

View File

@@ -132,7 +132,7 @@ async function openSelection(): Promise<void> {
/>
{/each}
{:else}
We found 0 result for your search here.
<center> We found 0 result for your search here. </center>
{/if}
</div>
</div>

View File

@@ -8,7 +8,7 @@ import { onMount, tick } from "svelte"
import CmpInput from "./CmpInput.svelte"
import CmpResultNote from "./CmpResultNote.svelte"
import type { ResultNote } from "./globals"
import { ModalInFile, type ModalVault } from "./modal";
import { ModalInFile, type ModalVault } from "./modal"
import { openNote } from "./notes"
import { getSuggestions } from "./search"
import { plugin } from "./stores"
@@ -124,6 +124,9 @@ function scrollIntoView(): void {
on:click={onClick}
/>
{/each}
{#if !resultNotes.length && searchQuery}
<center> We found 0 result for your search here. </center>
{/if}
</div>
</div>
<div class="prompt-instructions">

View File

@@ -1,10 +1,6 @@
<script lang="ts">
import { createEventDispatcher } from "svelte"
import {
excerptAfter,
excerptBefore,
type ResultNote,
} from "./globals"
import { excerptAfter, excerptBefore, type ResultNote } from "./globals"
import { escapeHTML, highlighter, stringsToRegex } from "./utils"
const dispatch = createEventDispatcher()
@@ -27,7 +23,6 @@ function cleanContent(content: string): string {
}
return escapeHTML(content)
}
</script>
<div