From 54b90ed65d90cb693343ede431e08b413fd74639 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Sat, 8 Mar 2025 05:28:49 +0200 Subject: [PATCH] disable dev mode option when on web --- src/components/Chat/MessageDisplay.tsx | 6 +++++- src/components/Group/Settings.tsx | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Chat/MessageDisplay.tsx b/src/components/Chat/MessageDisplay.tsx index a686a00..52d0d93 100644 --- a/src/components/Chat/MessageDisplay.tsx +++ b/src/components/Chat/MessageDisplay.tsx @@ -98,7 +98,11 @@ export const MessageDisplay = ({ htmlContent, isReply }) => { const target = e.target; if (target.tagName === 'A') { const href = target.getAttribute('href'); - window.electronAPI.openExternal(href); + if(window?.electronAPI){ + window.electronAPI.openExternal(href); + } else { + window.open(href, '_system'); + } } else if (target.getAttribute('data-url')) { const url = target.getAttribute('data-url'); diff --git a/src/components/Group/Settings.tsx b/src/components/Group/Settings.tsx index f14483c..2aba6f6 100644 --- a/src/components/Group/Settings.tsx +++ b/src/components/Group/Settings.tsx @@ -186,7 +186,8 @@ export const Settings = ({ } label="Disable all push notifications" /> - + )}