mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 02:00:31 +08:00
Show branch name when project is at head
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
--color-primary-background-lighter: #ff55ff22;
|
||||
--color-secondary: #5555ff;
|
||||
--color-secondary-background: #5555ff11;
|
||||
--color-secondary-background-darker: #5555ff09;
|
||||
--color-secondary-faded: #5555ff77;
|
||||
--color-secondary-darker: #4343cc;
|
||||
--color-secondary-1: #212847;
|
||||
--color-secondary-2: #2c326d;
|
||||
--color-secondary-6: #e3e3ff;
|
||||
|
||||
@@ -104,11 +104,32 @@
|
||||
}
|
||||
|
||||
.commit {
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: var(--font-family-monospace);
|
||||
}
|
||||
.commit .branch {
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: var(--color-secondary);
|
||||
background-color: var(--color-secondary-background);
|
||||
border-radius: inherit;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.commit .hash {
|
||||
display: inline-block;
|
||||
color: var(--color-secondary);
|
||||
background-color: var(--color-secondary-background);
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: inherit;
|
||||
}
|
||||
.branch + .hash {
|
||||
color: var(--color-secondary-darker);
|
||||
background-color: var(--color-secondary-background-darker);
|
||||
border-radius: inherit;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.anchor {
|
||||
@@ -117,7 +138,7 @@
|
||||
.anchor-widget {
|
||||
display: flex;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 0.25rem;
|
||||
border-radius: inherit;
|
||||
color: var(--color-tertiary);
|
||||
background-color: var(--color-tertiary-background);
|
||||
cursor: pointer;
|
||||
@@ -142,7 +163,7 @@
|
||||
|
||||
.seed {
|
||||
cursor: pointer;
|
||||
border-radius: 0.25rem;
|
||||
border-radius: inherit;
|
||||
}
|
||||
.seed:hover {
|
||||
background-color: var(--color-foreground-background-lighter);
|
||||
@@ -261,7 +282,18 @@
|
||||
{:then tree}
|
||||
<header>
|
||||
<div class="commit">
|
||||
{commit}
|
||||
{#if commit === project.head}
|
||||
<div class="branch">
|
||||
{project.meta.defaultBranch}
|
||||
</div>
|
||||
<div class="hash">
|
||||
{commit.slice(0, 7)}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="hash">
|
||||
{commit}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="anchor">
|
||||
{#if anchors}
|
||||
|
||||
@@ -18,6 +18,7 @@ export interface Info {
|
||||
export interface Meta {
|
||||
name: string;
|
||||
description: string;
|
||||
defaultBranch: string;
|
||||
maintainers: Urn[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user