breadcrumbs fix, no popover, clicking on projec==goto project

This commit is contained in:
Kiril Videlov 2023-03-28 14:41:18 +02:00 committed by Kiril Videlov
parent 46e6af7fb2
commit 735820e7d0

View File

@ -32,56 +32,12 @@
</a>
{#if $project}
<div class="ml-1">
<Popover>
<div slot="button" class="align-item-centerh-5 flex rounded-md py-2 px-2 hover:bg-zinc-700">
<div class="flex h-4 items-center">
<div class="flex rounded-md py-2 px-2 hover:bg-zinc-700">
<a class="flex h-4 items-center" href={`/projects/${$project.id}`}>
{$project.title}
</div>
</div>
<div class="flex flex-col">
<ul class="flex max-h-[289px] flex-col overflow-y-auto p-2">
{#each $projects || [] as p}
<a
href="/projects/{p.id}"
class="
flex cursor-pointer
items-center rounded p-2 hover:bg-zinc-700"
>
<span class="truncate">
{p.title}
</span>
<span class="grow p-2" />
{#if $project && $project.id === p.id}
<svg
width="15"
height="11"
viewBox="0 0 15 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M14.5816 2.39721C15.1395 1.84882 15.1395 0.959693 14.5816 0.411296C14.0237 -0.137099 13.1192 -0.137099 12.5613 0.411296L5.2381 7.60983L2.43872 4.85811C1.88083 4.30971 0.976311 4.30971 0.418419 4.85811C-0.139473 5.4065 -0.139473 6.29563 0.418419 6.84402L4.22794 10.5887C4.78583 11.1371 5.69036 11.1371 6.24825 10.5887L14.5816 2.39721Z"
fill="#A1A1AA"
/>
</svg>
{/if}
</a>
{/each}
</ul>
<span class="w-full border-t border-zinc-700" />
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="m-2 flex">
<a href="/" class="w-full cursor-pointer rounded p-2 hover:bg-zinc-700"
>Add repository...</a
>
</div>
</div>
</Popover>
</div>
{/if}
{#if $project && $session}
<a class="hover:text-zinc-200" href="/projects/{$project.id}/sessions/{$session.id}">