{pageData.title || `${repo} - Repository`} {#if pageData.image || repoImage} {/if} {#if pageData.banner || repoBanner} {/if} {#if pageData.banner || repoBanner} {:else if pageData.image || repoImage} {/if}
{#if repoBanner}
{/if}
{#if repoImage} {/if}

{pageData.repoName || repo}

{#if pageData.repoDescription}

{pageData.repoDescription}

{/if}
by {npub.slice(0, 16)}... 📖 {#if forkInfo?.isFork && forkInfo.originalRepo} Forked from {forkInfo.originalRepo.repo} {/if}
{#if userPubkey} {#if isMaintainer} Settings {/if} {#if isMaintainer} {/if} {#if isMaintainer} ✓ Maintainer {:else} ✓ Authenticated (Contributor) {/if} {:else} Not authenticated {/if} {#if verificationStatus} {#if verificationStatus.verified} ✓ Verified {:else} ⚠ 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}
{#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}