diff --git a/web/app/components/plugins/card/base/org-info.tsx b/web/app/components/plugins/card/base/org-info.tsx
index ed184b8bd8..d68f31cf37 100644
--- a/web/app/components/plugins/card/base/org-info.tsx
+++ b/web/app/components/plugins/card/base/org-info.tsx
@@ -4,7 +4,6 @@ type Props = {
orgName: string
packageName: string
packageNameClassName?: string
- isLoading?: boolean
}
const OrgInfo = ({
@@ -12,32 +11,16 @@ const OrgInfo = ({
orgName,
packageName,
packageNameClassName,
- isLoading = false,
}: Props) => {
- const LoadingPlaceholder = ({ width }: { width: string }) => (
-
- )
return (
- {isLoading
- ? (
-
- )
- : (
- {orgName}
- )}
+ {orgName}
- {isLoading ? '·' : '/'}
+ /
+
+
+ {packageName}
- {isLoading
- ? (
-
- )
- : (
-
- {packageName}
-
- )}
)
}
diff --git a/web/app/components/plugins/card/base/placeholder.tsx b/web/app/components/plugins/card/base/placeholder.tsx
new file mode 100644
index 0000000000..a8b106a40b
--- /dev/null
+++ b/web/app/components/plugins/card/base/placeholder.tsx
@@ -0,0 +1,46 @@
+import { Group } from '../../../base/icons/src/vender/other'
+import Title from './title'
+import cn from '@/utils/classnames'
+
+type Props = {
+ wrapClassName: string
+ loadingFileName: string
+}
+
+export const LoadingPlaceholder = ({ className }: { className?: string }) => (
+
+)
+
+const Placeholder = ({
+ wrapClassName,
+ loadingFileName,
+}: Props) => {
+ return (
+
+ )
+}
+
+export default Placeholder
diff --git a/web/app/components/plugins/card/index.tsx b/web/app/components/plugins/card/index.tsx
index 75ff9236a9..6b9432633a 100644
--- a/web/app/components/plugins/card/index.tsx
+++ b/web/app/components/plugins/card/index.tsx
@@ -2,11 +2,11 @@ import React from 'react'
import { RiVerifiedBadgeLine } from '@remixicon/react'
import type { Plugin } from '../types'
import Icon from '../card/base/card-icon'
-import { Group } from '../../base/icons/src/vender/other'
import CornerMark from './base/corner-mark'
import Title from './base/title'
import OrgInfo from './base/org-info'
import Description from './base/description'
+import Placeholder from './base/placeholder'
import cn from '@/utils/classnames'
import type { Locale } from '@/i18n'
@@ -41,45 +41,40 @@ const Card = ({
const getLocalizedText = (obj: Record | undefined) =>
obj?.[locale] || obj?.['en-US'] || ''
- const LoadingPlaceholder = ({ className }: { className?: string }) => (
-
- )
+ const wrapClassName = cn('relative p-4 pb-3 border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg hover-bg-components-panel-on-panel-item-bg rounded-xl shadow-xs', className)
+ if (isLoading) {
+ return (
+
+ )
+ }
return (
- {!hideCornerMark && !isLoading &&
}
+ {!hideCornerMark &&
}
{/* Header */}
- {isLoading
- ? (
)
- :
}
+
-
- {!isLoading && }
+
+
{titleLeft} {/* This can be version badge */}
- {isLoading
- ?
- :
}
+
{footer &&
{footer}
}
)