From 52da761a7c440c5aec37d12e290bb3fecc3c2f43 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Tue, 17 Dec 2024 11:14:10 +0100 Subject: [PATCH] fix messaging window height resize --- components/tabs/MessagingTab.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/tabs/MessagingTab.vue b/components/tabs/MessagingTab.vue index e44dcb2..669a6e9 100644 --- a/components/tabs/MessagingTab.vue +++ b/components/tabs/MessagingTab.vue @@ -176,6 +176,7 @@ v-if="!isMobile || showChatDetail" :class="isMobile ? 'w-full' : 'md:w-2/3'" class="bg-incognitee-blue flex flex-col h-screen relative" + :style="{ height: chatWindowHeight }" >
{ showStartOverlay.value = false; }; +const chatWindowHeight = ref("calc(100vh - 12rem)"); + +const adjustChatWindowHeight = () => { + const viewportHeight = window.innerHeight; + chatWindowHeight.value = `${viewportHeight}px`; +}; // Ensure overlay is shown on reload onMounted(() => { showStartOverlay.value = false; + window.addEventListener("resize", adjustChatWindowHeight); + adjustChatWindowHeight(); +}); + +onUnmounted(() => { + window.removeEventListener("resize", adjustChatWindowHeight); }); // Reaktive Variable für das Overlay @@ -593,6 +606,7 @@ const sendPrivately = async () => { accountStore.getDecimalBalanceTransferable(incogniteeSidechain.value) < 3 * INCOGNITEE_TX_FEE ) { + txStatus.value = ""; alert("Insufficient balance"); return; }