-
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
9 changed files
with
211 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<script lang="ts"> | ||
import type { Issue } from "@bindings/Issue"; | ||
import { formatOid } from "@app/lib/utils"; | ||
import Icon from "./Icon.svelte"; | ||
import NodeId from "./NodeId.svelte"; | ||
export let issue: Issue; | ||
const statusColor: Record<Issue["state"]["status"], string> = { | ||
open: "var(--color-fill-success)", | ||
closed: "var(--color-foreground-red)", | ||
}; | ||
const statusBackgroundColor: Record<Issue["state"]["status"], string> = { | ||
open: "var(--color-fill-diff-green)", | ||
closed: "var(--color-fill-diff-red)", | ||
}; | ||
</script> | ||
|
||
<style> | ||
.issue-teaser { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
gap: 0.25rem; | ||
height: 5rem; | ||
background-color: var(--color-background-float); | ||
padding: 1rem; | ||
cursor: pointer; | ||
font-size: var(--font-size-regular); | ||
} | ||
.issue-teaser:hover { | ||
background-color: var(--color-fill-float-hover); | ||
} | ||
.status { | ||
padding: 0; | ||
margin-right: 1rem; | ||
} | ||
.issue-teaser:first-of-type { | ||
clip-path: var(--3px-top-corner-fill); | ||
} | ||
.issue-teaser:last-of-type { | ||
clip-path: var(--3px-bottom-corner-fill); | ||
} | ||
.issue-teaser:only-of-type { | ||
clip-path: var(--3px-corner-fill); | ||
} | ||
</style> | ||
|
||
<div class="issue-teaser"> | ||
<div class="global-flex"> | ||
<div | ||
class="global-counter status" | ||
style:color={statusColor[issue.state.status]} | ||
style:background-color={statusBackgroundColor[issue.state.status]}> | ||
<Icon name="issue" /> | ||
</div> | ||
<div | ||
class="global-flex" | ||
style:flex-direction="column" | ||
style:align-items="flex-start"> | ||
{issue.title} | ||
<div class="global-flex txt-small"> | ||
<NodeId | ||
nodeId={issue.author.did.replace("did:key:", "")} | ||
alias={issue.author.alias} /> | ||
opened | ||
<div class="global-oid">{formatOid(issue.id)}</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="global-flex"> | ||
{#each issue.labels as label} | ||
<div class="global-counter txt-small">{label}</div> | ||
{/each} | ||
</div> | ||
</div> |
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,83 @@ | ||
<script lang="ts"> | ||
import type { Patch } from "@bindings/Patch"; | ||
import { formatOid } from "@app/lib/utils"; | ||
import Icon from "./Icon.svelte"; | ||
import NodeId from "./NodeId.svelte"; | ||
export let patch: Patch; | ||
const statusColor: Record<Patch["state"]["status"], string> = { | ||
draft: "var(--color-fill-gray)", | ||
open: "var(--color-fill-success)", | ||
archived: "var(--color-foreground-yellow)", | ||
merged: "var(--color-fill-primary)", | ||
}; | ||
const statusBackgroundColor: Record<Patch["state"]["status"], string> = { | ||
draft: "var(--color-fill-ghost)", | ||
open: "var(--color-fill-diff-green)", | ||
archived: "var(--color-fill-private)", | ||
merged: "var(--color-fill-delegate)", | ||
}; | ||
</script> | ||
|
||
<style> | ||
.patch-teaser { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
gap: 0.25rem; | ||
height: 5rem; | ||
background-color: var(--color-background-float); | ||
padding: 1rem; | ||
cursor: pointer; | ||
font-size: var(--font-size-regular); | ||
} | ||
.patch-teaser:hover { | ||
background-color: var(--color-fill-float-hover); | ||
} | ||
.status { | ||
padding: 0; | ||
margin-right: 1rem; | ||
} | ||
.patch-teaser:first-of-type { | ||
clip-path: var(--3px-top-corner-fill); | ||
} | ||
.patch-teaser:last-of-type { | ||
clip-path: var(--3px-bottom-corner-fill); | ||
} | ||
.patch-teaser:only-of-type { | ||
clip-path: var(--3px-corner-fill); | ||
} | ||
</style> | ||
|
||
<div class="patch-teaser"> | ||
<div class="global-flex"> | ||
<div | ||
class="global-counter status" | ||
style:color={statusColor[patch.state.status]} | ||
style:background-color={statusBackgroundColor[patch.state.status]}> | ||
<Icon name="patch" /> | ||
</div> | ||
<div | ||
class="global-flex" | ||
style:flex-direction="column" | ||
style:align-items="flex-start"> | ||
{patch.title} | ||
<div class="global-flex txt-small"> | ||
<NodeId | ||
nodeId={patch.author.did.replace("did:key:", "")} | ||
alias={patch.author.alias} /> | ||
opened | ||
<div class="global-oid">{formatOid(patch.id)}</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="global-flex"> | ||
{#each patch.labels as label} | ||
<div class="global-counter txt-small">{label}</div> | ||
{/each} | ||
</div> | ||
</div> |
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