tg app fix

This commit is contained in:
xds
2025-10-28 10:01:20 +03:00
parent 310bc974f4
commit 63bf5b9027
2 changed files with 12 additions and 2 deletions

View File

@@ -59,10 +59,19 @@ function setupBackButton() {
}
}
const isNavVisible = ref(true)
// Обработчики для показа/скрытия навигации
const hideNav = () => isNavVisible.value = false
const showNav = () => isNavVisible.value = true
onMounted(() => {
toolbarStore.registerHandler("openSpacePicker", () => {
isSpaceSelectorVisible.value = true;
});
document.addEventListener('focusin', hideNav)
document.addEventListener('focusout', showNav)
if (tgApp.initData) {
try {
@@ -90,6 +99,8 @@ watch(
onBeforeUnmount(() => {
toolbarStore.unregisterHandler("openSpacePicker");
document.removeEventListener('focusin', hideNav)
document.removeEventListener('focusout', showNav)
tgApp?.BackButton?.hide();
if (backHandler) tgApp?.BackButton?.offClick(backHandler);
});
@@ -111,7 +122,7 @@ onBeforeUnmount(() => {
<router-view class="w-full" />
</div>
<nav
<nav v-if="isNavVisible"
class="fixed inset-x-0 bottom-4 z-50 w-full flex justify-center items-center"
style="padding-bottom: var(--tg-content-safe-area-inset-bottom) !important;"
>