disable dev mode option when on web

This commit is contained in:
PhilReact 2025-03-08 05:28:49 +02:00
parent 548ba9b29c
commit 54b90ed65d
2 changed files with 8 additions and 2 deletions

View File

@ -98,7 +98,11 @@ export const MessageDisplay = ({ htmlContent, isReply }) => {
const target = e.target; const target = e.target;
if (target.tagName === 'A') { if (target.tagName === 'A') {
const href = target.getAttribute('href'); 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')) { } else if (target.getAttribute('data-url')) {
const url = target.getAttribute('data-url'); const url = target.getAttribute('data-url');

View File

@ -186,7 +186,8 @@ export const Settings = ({
} }
label="Disable all push notifications" label="Disable all push notifications"
/> />
<FormControlLabel {window?.electronAPI && (
<FormControlLabel
sx={{ sx={{
color: "white", color: "white",
}} }}
@ -198,6 +199,7 @@ export const Settings = ({
} }
label="Enable dev mode" label="Enable dev mode"
/> />
)}
</Box> </Box>
</Dialog> </Dialog>
</React.Fragment> </React.Fragment>