mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat: add Spinner and LoadingState components for unified loading UX
Introduces two reusable loading components to standardize loading states: - Spinner: Base spinner with accessibility support (role, aria-label) - LoadingState: Semantic loading indicator combining spinner and label Updates loading patterns across the app: - Full-screen/block loading now uses LoadingState (App, router, files, file) - Inline button loading states show spinner + text with aria-busy - Message list loading replaced with MessageSkeleton component - Removes duplicate SpinnerIcon definition from PermissionFooter Improves UX and accessibility: - Loading screens centered and full-height - Consistent ellipsis character (…) - Semantic accessibility (role="status", aria-live, aria-busy) - Adds CSS variables for banner styling
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
--app-link: var(--tg-theme-link-color, #111827);
|
||||
--app-button: var(--tg-theme-button-color, #111827);
|
||||
--app-button-text: var(--tg-theme-button-text-color, #ffffff);
|
||||
--app-banner-bg: var(--tg-theme-button-color, #111827);
|
||||
--app-banner-text: var(--tg-theme-button-text-color, #ffffff);
|
||||
--app-secondary-bg: var(--tg-theme-secondary-bg-color, #f3f4f6);
|
||||
|
||||
/* Theme-aware colors (light mode defaults) */
|
||||
@@ -51,6 +53,8 @@
|
||||
--app-link: var(--tg-theme-link-color, #ffffff);
|
||||
--app-button: var(--tg-theme-button-color, #ffffff);
|
||||
--app-button-text: var(--tg-theme-button-text-color, #111827);
|
||||
--app-banner-bg: var(--tg-theme-button-color, #3A3A3C);
|
||||
--app-banner-text: var(--tg-theme-button-text-color, #ffffff);
|
||||
--app-secondary-bg: var(--tg-theme-secondary-bg-color, #2C2C2E);
|
||||
|
||||
--app-border: rgba(255, 255, 255, 0.1);
|
||||
|
||||
Reference in New Issue
Block a user