Skip to content

Commit

Permalink
fix messaging window height resize
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Dec 17, 2024
1 parent 635212d commit 52da761
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions components/tabs/MessagingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }"
>
<!-- Header -->
<div
Expand Down Expand Up @@ -419,9 +420,21 @@ const closeStartOverlay = () => {
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
Expand Down Expand Up @@ -593,6 +606,7 @@ const sendPrivately = async () => {
accountStore.getDecimalBalanceTransferable(incogniteeSidechain.value) <
3 * INCOGNITEE_TX_FEE
) {
txStatus.value = "";
alert("Insufficient balance");
return;
}
Expand Down

0 comments on commit 52da761

Please sign in to comment.