diff --git a/src/pages/UsagePage.module.scss b/src/pages/UsagePage.module.scss index ad130c0..4c6533c 100644 --- a/src/pages/UsagePage.module.scss +++ b/src/pages/UsagePage.module.scss @@ -3,9 +3,11 @@ .container { width: 100%; + min-height: 100%; display: flex; flex-direction: column; gap: 20px; + position: relative; } .header { @@ -39,6 +41,44 @@ padding: 16px; } +.loadingOverlay { + position: absolute; + inset: 0; + z-index: 20; + display: flex; + align-items: center; + justify-content: center; + background: rgba(243, 244, 246, 0.75); + backdrop-filter: blur(6px); + -webkit-backdrop-filter: blur(6px); +} + +:global([data-theme='dark']) .loadingOverlay { + background: rgba(25, 25, 25, 0.72); +} + +.loadingOverlayContent { + display: inline-flex; + align-items: center; + gap: 10px; + padding: 12px 16px; + border-radius: $radius-lg; + border: 1px solid var(--border-color); + background: var(--bg-primary); + box-shadow: var(--shadow-lg); + + :global(.loading-spinner) { + border-color: rgba(59, 130, 246, 0.25); + border-top-color: var(--primary-color); + } +} + +.loadingOverlayText { + font-size: 13px; + font-weight: 600; + color: var(--text-secondary); +} + // Stats Grid .statsGrid { display: grid; diff --git a/src/pages/UsagePage.tsx b/src/pages/UsagePage.tsx index 30a4d0f..e90fffc 100644 --- a/src/pages/UsagePage.tsx +++ b/src/pages/UsagePage.tsx @@ -16,6 +16,7 @@ import { Line } from 'react-chartjs-2'; import { Card } from '@/components/ui/Card'; import { Button } from '@/components/ui/Button'; import { Input } from '@/components/ui/Input'; +import { LoadingSpinner } from '@/components/ui/LoadingSpinner'; import { IconDiamond, IconDollarSign, IconSatellite, IconTimer, IconTrendingUp } from '@/components/ui/icons'; import { useMediaQuery } from '@/hooks/useMediaQuery'; import { useThemeStore } from '@/stores'; @@ -516,6 +517,14 @@ export function UsagePage() { return (