mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
Add Telegram WebApp support: initialize app, enhance layout with fullscreen toggle, and improve polling mechanism in Wheel component
This commit is contained in:
23
src/vite-env.d.ts
vendored
23
src/vite-env.d.ts
vendored
@@ -25,12 +25,35 @@ interface TelegramWebApp {
|
||||
auth_date: number
|
||||
hash: string
|
||||
}
|
||||
version: string
|
||||
platform: string
|
||||
isExpanded: boolean
|
||||
isClosingConfirmationEnabled: boolean
|
||||
isVerticalSwipesEnabled: boolean
|
||||
isFullscreen: boolean
|
||||
isOrientationLocked: boolean
|
||||
safeAreaInset: { top: number; bottom: number; left: number; right: number }
|
||||
contentSafeAreaInset: { top: number; bottom: number; left: number; right: number }
|
||||
ready: () => void
|
||||
expand: () => void
|
||||
close: () => void
|
||||
openLink: (url: string, options?: { try_instant_view?: boolean; try_browser?: boolean }) => void
|
||||
openTelegramLink: (url: string) => void
|
||||
openInvoice: (url: string, callback?: (status: 'paid' | 'cancelled' | 'failed' | 'pending') => void) => void
|
||||
// Fullscreen API (Bot API 8.0+)
|
||||
requestFullscreen: () => void
|
||||
exitFullscreen: () => void
|
||||
lockOrientation: () => void
|
||||
unlockOrientation: () => void
|
||||
// Vertical swipes control
|
||||
disableVerticalSwipes: () => void
|
||||
enableVerticalSwipes: () => void
|
||||
// Closing confirmation
|
||||
enableClosingConfirmation: () => void
|
||||
disableClosingConfirmation: () => void
|
||||
// Event handlers
|
||||
onEvent: (eventType: string, callback: () => void) => void
|
||||
offEvent: (eventType: string, callback: () => void) => void
|
||||
MainButton: {
|
||||
text: string
|
||||
color: string
|
||||
|
||||
Reference in New Issue
Block a user