diff --git a/src/views/repo/Patch.svelte b/src/views/repo/Patch.svelte index 3843fd9b8..13b3ef504 100644 --- a/src/views/repo/Patch.svelte +++ b/src/views/repo/Patch.svelte @@ -9,26 +9,27 @@ import type { Revision } from "@bindings/cob/patch/Revision"; import * as roles from "@app/lib/roles"; + import { formatOid } from "@app/lib/utils"; import { invoke } from "@app/lib/invoke"; import { nodeRunning } from "@app/lib/events"; import { announce } from "@app/components/AnnounceSwitch.svelte"; + import AssigneeInput from "@app/components/AssigneeInput.svelte"; + import Border from "@app/components/Border.svelte"; + import Changeset from "@app/components/Changeset.svelte"; import CommentComponent from "@app/components/Comment.svelte"; import CopyableId from "@app/components/CopyableId.svelte"; import Icon from "@app/components/Icon.svelte"; - import Id from "@app/components/Id.svelte"; import InlineTitle from "@app/components/InlineTitle.svelte"; + import LabelInput from "@app/components/LabelInput.svelte"; import Layout from "./Layout.svelte"; import Link from "@app/components/Link.svelte"; import NodeId from "@app/components/NodeId.svelte"; + import PatchStateBadge from "@app/components/PatchStateBadge.svelte"; import PatchTeaser from "@app/components/PatchTeaser.svelte"; import Sidebar from "@app/components/Sidebar.svelte"; - import Changeset from "@app/components/Changeset.svelte"; - import Border from "@app/components/Border.svelte"; - import PatchStateBadge from "@app/components/PatchStateBadge.svelte"; - import LabelInput from "@app/components/LabelInput.svelte"; - import AssigneeInput from "@app/components/AssigneeInput.svelte"; + import Button from "@app/components/Button.svelte"; interface Props { repo: RepoInfo; @@ -43,11 +44,12 @@ let { repo, patch, patches, revisions, config, status }: Props = $props(); /* eslint-enable prefer-const */ - let items = $state(patches.content); let cursor = patches.cursor; let more = patches.more; + let items = $state(patches.content); let labelSaveInProgress: boolean = $state(false); let assigneesSaveInProgress: boolean = $state(false); + let tab: "patch" | "revisions" = $state("patch"); $effect(() => { items = patches.content; @@ -55,6 +57,13 @@ more = patches.more; }); + $effect(() => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + patch.id; + + tab = "patch"; + }); + const project = $derived(repo.payloads["xyz.radicle.project"]!); async function loadHighlightedDiff(rid: string, base: string, head: string) { @@ -316,26 +325,51 @@ -