release: v1.4.1 — Telegram nav (windowed, own back button, debug panel) #129
@@ -14,6 +14,10 @@ interface TelegramWebApp {
|
|||||||
themeParams?: TelegramThemeParams;
|
themeParams?: TelegramThemeParams;
|
||||||
colorScheme?: 'light' | 'dark';
|
colorScheme?: 'light' | 'dark';
|
||||||
isFullscreen?: boolean;
|
isFullscreen?: boolean;
|
||||||
|
isExpanded?: boolean;
|
||||||
|
viewportHeight?: number;
|
||||||
|
viewportStableHeight?: number;
|
||||||
|
exitFullscreen?: () => void;
|
||||||
safeAreaInset?: { top: number; bottom: number; left: number; right: number };
|
safeAreaInset?: { top: number; bottom: number; left: number; right: number };
|
||||||
contentSafeAreaInset?: { top: number; bottom: number; left: number; right: number };
|
contentSafeAreaInset?: { top: number; bottom: number; left: number; right: number };
|
||||||
ready?: () => void;
|
ready?: () => void;
|
||||||
@@ -469,6 +473,25 @@ export function collectTelegramDiag(): TelegramDiag {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* telegramChromeDiag is a TEMPORARY on-device readout of Telegram's viewport / fullscreen state,
|
||||||
|
* rendered in the lobby to debug the Android fullscreen-persistence issue (the app still opens
|
||||||
|
* fullscreen on Android even though requestFullscreen is now iOS-only). REMOVE before merge.
|
||||||
|
*/
|
||||||
|
export function telegramChromeDiag(): string {
|
||||||
|
const w = webApp();
|
||||||
|
if (!w) return 'no telegram';
|
||||||
|
const ih = typeof window === 'undefined' ? 0 : window.innerHeight;
|
||||||
|
const sh = typeof screen === 'undefined' ? 0 : screen.height;
|
||||||
|
return [
|
||||||
|
`platform: ${w.platform ?? '—'} version: ${w.version ?? '—'}`,
|
||||||
|
`isFullscreen: ${w.isFullscreen} isExpanded: ${w.isExpanded}`,
|
||||||
|
`viewportH: ${w.viewportHeight ?? '—'} stableH: ${w.viewportStableHeight ?? '—'}`,
|
||||||
|
`innerH: ${ih} screenH: ${sh}`,
|
||||||
|
`contentSafeTop: ${w.contentSafeAreaInset?.top ?? '—'} safeTop: ${w.safeAreaInset?.top ?? '—'}`,
|
||||||
|
].join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
// --- Login Widget (web sign-in for account linking) ---
|
// --- Login Widget (web sign-in for account linking) ---
|
||||||
|
|
||||||
// The Login Widget is the web (non-Mini-App) Telegram sign-in. It is used only to
|
// The Login Widget is the web (non-Mini-App) Telegram sign-in. It is used only to
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
import { gateway } from '../lib/gateway';
|
import { gateway } from '../lib/gateway';
|
||||||
import { navigate } from '../lib/router.svelte';
|
import { navigate } from '../lib/router.svelte';
|
||||||
import { t } from '../lib/i18n/index.svelte';
|
import { t } from '../lib/i18n/index.svelte';
|
||||||
|
import { insideTelegram, telegramChromeDiag } from '../lib/telegram'; // TEMP diag — remove before merge
|
||||||
import { resultBadge } from '../lib/result';
|
import { resultBadge } from '../lib/result';
|
||||||
import { badgeKind } from '../lib/unread';
|
import { badgeKind } from '../lib/unread';
|
||||||
import { getLobby, setLobby } from '../lib/lobbycache';
|
import { getLobby, setLobby } from '../lib/lobbycache';
|
||||||
@@ -223,6 +224,12 @@
|
|||||||
|
|
||||||
<Screen title={app.profile?.displayName ?? t('app.title')}>
|
<Screen title={app.profile?.displayName ?? t('app.title')}>
|
||||||
<div class="lobby">
|
<div class="lobby">
|
||||||
|
<!-- TEMP DIAGNOSTIC (Android fullscreen debug) — REMOVE before merge -->
|
||||||
|
{#if insideTelegram()}
|
||||||
|
<pre
|
||||||
|
style="margin:0 0 8px;padding:8px;font:11px/1.4 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg-elev);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text)"
|
||||||
|
>{telegramChromeDiag()}</pre>
|
||||||
|
{/if}
|
||||||
{#if invitations.length}
|
{#if invitations.length}
|
||||||
<section>
|
<section>
|
||||||
<h2>{t('lobby.invitations')}</h2>
|
<h2>{t('lobby.invitations')}</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user