feat: frontend part of support try apps (#31287)

Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
This commit is contained in:
Joel
2026-01-22 18:16:37 +08:00
committed by GitHub
parent c575c34ca6
commit b9f718005c
130 changed files with 3233 additions and 685 deletions

View File

@ -10,6 +10,7 @@ type Props = {
value: boolean
required?: boolean
onChange: (value: boolean) => void
readonly?: boolean
}
const BoolInput: FC<Props> = ({
@ -17,6 +18,7 @@ const BoolInput: FC<Props> = ({
onChange,
name,
required,
readonly,
}) => {
const { t } = useTranslation()
const handleChange = useCallback(() => {
@ -28,6 +30,7 @@ const BoolInput: FC<Props> = ({
className="!h-4 !w-4"
checked={!!value}
onCheck={handleChange}
disabled={readonly}
/>
<div className="system-sm-medium flex items-center gap-1 text-text-secondary">
{name}

View File

@ -469,6 +469,7 @@ export enum SupportUploadFileTypes {
export type UploadFileSetting = {
allowed_file_upload_methods: TransferMethod[]
allowed_upload_methods?: TransferMethod[]
allowed_file_types: SupportUploadFileTypes[]
allowed_file_extensions?: string[]
max_length: number

View File

@ -61,12 +61,14 @@ type WorkflowPreviewProps = {
edges: Edge[]
viewport: Viewport
className?: string
miniMapToRight?: boolean
}
const WorkflowPreview = ({
nodes,
edges,
viewport,
className,
miniMapToRight,
}: WorkflowPreviewProps) => {
const [nodesData, setNodesData] = useState(() => initialNodes(nodes, edges))
const [edgesData, setEdgesData] = useState(() => initialEdges(edges, nodes))
@ -97,8 +99,7 @@ const WorkflowPreview = ({
height: 72,
}}
maskColor="var(--color-workflow-minimap-bg)"
className="!absolute !bottom-14 !left-4 z-[9] !m-0 !h-[72px] !w-[102px] !rounded-lg !border-[0.5px]
!border-divider-subtle !bg-background-default-subtle !shadow-md !shadow-shadow-shadow-5"
className={cn('!absolute !bottom-14 z-[9] !m-0 !h-[72px] !w-[102px] !rounded-lg !border-[0.5px] !border-divider-subtle !bg-background-default-subtle !shadow-md !shadow-shadow-shadow-5', miniMapToRight ? '!right-4' : '!left-4')}
/>
<div className="absolute bottom-4 left-4 z-[9] mt-1 flex items-center gap-2">
<ZoomInOut />