feat: discussion sub-tab navigation for annotation threads (#60) #63

Merged
marcel merged 17 commits from feat/60-discussion-panel-tabs into main 2026-03-25 12:38:45 +01:00
Showing only changes of commit a392e85f43 - Show all commits

View File

@@ -403,26 +403,23 @@ function zoomOut() {
title="Farbe wählen" title="Farbe wählen"
/> />
{/if} {/if}
</div>
<!-- Annotation visibility toggle (shown when annotations exist) --> <!-- Annotation visibility toggle (shown when annotations exist) -->
{#if annotations.length > 0} {#if annotations.length > 0}
<button <button
onclick={() => (showAnnotations = !showAnnotations)} onclick={() => (showAnnotations = !showAnnotations)}
aria-label={showAnnotations ? m.pdf_annotations_hide() : m.pdf_annotations_show()} aria-label={showAnnotations ? m.pdf_annotations_hide() : m.pdf_annotations_show()}
title={showAnnotations ? m.pdf_annotations_hide() : m.pdf_annotations_show()} class="flex items-center gap-1.5 rounded px-2 py-1 font-sans text-xs transition {showAnnotations
class="rounded p-1 transition {showAnnotations
? 'text-gray-300 hover:bg-white/10' ? 'text-gray-300 hover:bg-white/10'
: 'bg-white/10 text-brand-mint'}" : 'bg-white/10 text-brand-mint'}"
> >
{#if showAnnotations}
<svg <svg
class="h-4 w-4" class="h-3.5 w-3.5 shrink-0"
viewBox="0 0 24 24" viewBox="0 0 24 24"
fill="none" fill="none"
stroke="currentColor" stroke="currentColor"
stroke-width="2" stroke-width="2"
> >
{#if showAnnotations}
<path <path
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
@@ -433,24 +430,18 @@ function zoomOut() {
stroke-linejoin="round" stroke-linejoin="round"
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
/> />
</svg>
{:else} {:else}
<svg
class="h-4 w-4"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path <path
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21" d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
/> />
</svg>
{/if} {/if}
</svg>
{showAnnotations ? m.pdf_annotations_hide() : m.pdf_annotations_show()}
</button> </button>
{/if} {/if}
</div>
<!-- PDF canvas area --> <!-- PDF canvas area -->
<div class="relative flex-1 overflow-auto"> <div class="relative flex-1 overflow-auto">