{pageData.title || `${repo} - Repository`} {#if (pageData.image || repoImage) && String(pageData.image || repoImage).trim()} {/if} {#if (pageData.banner || repoBanner) && String(pageData.banner || repoBanner).trim()} {/if} {#if pageData.banner || repoBanner} {:else if pageData.image || repoImage} {/if}
{#if repoBanner}
{ console.error('[Repo Images] Failed to load banner:', repoBanner); const target = e.target as HTMLImageElement; if (target) target.style.display = 'none'; }} />
{/if}
{#if repoImage} { console.error('[Repo Images] Failed to load image:', repoImage); const target = e.target as HTMLImageElement; if (target) target.style.display = 'none'; }} /> {/if}

{pageData.repoName || repo}

{#if pageData.repoDescription}

{pageData.repoDescription}

{:else}

No description

{/if}
{#if pageData.repoLanguage} {pageData.repoLanguage} {/if} {#if pageData.repoIsPrivate} Private {:else} Public {/if} {#if forkInfo?.isFork && forkInfo.originalRepo} Forked from {forkInfo.originalRepo.repo} {/if}
{#if pageData.repoOwnerPubkey || (pageData.repoMaintainers && pageData.repoMaintainers.length > 0)}
Contributors:
{#if pageData.repoOwnerPubkey} Owner {/if} {#if pageData.repoMaintainers} {#each pageData.repoMaintainers.filter(m => m !== pageData.repoOwnerPubkey) as maintainerPubkey} Maintainer {/each} {/if}
{/if} {#if pageData.repoTopics && pageData.repoTopics.length > 0}
{#each pageData.repoTopics as topic} {topic} {/each}
{/if} {#if pageData.repoWebsite} {/if} {#if pageData.repoCloneUrls && pageData.repoCloneUrls.length > 0}
Clone: {#each pageData.repoCloneUrls.slice(0, 3) as cloneUrl} {cloneUrl} {/each} {#if pageData.repoCloneUrls.length > 3} +{pageData.repoCloneUrls.length - 3} more {/if}
{/if}
{#if userPubkey} {#if isMaintainer} Settings {/if} {#if isMaintainer} {/if} Verified {#if isMaintainer} Maintainer {:else} Authenticated (Contributor) {/if} {/if}
{#if branches.length > 0} {/if} {#if verificationStatus} {#if verificationStatus.verified} Verified Verified {:else} Unverified Unverified {/if} {/if}
{#if error}
Error: {error}
{/if}
{#if activeTab === 'files'} {/if} {#if activeTab === 'history'} {/if} {#if activeTab === 'tags'} {/if} {#if activeTab === 'issues'} {/if} {#if activeTab === 'prs'} {/if}
{#if activeTab === 'files' && readmeContent && !currentFile}

README

View Raw Download ZIP
{#if loadingReadme}
Loading README...
{:else if readmeIsMarkdown && readmeHtml}
{@html readmeHtml}
{:else if readmeContent}
{readmeContent}
{/if}
{/if} {#if activeTab === 'files' && currentFile}
{currentFile}
{#if hasChanges} ● Unsaved changes {/if} {#if isMaintainer} {:else if userPubkey} Only maintainers can edit files. Submit a PR instead. {/if}
{#if loading}
Loading file...
{:else}
{#if isMaintainer} {:else}
{#if highlightedFileContent} {@html highlightedFileContent} {:else}
{fileContent}
{/if}
{/if}
{/if} {:else if activeTab === 'files'}

Select a file from the sidebar to view and edit it

{/if} {#if activeTab === 'history' && showDiff}

Diff for commit {selectedCommit?.slice(0, 7)}

{#each diffData as diff}
{diff.file} +{diff.additions} -{diff.deletions}
{diff.diff}
{/each}
{:else if activeTab === 'history'}

Select a commit to view its diff

{/if} {#if activeTab === 'tags'}

Tags are displayed in the sidebar

{/if} {#if activeTab === 'issues'}
{#if issues.length === 0}

No issues found. Create one to get started!

{:else} {#each issues as issue}

{issue.subject}

{issue.status} Created {new Date(issue.created_at * 1000).toLocaleString()}
{@html issue.content.replace(/\n/g, '
')}
{/each} {/if}
{/if} {#if activeTab === 'prs'}
{#if prs.length === 0}

No pull requests found. Create one to get started!

{:else if selectedPR} {#each prs.filter(p => p.id === selectedPR) as pr} {@const decoded = nip19.decode(npub)} {#if decoded.type === 'npub'} {@const repoOwnerPubkey = decoded.data as string} {/if} {/each} {:else} {#each prs as pr}
selectedPR = pr.id} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); selectedPR = pr.id; } }} style="cursor: pointer;">

{pr.subject}

{pr.status} {#if pr.commitId} Commit: {pr.commitId.slice(0, 7)} {/if} Created {new Date(pr.created_at * 1000).toLocaleString()}
{@html pr.content.replace(/\n/g, '
')}
{/each} {/if}
{/if}
{#if showCreateFileDialog} {/if} {#if showCreateBranchDialog} {/if} {#if showCreateTagDialog} {/if} {#if showCreateIssueDialog} {/if} {#if showCreatePRDialog} {/if} {#if showCommitDialog} {/if}