mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-18 14:27:20 +00:00
Open external links in a new tab instead of an iframe
Modify the openIframeWindow function in os.tsx to open external URLs in a new browser tab, as most external websites block iframe embedding. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 279f1558-c0e3-40e4-8217-be7e9f4c6eca Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: e5a5b8fb-9e45-4554-89ab-9518b18737f3 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/b984cb14-1d19-4944-922b-bc79e821ed35/279f1558-c0e3-40e4-8217-be7e9f4c6eca/2U7MTOE Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
ce2609f773
commit
cc24d3d90e
1 changed files with 2 additions and 18 deletions
|
|
@ -701,24 +701,8 @@ export default function AeThexOS() {
|
|||
};
|
||||
|
||||
const openIframeWindow = (url: string, title: string) => {
|
||||
const windowId = `iframe-${Date.now()}`;
|
||||
setWindows(prev => [...prev, {
|
||||
id: windowId,
|
||||
title,
|
||||
icon: <Globe className="w-4 h-4" />,
|
||||
component: 'iframe',
|
||||
x: 100 + Math.random() * 100,
|
||||
y: 100 + Math.random() * 100,
|
||||
width: 900,
|
||||
height: 600,
|
||||
minimized: false,
|
||||
maximized: false,
|
||||
zIndex: maxZIndex + 1,
|
||||
desktopId: currentDesktop,
|
||||
iframeUrl: url
|
||||
}]);
|
||||
setMaxZIndex(prev => prev + 1);
|
||||
setActiveWindowId(windowId);
|
||||
// Most external sites block iframe embedding - open in new tab instead
|
||||
window.open(url, '_blank', 'noopener,noreferrer');
|
||||
};
|
||||
|
||||
if (isBooting) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue