mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-11-21 10:40:41 +08:00
Adds a read-only page for a repository's identity document. It shows the current document together with its full revision history. The data and wording follow heartwood and the rad id / rad inspect CLI. Co-Authored-By: Rūdolfs Ošiņš <rudolfs@osins.org>
27 lines
749 B
Svelte
27 lines
749 B
Svelte
<script lang="ts">
|
|
import type { Revision } from "@bindings/identity/Revision";
|
|
import type { ComponentProps } from "svelte";
|
|
|
|
import { show } from "@app/lib/modal";
|
|
|
|
import Button from "@app/components/Button.svelte";
|
|
import Icon from "@app/components/Icon.svelte";
|
|
import RawIdentityDocumentModal from "@app/modals/RawIdentityDocument.svelte";
|
|
|
|
interface Props {
|
|
raw: string;
|
|
revision?: Revision;
|
|
styleHeight?: ComponentProps<typeof Button>["styleHeight"];
|
|
}
|
|
|
|
const { raw, revision, styleHeight = "2rem" }: Props = $props();
|
|
</script>
|
|
|
|
<Button
|
|
{styleHeight}
|
|
variant="outline"
|
|
onclick={() =>
|
|
show({ component: RawIdentityDocumentModal, props: { raw, revision } })}>
|
|
<Icon name="code" />View JSON
|
|
</Button>
|