Add search button to search bar (#97)
This commit is contained in:
1 parent
c705ce86d3
commit
191b88f4d0
2 files changed
+15
-2
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" style="pointer-events: none; display: block; width: 100%; height: 100%;">
|
||||||
|
<g class="fill-current">
|
||||||
|
<path d="m20.87 20.17-5.59-5.59C16.35 13.35 17 11.75 17 10c0-3.87-3.13-7-7-7s-7 3.13-7 7 3.13 7 7 7c1.75 0 3.35-.65 4.58-1.71l5.59 5.59.7-.71zM10 16c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 528 B |
@@ -1,9 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from "svelte";
|
|
||||||
import { InvidiousApi } from "./InvidiousApi";
|
import { InvidiousApi } from "./InvidiousApi";
|
||||||
import { PlayletApi } from "./PlayletApi";
|
import { PlayletApi } from "./PlayletApi";
|
||||||
import { playletStateStore, searchHistoryStore } from "./Stores";
|
import { playletStateStore, searchHistoryStore } from "./Stores";
|
||||||
import VideoCell from "./VideoCell.svelte";
|
import VideoCell from "./VideoCell.svelte";
|
||||||
|
import SearchThinIcon from "../assets/search-thin-icon.svg.svelte";
|
||||||
|
|
||||||
export let visibility: boolean;
|
export let visibility: boolean;
|
||||||
|
|
||||||
@@ -90,11 +90,12 @@
|
|||||||
await searchVideos();
|
await searchVideos();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<div class="join w-full border border-neutral rounded-full">
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
dir="auto"
|
dir="auto"
|
||||||
placeholder="Search..."
|
placeholder="Search..."
|
||||||
class="input w-full border border-neutral rounded-full"
|
class="join-item input w-full border border-neutral rounded-full"
|
||||||
bind:this={searchBox}
|
bind:this={searchBox}
|
||||||
bind:value={searchBoxText}
|
bind:value={searchBoxText}
|
||||||
on:input={searchSuggestions}
|
on:input={searchSuggestions}
|
||||||
@@ -107,6 +108,12 @@
|
|||||||
}, 200);
|
}, 200);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<button class="join-item btn" on:click={searchVideos}>
|
||||||
|
<div class="h-6">
|
||||||
|
<SearchThinIcon />
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
{#if suggestions.suggestions.length > 0}
|
{#if suggestions.suggestions.length > 0}
|
||||||
<ul
|
<ul
|
||||||
class="dropdown-content menu z-10 p-2 shadow-xl bg-base-200 rounded-box"
|
class="dropdown-content menu z-10 p-2 shadow-xl bg-base-200 rounded-box"
|
||||||
|
|||||||
Reference in new issue
Block a user