diff --git a/vue/src/api/files.ts b/vue/src/api/files.ts index 0ebc18c..7e10dd3 100644 --- a/vue/src/api/files.ts +++ b/vue/src/api/files.ts @@ -17,7 +17,7 @@ export interface GenDiffInfo { empty: boolean ownFile: string otherFile: string - diff: object + diff: any } export const getTargetFolderFiles = async (folder_path: string) => { diff --git a/vue/src/components/ChangeIndicator.vue b/vue/src/components/ChangeIndicator.vue index deb59e7..1685606 100644 --- a/vue/src/components/ChangeIndicator.vue +++ b/vue/src/components/ChangeIndicator.vue @@ -2,7 +2,7 @@ import { CaretRightOutlined } from '@/icon' import type { GenDiffInfo } from '@/api/files' -const props = defineProps<{ +defineProps<{ genDiffToPrevious: GenDiffInfo genDiffToNext: GenDiffInfo genInfo?: string @@ -83,7 +83,7 @@ function hasOtherProps(diff: Record) {
Other props that changed:

@@ -146,7 +146,7 @@ function hasOtherProps(diff: Record) {
Other props that changed:

    -
  • {{ propertyName }} +
  • {{ propertyName }}
diff --git a/vue/src/components/FileItem.vue b/vue/src/components/FileItem.vue index f0f1363..4231495 100644 --- a/vue/src/components/FileItem.vue +++ b/vue/src/components/FileItem.vue @@ -17,6 +17,7 @@ import type { GenDiffInfo } from '@/api/files' const global = useGlobalStore() const tagStore = useTagStore() + const props = withDefaults( defineProps<{ file: FileNodeInfo @@ -28,12 +29,22 @@ const props = withDefaults( enableRightClickMenu?: boolean, enableCloseIcon?: boolean isSelectedMutilFiles?: boolean - genDiffToPrevious: GenDiffInfo - genDiffToNext: GenDiffInfo + genDiffToPrevious?: GenDiffInfo + genDiffToNext?: GenDiffInfo genInfo?: string - enableChangeIndicator: boolean + enableChangeIndicator?: boolean }>(), - { selected: false, enableRightClickMenu: true, enableCloseIcon: false } + { selected: false, enableRightClickMenu: true, enableCloseIcon: false, genDiffToNext: () => ({ + empty: true, + ownFile: "", + otherFile: "", + diff: "", +}), genDiffToPrevious: () => ({ + empty: true, + ownFile: "", + otherFile: "", + diff: "", +}) } ) const emit = defineEmits<{ diff --git a/vue/src/i18n/zh-hans.ts b/vue/src/i18n/zh-hans.ts index e0c221e..2463e5d 100644 --- a/vue/src/i18n/zh-hans.ts +++ b/vue/src/i18n/zh-hans.ts @@ -173,6 +173,8 @@ export const zhHans = { clientSpecificSettings: '客户端特有的设置', initiateSoftwareStartupConfig: '初始化软件启动配置', gridCellWidth: '网格单元宽度 (px)', + showChangeIndicators: 'Show Change Indicators', + seedAsChange: 'Seed as Change', defaultGridCellWidth: '默认网格单元宽度 (px)', thumbnailResolution: '缩略图分辨率 (px)', livePreview: '实时预览', diff --git a/vue/src/page/fileTransfer/stackView.vue b/vue/src/page/fileTransfer/stackView.vue index 97b9d36..30dd2f6 100644 --- a/vue/src/page/fileTransfer/stackView.vue +++ b/vue/src/page/fileTransfer/stackView.vue @@ -137,7 +137,7 @@ function getGenDiff(ownGenInfo: any, idx: any, increment: any, ownFile: FileNode //diff vars init let gen_a = ownGenInfo - let gen_b = sortedFiles.value[idx + increment].gen_info_obj + let gen_b :any = sortedFiles.value[idx + increment].gen_info_obj if(gen_b == undefined) { return result }