mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Make IDs copyable by clicking anywhere in the body
This commit is contained in:
@@ -32,9 +32,7 @@
|
||||
{#each embeds as embed}
|
||||
<Badge variant="neutral">
|
||||
<span class="txt-overflow">{embed.name}</span>
|
||||
<Clipboard
|
||||
text={`})`}
|
||||
small />
|
||||
<Clipboard text={`})`} />
|
||||
</Badge>
|
||||
{:else}
|
||||
<div class="txt-missing">No attachments</div>
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
import { formatCommit } from "@app/lib/utils";
|
||||
|
||||
import Changeset from "@app/views/projects/Changeset.svelte";
|
||||
import Clipboard from "@app/components/Clipboard.svelte";
|
||||
import CommitAuthorship from "@app/views/projects/Commit/CommitAuthorship.svelte";
|
||||
import InlineMarkdown from "@app/components/InlineMarkdown.svelte";
|
||||
import Layout from "./Layout.svelte";
|
||||
import CopyableId from "@app/components/CopyableId.svelte";
|
||||
|
||||
export let baseUrl: BaseUrl;
|
||||
export let commit: Commit;
|
||||
@@ -49,12 +49,12 @@
|
||||
<InlineMarkdown fontSize="medium" content={header.summary} />
|
||||
</div>
|
||||
<div class="layout-desktop-flex txt-monospace sha1">
|
||||
<span>{header.id}</span>
|
||||
<Clipboard small text={header.id} />
|
||||
<CopyableId id={header.id} />
|
||||
</div>
|
||||
<div class="layout-mobile-flex txt-monospace sha1 txt-small">
|
||||
{formatCommit(header.id)}
|
||||
<Clipboard small text={header.id} />
|
||||
<CopyableId id={header.id}>
|
||||
{formatCommit(header.id)}
|
||||
</CopyableId>
|
||||
</div>
|
||||
</div>
|
||||
<pre class="description txt-small">{header.description}</pre>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
import { twemoji, isLocal } from "@app/lib/utils";
|
||||
|
||||
import Button from "@app/components/Button.svelte";
|
||||
import Clipboard from "@app/components/Clipboard.svelte";
|
||||
import CloneButton from "@app/views/projects/Header/CloneButton.svelte";
|
||||
import Link from "@app/components/Link.svelte";
|
||||
|
||||
import Header from "./Header.svelte";
|
||||
import TrackButton from "./Header/TrackButton.svelte";
|
||||
import CopyableId from "@app/components/CopyableId.svelte";
|
||||
|
||||
export let activeTab: ActiveTab = undefined;
|
||||
export let baseUrl: BaseUrl;
|
||||
@@ -45,23 +45,9 @@
|
||||
.project-name:hover {
|
||||
color: inherit;
|
||||
}
|
||||
.id {
|
||||
color: var(--color-fill-secondary);
|
||||
overflow-wrap: anywhere;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
gap: 0.125rem;
|
||||
margin: 1rem 0 3rem 0;
|
||||
}
|
||||
.description :global(a) {
|
||||
border-bottom: 1px solid var(--color-foreground-contrast);
|
||||
}
|
||||
.truncate {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
max-width: var(--content-max-width);
|
||||
@@ -91,7 +77,7 @@
|
||||
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<span class="truncate">
|
||||
<span class="txt-overflow">
|
||||
<Link
|
||||
route={{
|
||||
resource: "project.source",
|
||||
@@ -131,9 +117,8 @@
|
||||
{@html render(project.description)}
|
||||
</div>
|
||||
|
||||
<div class="id">
|
||||
<span class="truncate global-hash">{project.id}</span>
|
||||
<Clipboard small text={project.id} />
|
||||
<div style:margin-bottom="3rem">
|
||||
<CopyableId id={project.id} />
|
||||
</div>
|
||||
|
||||
<Header {project} {activeTab} {baseUrl} />
|
||||
|
||||
Reference in New Issue
Block a user