diff --git a/src/background.ts b/src/background.ts
index 40e6e30..68443d3 100644
--- a/src/background.ts
+++ b/src/background.ts
@@ -2830,6 +2830,8 @@ async function getChatHeadsDirect() {
chrome?.runtime?.onMessage.addListener((request, sender, sendResponse) => {
if (request) {
+ console.log('REQUEST MESSAGE', request)
+
switch (request.action) {
case "version":
// Example: respond with the version
diff --git a/src/components/Apps/AppInfo.tsx b/src/components/Apps/AppInfo.tsx
index eb1c686..af4787f 100644
--- a/src/components/Apps/AppInfo.tsx
+++ b/src/components/Apps/AppInfo.tsx
@@ -87,7 +87,11 @@ export const AppInfo = ({ app }) => {
- {
+ executeEvent("addTab", {
+ data: app
+ })
+ }} sx={{
backgroundColor: isInstalled ? '#0091E1' : '#247C0E',
width: '100%',
maxWidth: '320px',
diff --git a/src/components/Apps/AppInfoSnippet.tsx b/src/components/Apps/AppInfoSnippet.tsx
index 26d0935..9153945 100644
--- a/src/components/Apps/AppInfoSnippet.tsx
+++ b/src/components/Apps/AppInfoSnippet.tsx
@@ -88,7 +88,11 @@ export const AppInfoSnippet = ({ app }) => {
- {
+ executeEvent("addTab", {
+ data: app
+ })
+ }} sx={{
backgroundColor: isInstalled ? '#0091E1' : '#247C0E',
}}>
diff --git a/src/components/Apps/AppViewer.tsx b/src/components/Apps/AppViewer.tsx
index 6992127..3f9486d 100644
--- a/src/components/Apps/AppViewer.tsx
+++ b/src/components/Apps/AppViewer.tsx
@@ -21,22 +21,27 @@ import LogoSelected from "../../assets/svgs/LogoSelected.svg";
import { Spacer } from "../../common/Spacer";
import { executeEvent } from "../../utils/events";
+import { useFrame } from "react-frame-component";
+import { useQortalMessageListener } from "./useQortalMessageListener";
+
+
+
export const AppViewer = ({ app }) => {
const { rootHeight } = useContext(MyContext);
const iframeRef = useRef(null);
-
+ const { document, window } = useFrame();
+ useQortalMessageListener(window)
const url = useMemo(()=> {
return `${getBaseApiReact()}/render/${app?.service}/${app?.name}${app?.path != null ? app?.path : ''}?theme=dark&identifier=${(app?.identifier != null && app?.identifier != 'null') ? app?.identifier : ''}`
}, [app?.service, app?.name, app?.identifier, app?.path])
-
return (