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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user