+5
![dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)
![autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)







Jingyi
GitHub
yyh
Joel
hjlarry
fatelei
Asuka Minato
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Xiyuan Chen
gigglewang
Yunlu Wen
chariri
Evan
yyh
9b74df21d0
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: yyh <[email protected]> Co-authored-by: Joel <[email protected]> Co-authored-by: hjlarry <[email protected]> Co-authored-by: fatelei <[email protected]> Co-authored-by: Asuka Minato <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Xiyuan Chen <[email protected]> Co-authored-by: gigglewang <[email protected]> Co-authored-by: Yunlu Wen <[email protected]> Co-authored-by: chariri <[email protected]> Co-authored-by: Evan <[email protected]> Co-authored-by: yyh <[email protected]>
57 lines
1.9 KiB
TypeScript
57 lines
1.9 KiB
TypeScript
'use client'
|
|
import { cn } from '@langgenius/dify-ui/cn'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { SkeletonContainer, SkeletonPoint, SkeletonRectangle } from '@/app/components/base/skeleton'
|
|
|
|
const PluginCardSkeleton = () => (
|
|
<div
|
|
data-testid="plugin-card-skeleton"
|
|
className="relative overflow-hidden rounded-xl border-[1.5px] border-background-section-burn bg-background-section-burn p-1"
|
|
>
|
|
<div className="relative z-10 rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg p-4 pb-3 shadow-xs">
|
|
<div className="flex">
|
|
<SkeletonRectangle className="size-10 shrink-0 animate-pulse rounded-xl" />
|
|
<div className="ml-3 w-0 grow">
|
|
<div className="flex h-5 items-center">
|
|
<SkeletonRectangle className="h-4 w-2/5 animate-pulse" />
|
|
</div>
|
|
<SkeletonContainer className="mt-0.5 h-4 gap-0">
|
|
<SkeletonRectangle className="h-3 w-4/5 animate-pulse" />
|
|
</SkeletonContainer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div className="mt-1.5 mb-1 flex h-4 items-center gap-x-2 px-4">
|
|
<SkeletonRectangle className="h-3 w-20 animate-pulse" />
|
|
<SkeletonPoint />
|
|
<SkeletonRectangle className="h-3 w-24 animate-pulse" />
|
|
</div>
|
|
</div>
|
|
)
|
|
|
|
type PluginListSkeletonProps = {
|
|
contentFrameClassName: string
|
|
}
|
|
|
|
const PluginListSkeleton = ({
|
|
contentFrameClassName,
|
|
}: PluginListSkeletonProps) => {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<div
|
|
role="status"
|
|
aria-label={t('loading', { ns: 'common' })}
|
|
className={cn('min-h-0 grow self-stretch bg-components-panel-bg', contentFrameClassName)}
|
|
>
|
|
<div className="grid grid-cols-1 gap-3 pb-3 lg:grid-cols-2">
|
|
{Array.from({ length: 6 }, (_, index) => (
|
|
<PluginCardSkeleton key={index} />
|
|
))}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default PluginListSkeleton
|