From 28c9ff969dd71e366737b9aab937d40878c7b450 Mon Sep 17 00:00:00 2001 From: Yume <2839681263@qq.com> Date: Fri, 5 Sep 2025 15:22:56 +0800 Subject: [PATCH 1/3] fix(UI): fix type error in DiffView --- moon/apps/web/components/DiffView/FileDiff.tsx | 7 ++++++- moon/apps/web/hooks/useMrFilesChanged.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/moon/apps/web/components/DiffView/FileDiff.tsx b/moon/apps/web/components/DiffView/FileDiff.tsx index 81f31fb99..96a301906 100644 --- a/moon/apps/web/components/DiffView/FileDiff.tsx +++ b/moon/apps/web/components/DiffView/FileDiff.tsx @@ -1,7 +1,7 @@ import { useEffect, useMemo, useRef, useState } from 'react' import { DiffFile, DiffModeEnum, DiffView } from '@git-diff-view/react' -import { CommonResultFilesChangedPage, DiffItem } from '@gitmono/types/generated' +import { CommonResultFilesChangedPage } from '@gitmono/types/generated' import { ExpandIcon, SparklesIcon } from '@gitmono/ui/Icons' import { cn } from '@gitmono/ui/src/utils' @@ -9,6 +9,11 @@ import { parsedDiffs } from '@/components/DiffView/parsedDiffs' import StableTreeView from './StableTreeView' +interface DiffItem { + data: string + path: string +} + function calculateDiffStatsFromRawDiff(diffText: string): { additions: number; deletions: number } { const lines = diffText.split('\n') diff --git a/moon/apps/web/hooks/useMrFilesChanged.ts b/moon/apps/web/hooks/useMrFilesChanged.ts index f9a989d85..a17bdc544 100644 --- a/moon/apps/web/hooks/useMrFilesChanged.ts +++ b/moon/apps/web/hooks/useMrFilesChanged.ts @@ -11,6 +11,7 @@ export function useMrFilesChanged( queryKey: [ ...legacyApiClient.v1.postApiMrFilesChanged().requestKey(link), data, + params ], queryFn: () => legacyApiClient.v1.postApiMrFilesChanged().request(link, data, params) From 3eb4b0bec7293df7135786875ea594b140e280fc Mon Sep 17 00:00:00 2001 From: Yume <2839681263@qq.com> Date: Fri, 5 Sep 2025 15:32:37 +0800 Subject: [PATCH 2/3] fix(UI): fix type error in DiffView --- moon/apps/web/components/DiffView/FileDiff.tsx | 5 +---- moon/apps/web/components/DiffView/parsedDiffs.ts | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/moon/apps/web/components/DiffView/FileDiff.tsx b/moon/apps/web/components/DiffView/FileDiff.tsx index 96a301906..8cd6f8297 100644 --- a/moon/apps/web/components/DiffView/FileDiff.tsx +++ b/moon/apps/web/components/DiffView/FileDiff.tsx @@ -9,10 +9,7 @@ import { parsedDiffs } from '@/components/DiffView/parsedDiffs' import StableTreeView from './StableTreeView' -interface DiffItem { - data: string - path: string -} +import { DiffItem } from './parsedDiffs' function calculateDiffStatsFromRawDiff(diffText: string): { additions: number; deletions: number } { const lines = diffText.split('\n') diff --git a/moon/apps/web/components/DiffView/parsedDiffs.ts b/moon/apps/web/components/DiffView/parsedDiffs.ts index 208e576c0..956f1abc3 100644 --- a/moon/apps/web/components/DiffView/parsedDiffs.ts +++ b/moon/apps/web/components/DiffView/parsedDiffs.ts @@ -1,4 +1,7 @@ -import { DiffItem } from "@gitmono/types/generated" +export interface DiffItem { + data: string + path: string +} const extensionToLangMap: Record = { // Note that the key here is lowercase From dd1b476c918ce0d59385562a96f6c3060c91070b Mon Sep 17 00:00:00 2001 From: Yume <2839681263@qq.com> Date: Fri, 5 Sep 2025 15:43:57 +0800 Subject: [PATCH 3/3] fix(UI): delete expires_days params in PostGPGKey hook --- moon/apps/web/components/Setting/GPGKeys.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/moon/apps/web/components/Setting/GPGKeys.tsx b/moon/apps/web/components/Setting/GPGKeys.tsx index c5e089036..f1f8194ad 100644 --- a/moon/apps/web/components/Setting/GPGKeys.tsx +++ b/moon/apps/web/components/Setting/GPGKeys.tsx @@ -78,7 +78,6 @@ const NewGPGKeyDialog = ({ open, setOpen }: NewGPGKeyDialogProps) => { postGPGKey( { data: { - expires_days: 10, gpg_content: normalizedGpgContent } },