Adding first iteration of search...
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
|||||||
MessageSquareWarning, Minus,
|
MessageSquareWarning, Minus,
|
||||||
Notebook,
|
Notebook,
|
||||||
Pencil, Plus,
|
Pencil, Plus,
|
||||||
|
RemoveFormatting,
|
||||||
SquareLibrary,
|
SquareLibrary,
|
||||||
Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
|
Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
|
||||||
Tags, ToggleLeft, ToggleRight, Trash2, TypeOutline,
|
Tags, ToggleLeft, ToggleRight, Trash2, TypeOutline,
|
||||||
@@ -282,6 +283,52 @@ async function handle_update_journal() {
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<!-- Search input form -->
|
||||||
|
<span class="flex flex-row items-center gap-2">
|
||||||
|
<span class="text-sm text-gray-500 hidden lg:inline">
|
||||||
|
Search:
|
||||||
|
</span>
|
||||||
|
<input
|
||||||
|
disabled={true}
|
||||||
|
type="text"
|
||||||
|
placeholder="Search Journal Entries"
|
||||||
|
bind:value={$journals_loc.qry__search_text}
|
||||||
|
onkeyup={(event) => {
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
// $journals_loc.qry__search_text = event.target.value;
|
||||||
|
// $journals_trig.journal_entry_li = true;
|
||||||
|
// console.log('Search query:', $journals_loc.qry__search_text);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
oninput={(event) => {
|
||||||
|
// $journals_loc.qry__search_text = event.target.value;
|
||||||
|
// console.log('Search query:', $journals_loc.qry__search_text);
|
||||||
|
}}
|
||||||
|
title="Search Journal Entries"
|
||||||
|
class="input input-sm input-bordered w-64"
|
||||||
|
/>
|
||||||
|
<!-- Clear search text button -->
|
||||||
|
<button
|
||||||
|
disabled={true}
|
||||||
|
class:hidden={!$journals_loc.qry__search_text}
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
// $journals_loc.qry__search_text = '';
|
||||||
|
// $journals_trig.journal_entry_li = true;
|
||||||
|
// console.log('Cleared search query:', $journals_loc.qry__search_text);
|
||||||
|
}}
|
||||||
|
class="btn btn-sm p-1.5 text-sm text-gray-500 variant-ghost-tertiary hover:variant-filled-tertiary transition"
|
||||||
|
title="Clear search text"
|
||||||
|
>
|
||||||
|
<!-- <X /> -->
|
||||||
|
<RemoveFormatting strokeWidth="1" color="gray" size="1.25em" />
|
||||||
|
<span class="hidden md:inline text-gray-500">
|
||||||
|
Clear
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
<!-- Give list of categories to base the new entry on -->
|
<!-- Give list of categories to base the new entry on -->
|
||||||
<span class="flex flex-row items-center gap-2">
|
<span class="flex flex-row items-center gap-2">
|
||||||
<span class="text-sm text-gray-500 hidden sm:inline">
|
<span class="text-sm text-gray-500 hidden sm:inline">
|
||||||
|
|||||||
Reference in New Issue
Block a user