Files
radicle-desktop/src/components/IdentityJsonButton.svelte
T
Brandon OxendineandRūdolfs Ošiņš 54835363a9 Add a repository identity document view
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>
2026-09-24 17:04:54 +02:00

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>