mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-20 22:00:43 +08:00
Improve general UX
- Hide issue title edit button when not logged in - Show Blob placeholder when empty file - Allow selecting blob code without the lines - Add Clipboard component to object id in CobHeader - Add blockies to Patch and Issueteasers - Reduce formatted object ids to 7 instead of 11 chars - Remove line breaking on soft wraps from Markdown - Reduce font size of code blocks in Markdown - Improve margins in IssueTeaser - Reduce font size in FileDiffs - Improve teasers, assignees and tags highlighting - Reduce font size of code - Change commit teaser subtitle - Show Clipboard in commit sha1 - Add blockies to PeerSelector - Adjust commit view CSS Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
export let authorId: string;
|
||||
export let caption: string | undefined = undefined;
|
||||
export let highlight: boolean = false;
|
||||
export let noAvatar: boolean = false;
|
||||
export let timestamp: number | undefined = undefined;
|
||||
|
||||
@@ -16,7 +15,7 @@
|
||||
.authorship {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: var(--color-foreground-5);
|
||||
color: var(--color-foreground-6);
|
||||
padding: 0.125rem 0;
|
||||
}
|
||||
.id {
|
||||
@@ -26,26 +25,18 @@
|
||||
}
|
||||
.body {
|
||||
margin: 0 0.4rem;
|
||||
color: var(--color-foreground-5);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.highlight {
|
||||
color: var(--color-foreground-6);
|
||||
font-weight: var(--font-weight-bold);
|
||||
}
|
||||
.date {
|
||||
color: var(--color-foreground-6);
|
||||
}
|
||||
</style>
|
||||
|
||||
<span class="authorship txt-tiny" title={relativeTimestamp(timestamp)}>
|
||||
{#if !noAvatar}
|
||||
<Avatar inline nodeId={authorId} />
|
||||
{/if}
|
||||
<span class:highlight class="id highlight layout-desktop">
|
||||
<span class="id layout-desktop">
|
||||
{formatNodeId(authorId)}
|
||||
</span>
|
||||
<span class:highlight class="id layout-mobile">
|
||||
<span class="id layout-mobile">
|
||||
{formatNodeId(authorId).replace("did:key:", "")}
|
||||
</span>
|
||||
<span class="body">
|
||||
@@ -56,8 +47,6 @@
|
||||
{/if}
|
||||
</span>
|
||||
{#if timestamp}
|
||||
<span class:date={highlight}>
|
||||
{formatTimestamp(timestamp)}
|
||||
</span>
|
||||
{formatTimestamp(timestamp)}
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
{:else if body.trim() === ""}
|
||||
<span class="txt-missing">No description.</span>
|
||||
{:else}
|
||||
<Markdown {rawPath} breaks content={body} />
|
||||
<Markdown {rawPath} content={body} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" context="module">
|
||||
export interface Item<T> {
|
||||
key: string;
|
||||
title: string;
|
||||
value: T;
|
||||
badge: string | null;
|
||||
@@ -50,19 +49,19 @@
|
||||
|
||||
<div class="dropdown">
|
||||
{#each items as item}
|
||||
{#if item.key}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="dropdown-item"
|
||||
class:selected={item.value === selected}
|
||||
use:twemoji
|
||||
on:click={() => onSelect(item)}
|
||||
title={item.title}>
|
||||
{@html item.key}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="dropdown-item"
|
||||
class:selected={item.value === selected}
|
||||
use:twemoji
|
||||
on:click={() => onSelect(item)}
|
||||
title={item.title}>
|
||||
<slot name="item" {item}>
|
||||
{item.value}
|
||||
{#if item.badge}
|
||||
<Badge variant="primary">{item.badge}</Badge>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</slot>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
export let content: string;
|
||||
export let hash: string | null = null;
|
||||
export let path: string = "/";
|
||||
export let breaks = false;
|
||||
export let rawPath: string;
|
||||
|
||||
$: doc = matter(content);
|
||||
$: frontMatter = Object.entries(doc.data).filter(
|
||||
([, val]) => typeof val === "string" || typeof val === "number",
|
||||
);
|
||||
marked.use({ extensions, renderer, breaks });
|
||||
marked.use({ extensions, renderer });
|
||||
|
||||
let container: HTMLElement;
|
||||
|
||||
@@ -187,7 +186,7 @@
|
||||
|
||||
.markdown :global(code) {
|
||||
font-family: var(--font-family-monospace);
|
||||
font-size: var(--font-size-regular);
|
||||
font-size: var(--font-size-small);
|
||||
color: var(--color-foreground-6);
|
||||
background-color: var(--color-foreground-2);
|
||||
border-radius: 0.5rem;
|
||||
|
||||
Reference in New Issue
Block a user