This commit is contained in:
LTbinglingfeng
2026-01-31 02:03:17 +08:00
parent e4c5f80b02
commit 3d33958d9e
6 changed files with 67 additions and 22 deletions

View File

@@ -22,6 +22,7 @@ export function AmpcodeSection({
onEdit,
}: AmpcodeSectionProps) {
const { t } = useTranslation();
const showLoadingPlaceholder = loading && !config;
return (
<>
@@ -42,7 +43,7 @@ export function AmpcodeSection({
</Button>
}
>
{loading ? (
{showLoadingPlaceholder ? (
<div className="hint">{t('common.loading')}</div>
) : (
<>

View File

@@ -34,7 +34,7 @@ export function ProviderList<T>({
}: ProviderListProps<T>) {
const { t } = useTranslation();
if (loading) {
if (loading && items.length === 0) {
return <div className="hint">{t('common.loading')}</div>;
}