diff --git a/src/components/admin/components/TypeAheadSearch.svelte b/src/components/admin/components/TypeAheadSearch.svelte index 4631d31..27ad50c 100644 --- a/src/components/admin/components/TypeAheadSearch.svelte +++ b/src/components/admin/components/TypeAheadSearch.svelte @@ -23,6 +23,7 @@ export let selected: string | null = null export let items: {name: string, value: string}[] = [] export let maxItems = 5; + export let leftText: boolean = false; export let searchValue = items.find(item => item.value === selected)?.name || '' let open = false @@ -36,13 +37,13 @@ } - +
open = true} on:keydown={() => open = true}/>
{#each filteredItems as item (item)} - {/each} diff --git a/src/components/admin/pages/Edit.svelte b/src/components/admin/pages/Edit.svelte index 0161760..98346e2 100644 --- a/src/components/admin/pages/Edit.svelte +++ b/src/components/admin/pages/Edit.svelte @@ -34,7 +34,7 @@ let searchValue: string = ""; let dirty = false; - let selectedPath: string = ""; + let selectedPath: string | null = null; let pathSearchValue: string = ""; $: availableBranches = $branches.map((branch) => ({ @@ -121,7 +121,7 @@
- ({value, name: value}))} bind:selected={selectedPath} bind:searchValue={pathSearchValue} maxItems={Number.MAX_VALUE} /> + ({value, name: value}))} bind:selected={selectedPath} bind:searchValue={pathSearchValue} maxItems={Number.MAX_VALUE} leftText={true} />
{#if selectedBranch !== "master"} diff --git a/src/components/admin/pages/Home.svelte b/src/components/admin/pages/Home.svelte index 927ed61..567ebcb 100644 --- a/src/components/admin/pages/Home.svelte +++ b/src/components/admin/pages/Home.svelte @@ -28,13 +28,7 @@ let events = $eventRepo.listEvents() let showAdd = false - let showLogoutModal = false let millis = Date.now() - - function logout() { - $tokenStore = "" - replace("/login") - } @@ -47,20 +41,11 @@ Edit Pages Permissions - showLogoutModal = true} class="cursor-pointer select-none">Logout events = $eventRepo.listEvents()}/> - -

Do you really want to logout?

- - - - -
- {#await events}