chore: consolidate platform split checks
Some checks failed
Dependency Audit / dependency-audit (push) Has been cancelled
Module Matrix / module-matrix (push) Has been cancelled

This commit is contained in:
2026-07-10 12:51:19 +02:00
parent 150b720f12
commit 635d25c74c
216 changed files with 23336 additions and 4077 deletions

View File

@@ -1,4 +1,5 @@
import LoadingIndicator from "./LoadingIndicator";
import { usePlatformLanguage } from "../i18n/LanguageContext";
type LoadingFrameProps = {
children: React.ReactNode;
@@ -7,20 +8,22 @@ type LoadingFrameProps = {
className?: string;
};
export default function LoadingFrame({ children, loading = false, label = "Loading data", className = "" }: LoadingFrameProps) {
export default function LoadingFrame({ children, loading = false, label = "i18n:govoplan-core.loading_data.089f19c5", className = "" }: LoadingFrameProps) {
const { translateText } = usePlatformLanguage();
const translatedLabel = translateText(label);
const classNames = ["loading-frame", loading ? "is-loading" : "", className].filter(Boolean).join(" ");
return (
<div className={classNames} aria-busy={loading || undefined}>
{children}
{loading && (
<div className="loading-frame-overlay" role="status" aria-live="polite">
{loading &&
<div className="loading-frame-overlay" role="status" aria-live="polite">
<div className="loading-frame-panel">
<LoadingIndicator label={label} size="md" />
<span>{label}</span>
<LoadingIndicator label={translatedLabel} size="md" />
<span>{translatedLabel}</span>
</div>
</div>
)}
</div>
);
}
}
</div>);
}