chore: file to files

This commit is contained in:
Joel
2026-03-26 18:07:14 +08:00
parent 4169f0e5d0
commit 3cb7a5b613
7 changed files with 9 additions and 8 deletions

View File

@ -82,7 +82,7 @@ const FilePreviewPanel = ({ resourceId, currentNode, className, style, onClose }
if (!canOpenInEditor)
return
const nextUrl = new URL(window.location.href)
nextUrl.searchParams.set('view', 'file')
nextUrl.searchParams.set('view', 'files')
nextUrl.searchParams.set('fileId', resourceId)
window.open(nextUrl.toString(), '_blank', 'noopener,noreferrer')
}, [canOpenInEditor, resourceId])

View File

@ -606,6 +606,6 @@ export type Block = {
export const ViewType = {
graph: 'graph',
file: 'file',
files: 'files',
} as const
export type ViewType = typeof ViewType[keyof typeof ViewType]

View File

@ -24,7 +24,7 @@ const ViewPicker: FC<ViewPickerProps> = ({
const { t } = useTranslation()
const options = useMemo(() => ([
{ value: ViewType.graph, text: t('viewPicker.graph', { ns: 'workflow' }), disabled: disabled && value !== ViewType.graph },
{ value: ViewType.file, text: t('viewPicker.file', { ns: 'workflow' }), disabled: disabled && value !== ViewType.file },
{ value: ViewType.files, text: t('viewPicker.files', { ns: 'workflow' }), disabled: disabled && value !== ViewType.files },
]), [t, disabled, value])
const handleChange = useCallback((nextValue: string | number | symbol) => {