-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
225 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<script lang="ts"> | ||
import type { Config } from "@bindings/Config"; | ||
import type { Issue } from "@bindings/Issue"; | ||
import type { RepoInfo } from "@bindings/RepoInfo"; | ||
import Border from "@app/components/Border.svelte"; | ||
import CopyableId from "@app/components/CopyableId.svelte"; | ||
import Icon from "@app/components/Icon.svelte"; | ||
import Layout from "./Layout.svelte"; | ||
import Link from "@app/components/Link.svelte"; | ||
import NodeId from "@app/components/NodeId.svelte"; | ||
export let repo: RepoInfo; | ||
export let issue: Issue; | ||
export let issues: Issue[]; | ||
export let config: Config; | ||
const statusColor: Record<Issue["state"]["status"], string> = { | ||
open: "var(--color-fill-success)", | ||
closed: "var(--color-foreground-red)", | ||
}; | ||
$: project = repo.payloads["xyz.radicle.project"]!; | ||
</script> | ||
|
||
<style> | ||
.title { | ||
font-size: var(--font-size-medium); | ||
font-weight: var(--font-weight-medium); | ||
} | ||
.issue-teaser { | ||
max-width: 11rem; | ||
white-space: nowrap; | ||
} | ||
.issue-list { | ||
margin-top: 0.5rem; | ||
padding-left: 2px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
} | ||
</style> | ||
|
||
<Layout {repo} selfDid={`did:key:${config.publicKey}`}> | ||
<svelte:fragment slot="breadcrumbs"> | ||
<Link route={{ resource: "home" }}> | ||
<NodeId | ||
nodeId={config.publicKey} | ||
alias={config.alias} | ||
styleFontFamily="var(--font-family-sans-serif)" | ||
styleFontSize="var(--font-size-tiny)" /> | ||
</Link> | ||
<Link route={{ resource: "repo.issues", rid: repo.rid, status: "open" }}> | ||
<div class="global-flex"> | ||
<Icon name="chevron-right" /> | ||
{project.data.name} | ||
</div> | ||
</Link> | ||
<Icon name="chevron-right" /> | ||
Issues | ||
</svelte:fragment> | ||
|
||
<svelte:fragment slot="header-center"> | ||
<CopyableId id={issue.id} /> | ||
</svelte:fragment> | ||
|
||
<svelte:fragment slot="sidebar"> | ||
<Border | ||
hoverable={false} | ||
variant="ghost" | ||
styleWidth="100%" | ||
styleHeight="32px"> | ||
<div style:margin-left="0.5rem"> | ||
<Icon name="issue" /> | ||
</div> | ||
<span class="txt-small txt-semibold">Issues</span> | ||
<div class="global-flex txt-small" style:margin-left="auto"> | ||
<div | ||
class="global-counter" | ||
style:padding="0 6px" | ||
style:background-color="var(--color-fill-ghost)" | ||
style:gap="4px"> | ||
{project.meta.issues.open + project.meta.issues.closed} | ||
</div> | ||
</div> | ||
</Border> | ||
|
||
<div class="issue-list"> | ||
{#each issues as issue} | ||
<Link | ||
variant="tab" | ||
route={{ resource: "repo.issue", rid: repo.rid, issue: issue.id }}> | ||
<div class="global-flex"> | ||
<div style:color={statusColor[issue.state.status]}> | ||
<Icon name="issue" /> | ||
</div> | ||
<span class="txt-small issue-teaser txt-overflow"> | ||
{issue.title} | ||
</span> | ||
</div> | ||
</Link> | ||
{/each} | ||
</div> | ||
</svelte:fragment> | ||
|
||
<div class="title">{issue.title}</div> | ||
<pre> | ||
{issue.discussion[0].edits.slice(-1)[0].body} | ||
</pre> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.