mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
chore: fix type check for i18n (#30058)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@ -72,7 +72,7 @@ const OperationSelector: FC<OperationSelectorProps> = ({
|
||||
className={`system-sm-regular overflow-hidden truncate text-ellipsis
|
||||
${selectedItem ? 'text-components-input-text-filled' : 'text-components-input-text-disabled'}`}
|
||||
>
|
||||
{selectedItem?.name ? t(`${i18nPrefix}.operations.${selectedItem?.name}`) : t(`${i18nPrefix}.operations.title`)}
|
||||
{selectedItem?.name ? t(`${i18nPrefix}.operations.${selectedItem?.name}` as any) as string : t(`${i18nPrefix}.operations.title` as any) as string}
|
||||
</span>
|
||||
</div>
|
||||
<RiArrowDownSLine className={`h-4 w-4 text-text-quaternary ${disabled && 'text-components-input-text-placeholder'} ${open && 'text-text-secondary'}`} />
|
||||
@ -83,7 +83,7 @@ const OperationSelector: FC<OperationSelectorProps> = ({
|
||||
<div className="flex w-[140px] flex-col items-start rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur shadow-lg">
|
||||
<div className="flex flex-col items-start self-stretch p-1">
|
||||
<div className="flex items-start self-stretch px-3 pb-0.5 pt-1">
|
||||
<div className="system-xs-medium-uppercase flex grow text-text-tertiary">{t(`${i18nPrefix}.operations.title`)}</div>
|
||||
<div className="system-xs-medium-uppercase flex grow text-text-tertiary">{t(`${i18nPrefix}.operations.title` as any) as string}</div>
|
||||
</div>
|
||||
{items.map(item => (
|
||||
item.value === 'divider'
|
||||
@ -100,7 +100,7 @@ const OperationSelector: FC<OperationSelectorProps> = ({
|
||||
}}
|
||||
>
|
||||
<div className="flex min-h-5 grow items-center gap-1 px-1">
|
||||
<span className="system-sm-medium flex grow text-text-secondary">{t(`${i18nPrefix}.operations.${item.name}`)}</span>
|
||||
<span className="system-sm-medium flex grow text-text-secondary">{t(`${i18nPrefix}.operations.${item.name}` as any) as string}</span>
|
||||
</div>
|
||||
{item.value === value && (
|
||||
<div className="flex items-center justify-center">
|
||||
|
||||
@ -73,7 +73,7 @@ const NodeComponent: FC<NodeProps<AssignerNodeType>> = ({
|
||||
nodeType={node?.data.type}
|
||||
nodeTitle={node?.data.title}
|
||||
rightSlot={
|
||||
writeMode && <Badge className="!ml-auto shrink-0" text={t(`${i18nPrefix}.operations.${writeMode}`)} />
|
||||
writeMode && <Badge className="!ml-auto shrink-0" text={t(`${i18nPrefix}.operations.${writeMode}` as any) as string} />
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user