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

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Tabs keep the page where they are again, as SvelteKit 3 reads it

Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:web/keep-scroll
web/src/lib/molecules/FileViews.svelte+1−1
@@ -8,7 +8,7 @@
const on = (view: string) => (view === current ? 'page' : undefined);
</script>
<nav class="filter" data-sveltekit-noscroll>
<nav class="filter" data-sveltekit-reset="false">
{#if preview}<a href={preview} aria-current={on('preview')}>Preview</a>{/if}
<a href={code} aria-current={on('code')}>Code</a>
{#if blame}<a href={blame} aria-current={on('blame')}>Blame</a>{/if}
web/src/lib/molecules/PullTabs.svelte+1−1
@@ -10,7 +10,7 @@
let { href, comments, files, added, removed, current }: { href: string; comments: number; files: number; added: number; removed: number; current: 'conversation' | 'files' } = $props();
</script>
<nav class="pull-tabs" aria-label="Pull" data-sveltekit-noscroll>
<nav class="pull-tabs" aria-label="Pull" data-sveltekit-reset="false">
<a {href} aria-current={current === 'conversation' ? 'page' : undefined}><Icon name="chat" />Conversation<Count n={comments} /></a>
<a href="{href}/files" aria-current={current === 'files' ? 'page' : undefined}><Icon name="file" />Files changed<Count n={files} /></a>
<span class="stat"><span class="add">+{added}</span><span class="rem">−{removed}</span><Bars {added} {removed} /></span>
web/src/lib/organisms/ItemList.svelte+1−1
@@ -36,7 +36,7 @@
<a class="btn primary" href="{base}/{label}/new">{kind === 'pull' ? 'New pull' : 'New issue'}</a>
</div>
<div class="box items">
<div class="boxhead" data-sveltekit-noscroll>
<div class="boxhead" data-sveltekit-reset="false">
<nav class="filter">
<a href={filterHref(withState(here, 'open'))} aria-current={open ? 'page' : undefined}><Icon name={stateIcon(kind, 'open')} />{list.openCount} Open</a>
<a href={filterHref(withState(here, 'closed'))} aria-current={open ? undefined : 'page'}><Icon name="done" />{list.closedCount} Closed</a>
web/src/lib/organisms/ProfileRepos.svelte+1−1
@@ -90,7 +90,7 @@
{#if kind !== 'all'}<input type="hidden" name="kind" value={kind} />{/if}{#if order !== 'pushed'}<input type="hidden" name="sort" value={order} />{/if}
</form>
<div class="box items">
<div class="boxhead" data-sveltekit-noscroll>
<div class="boxhead" data-sveltekit-reset="false">
<nav class="filter">
<a href={href({ kind: 'all' })} aria-current={kind === 'all' ? 'page' : undefined}>All</a>
<a href={href({ kind: 'sources' })} aria-current={kind === 'sources' ? 'page' : undefined}>Sources</a>
web/src/lib/organisms/RepoHeader.svelte+1−1
@@ -49,7 +49,7 @@
{#if logged && !owner}<RepoMenu {repo} />{/if}
</div>
</div>
<nav class="tabs" data-sveltekit-noscroll {@attach scrollRow(tab)}>
<nav class="tabs" data-sveltekit-reset="false" {@attach scrollRow(tab)}>
<TabLink href={href()} label="Code" icon="code" current={tab === 'code'} />
<TabLink href={href(`/commits/${urlPath(repo.defaultBranch)}`)} label="Commits" icon="commit" current={tab === 'commits'} />
<TabLink href={href('/pulls')} label="Pulls" icon="pull" count={repo.openPulls} current={tab === 'pulls'} />
web/src/lib/templates/ProfilePage.svelte+1−1
@@ -21,7 +21,7 @@
<div class="profile-page">
<ProfileCard profile={p} {base} viewer={page.data.viewer?.actor?.did} can={page.data.viewer?.login} />
<div class="profile-main">
<nav class="tabs" data-sveltekit-noscroll {@attach scrollRow(tab)}>
<nav class="tabs" data-sveltekit-reset="false" {@attach scrollRow(tab)}>
<TabLink href={base} label="Overview" icon="book" current={tab === 'overview'} />
<TabLink href="{base}?tab=repos" label="Repositories" icon="repo" count={repos} current={tab === 'repos'} />
<TabLink href="{base}?tab=stars" label="Stars" icon="star" current={tab === 'stars'} />
web/src/lib/templates/RepoSettings.svelte+1−1
@@ -35,7 +35,7 @@
<RepoPage {repo} tab="settings" title="{title} · Settings · {repo.name}">
<div class="settings">
<nav class="settings-nav account-nav" aria-label="Settings" data-sveltekit-noscroll {@attach scrollRow(section)}>
<nav class="settings-nav account-nav" aria-label="Settings" data-sveltekit-reset="false" {@attach scrollRow(section)}>
{#each SECTIONS as s (s.id)}<a href={repoHref(authority, repo.name, `/settings${s.path && `/${s.path}`}`)} aria-current={s.id === section ? 'page' : undefined}><Icon name={s.icon} />{s.label}</a>{/each}
</nav>
<div class="settings-body">
web/src/lib/templates/SettingsPage.svelte+1−1
@@ -26,7 +26,7 @@
<div class="settings-page">
<div class="settings-head">{@render heading()}</div>
<nav class="account-nav" aria-label="Settings" data-sveltekit-noscroll bind:this={nav}>
<nav class="account-nav" aria-label="Settings" data-sveltekit-reset="false" bind:this={nav}>
{#each sections as s (s.href)}
<a href={s.href} aria-current={s.href === current ? 'page' : undefined}><Icon name={s.icon} />{s.label}</a>
{/each}
web/src/routes/+page.svelte+2−2
@@ -21,12 +21,12 @@
<section class="intro"><p><b>knotless</b> is git that lives in your Atmosphere account. Push and clone with plain git, and let agents commit over MCP. <a href="/start">Getting started →</a></p></section>
{#if data.feed}
{#if data.signedIn}
<nav class="tabs" data-sveltekit-noscroll {@attach scrollRow(data.following)}>
<nav class="tabs" data-sveltekit-reset="false" {@attach scrollRow(data.following)}>
<TabLink href={href(data.kind, '')} label="Following" current={data.following} />
<TabLink href={href(data.kind, 'feed=everyone')} label="Everyone" current={!data.following} />
</nav>
{/if}
<nav class="chips feed-kinds" data-sveltekit-noscroll {@attach scrollRow(data.kind)}>
<nav class="chips feed-kinds" data-sveltekit-reset="false" {@attach scrollRow(data.kind)}>
<a href={href(null)} aria-current={data.kind ? undefined : 'true'}>All</a>
{#each KINDS as [k, name] (k)}{#if data.following || k !== 'stars'}<a href={href(k)} aria-current={data.kind === k ? 'true' : undefined}>{name}</a>{/if}{/each}
</nav>