Skip to content

Commit

Permalink
feat: image search spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniiriarios committed Apr 27, 2024
1 parent 4bfbebf commit 506c748
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion frontend/components/ImageSearch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { books } from "@stores/books";
import Modal from "@components/Modal.svelte";
import ScrollBox from "./ScrollBox.svelte";
import Spinner from "./Spinner.svelte";
export let book: Book = {} as Book;
export let selectedImageUrl: string = "";
Expand Down Expand Up @@ -117,7 +118,10 @@
<div class="err">{err}</div>
{/if}
{#if searching}
<div class="searching">Searching...</div>
<div class="searching">
<div class="searching__spinner"><Spinner size="6rem" /></div>
<div class="searching__msg">Searching...</div>
</div>
{:else}
<div class="resultsContainer">
<ScrollBox>
Expand Down Expand Up @@ -214,4 +218,22 @@
gap: 1rem;
}
}
.searching {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
width: 100%;
height: 100%;
&__spinner {
color: var(--c-text-muted);
}
&__msg {
font-size: 1rem;
}
}
</style>

0 comments on commit 506c748

Please sign in to comment.