From 9c635ae7e63d1991f2b03a63bc3743432672ccfc Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Wed, 11 Dec 2024 18:16:17 +0100 Subject: [PATCH] Mini Apps: Support fullscreen button and visibility_changed event (#5292) --- .../modals/webApp/WebAppModal.module.scss | 4 +++ src/components/modals/webApp/WebAppModal.tsx | 18 +++++++++++++ .../modals/webApp/WebAppModalTabContent.tsx | 25 +++++++++++++++++++ src/types/webapp.ts | 3 +++ 4 files changed, 50 insertions(+) diff --git a/src/components/modals/webApp/WebAppModal.module.scss b/src/components/modals/webApp/WebAppModal.module.scss index 30fea2142..33d9619cd 100644 --- a/src/components/modals/webApp/WebAppModal.module.scss +++ b/src/components/modals/webApp/WebAppModal.module.scss @@ -290,6 +290,10 @@ height: 1.75rem !important; } +.fullscreenButton { + margin-right: 0.5rem; +} + .tab-close-button { transition: opacity 0.25s ease-in-out; opacity: 0; diff --git a/src/components/modals/webApp/WebAppModal.tsx b/src/components/modals/webApp/WebAppModal.tsx index e7636c161..59fedec9d 100644 --- a/src/components/modals/webApp/WebAppModal.tsx +++ b/src/components/modals/webApp/WebAppModal.tsx @@ -306,6 +306,10 @@ const WebAppModal: FC = ({ changeWebAppModalState({ state: 'minimized' }); }); + const handleFullscreenClick = useLastCallback(() => { + changeWebAppModalState({ state: 'fullScreen' }); + }); + const handleOpenMoreAppsTabClick = useLastCallback(() => { openMoreAppsTab(); }); @@ -588,6 +592,20 @@ const WebAppModal: FC = ({ {renderTabs()} {renderMoreMenu()} + +