~ knotless Search/
↑↓ move↵ open⇧↵ all results

johnandersen777.bsky.social/knotless

git that lives in your Atmosphere account

Forked from chadtmiller.com/knotless

0
0
25 lines · 805 B Raw History
<script lang="ts">
	import type { LineView } from '#lib/lexicons/dev/knotless/defs.ts';
	/**
	 * The lines of a pull's diff a comment is on, as they were when it was
	 * written: those it names marked, and for one alone a few before it.
	 */
	let { at }: { at: LineView } = $props();
	const first = $derived(at.startLine ?? at.line);
</script>

{#if at.lines?.length}
	<div class="scroll line-quote">
		<table class="diff">
			<tbody>
				{#each at.lines as l (l.number)}<tr
						class:d={at.side === 'old' && l.number >= first}
						class:a={at.side !== 'old' && l.number >= first}
						><td class="n" data-n={l.number}></td><td class="c"><code>{l.text}</code></td></tr
					>{/each}
			</tbody>
		</table>
	</div>
{:else}
	<p class="line-quote gone mute">These lines can no longer be read.</p>
{/if}