diff --git a/src/components/dialog/ReorganizeDialog.vue b/src/components/dialog/ReorganizeDialog.vue index aaaf88f2..ddedc070 100644 --- a/src/components/dialog/ReorganizeDialog.vue +++ b/src/components/dialog/ReorganizeDialog.vue @@ -249,39 +249,6 @@ function getFileName(path?: string) { return normalizedPath.split('/').pop() || normalizedPath } -// 获取目录路径 -function getDirectoryPath(path?: string) { - const normalizedPath = normalizePath(path) - if (!normalizedPath) return '' - if (normalizedPath.endsWith('/')) return normalizedPath - - const parts = normalizedPath.split('/') - parts.pop() - const joined = parts.join('/') - return joined ? `${joined}/` : '/' -} - -// 计算公共路径 -function getCommonPath(paths: string[]) { - const validPaths = paths.map(item => normalizePath(item)).filter(Boolean) - if (validPaths.length === 0) return '' - if (validPaths.length === 1) return validPaths[0] - - const splitPaths = validPaths.map(path => path.split('/')) - const commonParts: string[] = [] - - for (let index = 0; index < splitPaths[0].length; index++) { - const part = splitPaths[0][index] - if (splitPaths.every(pathParts => pathParts[index] === part)) { - commonParts.push(part) - } else { - break - } - } - - return commonParts.join('/') || '/' -} - // 获取唯一非空值 function getUniqueValues(values: (string | undefined)[]) { return [...new Set(values.map(item => item?.trim()).filter(Boolean) as string[])] @@ -324,18 +291,6 @@ function getPreviewSeasonNumber(item: ManualTransferPreviewItem) { ) } -// 顶部原始路径 -const previewSourcePath = computed(() => { - const paths = filteredPreviewItems.value.map(item => getDirectoryPath(item.source)) - return getCommonPath(paths) || '-' -}) - -// 顶部目的路径 -const previewTargetPath = computed(() => { - const targetDirs = filteredPreviewItems.value.map(item => item.target_dir || getDirectoryPath(item.target)) - return getCommonPath(targetDirs) || '-' -}) - // 顶部媒体信息 const previewMediaInfo = computed(() => { const titles = getUniqueValues(filteredPreviewItems.value.map(item => item.title)) @@ -415,11 +370,7 @@ const previewFileRows = computed(() => { // 是否需要拓宽窗口 const previewNeedsWideLayout = computed(() => { - const candidates = [ - previewSourcePath.value, - previewTargetPath.value, - ...previewFileRows.value.map(item => `${item.sourceName}${item.targetName}`), - ] + const candidates = [...previewFileRows.value.map(item => `${item.sourceName}${item.targetName}`)] return candidates.some(item => item.length > 72) }) @@ -1014,18 +965,6 @@ onUnmounted(() => { {{ previewData.message }}
-
- {{ t('dialog.reorganize.previewSourcePath') }} - {{ - previewSourcePath - }} -
-
- {{ t('dialog.reorganize.previewTargetPath') }} - {{ - previewTargetPath - }} -
{{ t('dialog.reorganize.previewMediaName') }} {{ previewMediaInfo.title }} @@ -1286,10 +1225,6 @@ onUnmounted(() => { padding-inline: 1rem; } -.preview-overview-card--path { - grid-column: 1 / -1; -} - .preview-overview-card__label { color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity)); font-size: 0.75rem; @@ -1306,14 +1241,6 @@ onUnmounted(() => { white-space: nowrap; } -.preview-overview-card__value--path { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; - line-height: 1.5; - overflow-wrap: anywhere; - text-overflow: clip; - white-space: normal; -} - .reorganize-preview-pane__scroll { display: flex; overflow: hidden auto; @@ -1451,10 +1378,6 @@ onUnmounted(() => { grid-template-columns: 1fr; } - .preview-overview-card--path { - grid-column: auto; - } - .preview-file-row { grid-template-columns: 1fr; } diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 831ce4c7..7f63bde6 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -2525,8 +2525,6 @@ export default { previewTotal: 'Total {count}', previewSuccess: 'Success {count}', previewFailed: 'Failed {count}', - previewSourcePath: 'Source Path', - previewTargetPath: 'Target Path', previewMediaInfo: 'Media', previewMediaName: 'Name', previewMediaType: 'Type', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index c8773ab5..435f8835 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -2480,8 +2480,6 @@ export default { previewTotal: '总数 {count}', previewSuccess: '成功 {count}', previewFailed: '失败 {count}', - previewSourcePath: '原始路径', - previewTargetPath: '目的路径', previewMediaInfo: '媒体信息', previewMediaName: '名称', previewMediaType: '类型', diff --git a/src/locales/zh-TW.ts b/src/locales/zh-TW.ts index f2e804b1..c26c3723 100644 --- a/src/locales/zh-TW.ts +++ b/src/locales/zh-TW.ts @@ -2482,8 +2482,6 @@ export default { previewTotal: '總數 {count}', previewSuccess: '成功 {count}', previewFailed: '失敗 {count}', - previewSourcePath: '原始路徑', - previewTargetPath: '目的路徑', previewMediaInfo: '媒體資訊', previewMediaName: '名稱', previewMediaType: '類型',