feat: enhance CSS and components for Telegram Mini App performance

- Updated CSS to utilize viewport variables for safe area insets and stable height, improving layout consistency across devices.
- Introduced haptic feedback triggers in various components to enhance user interaction, mimicking native Telegram behavior.
- Added functionality to detect Android performance class, minimizing animations on low-performance devices for better user experience.
- Refactored components to incorporate new CSS classes for content safety and improved responsiveness.
This commit is contained in:
2026-03-04 19:19:14 +03:00
parent 13aba85e28
commit 07e22079ee
15 changed files with 129 additions and 14 deletions

View File

@@ -8,6 +8,7 @@
import { useEffect } from "react";
import { getLang, translate } from "@/i18n/messages";
import { useAppStore } from "@/store/app-store";
import { triggerHapticLight } from "@/lib/telegram-haptic";
export interface AccessDeniedScreenProps {
/** Optional detail from API 403 response, shown below the hint. */
@@ -40,6 +41,7 @@ export function AccessDeniedScreen({
const hasDetail = Boolean(serverDetail && String(serverDetail).trim());
const handleClick = () => {
triggerHapticLight();
if (primaryAction === "reload") {
if (typeof window !== "undefined") {
window.location.reload();