diff --git a/http-client/lib/repo/commit.ts b/http-client/lib/repo/commit.ts index 2279ee768..6b4147bff 100644 --- a/http-client/lib/repo/commit.ts +++ b/http-client/lib/repo/commit.ts @@ -142,23 +142,23 @@ const diffChangesetSchema = object({ }); const diffAddedChangesetSchema = diffChangesetSchema.merge( - object({ state: literal("added"), new: diffFileSchema }), + object({ status: literal("added"), new: diffFileSchema }), ); const diffDeletedChangesetSchema = diffChangesetSchema.merge( - object({ state: literal("deleted"), old: diffFileSchema }), + object({ status: literal("deleted"), old: diffFileSchema }), ); const diffModifiedChangesetSchema = diffChangesetSchema.merge( object({ - state: literal("modified"), + status: literal("modified"), new: diffFileSchema, old: diffFileSchema, }), ); const diffCopiedChangesetSchema = object({ - state: literal("copied"), + status: literal("copied"), newPath: string(), oldPath: string(), }); @@ -173,7 +173,7 @@ const diffCopiedWithModificationsChangesetSchema = ); const diffMovedChangesetSchema = object({ - state: literal("moved"), + status: literal("moved"), newPath: string(), oldPath: string(), current: diffFileSchema, diff --git a/src/views/repos/Changeset.svelte b/src/views/repos/Changeset.svelte index a551cba04..0c9676270 100644 --- a/src/views/repos/Changeset.svelte +++ b/src/views/repos/Changeset.svelte @@ -22,8 +22,8 @@ const diffDescription = (diffFiles: Diff["files"]): string => Object.entries( diffFiles.reduce( - (acc, { state }) => { - acc[state]++; + (acc, { status }) => { + acc[status]++; return acc; }, { added: 0, modified: 0, deleted: 0, copied: 0, moved: 0 }, @@ -109,7 +109,7 @@ filePath={path} oldFilePath={"oldPath" in file ? file.oldPath : undefined} fileDiff={file.diff} - headerBadgeCaption={file.state} + headerBadgeCaption={file.status} content={"new" in file ? files[file.new.oid]?.content : undefined} oldContent={"old" in file ? files[file.old.oid]?.content @@ -117,7 +117,7 @@ visible={filesVisibility.has(path)} /> {:else}