// Shared JavaScript across all pages console.log('CloudDesk Remote loaded'); // Simulate device data const devices = [ { id: 1, name: "Living Room PC", os: "windows", status: "online", lastSeen: "Just now" }, { id: 2, name: "Work MacBook Pro", os: "macos", status: "offline", lastSeen: "2 hours ago" }, { id: 3, name: "Gaming Rig", os: "windows", status: "online", lastSeen: "5 minutes ago" } ]; // Function to get device icon function getDeviceIcon(os) { switch(os.toLowerCase()) { case 'windows': return 'windows'; case 'macos': return 'monitor'; default: return 'monitor'; } } // Function to format status function formatStatus(status) { const statusClasses = { 'online': 'status-online', 'offline': 'status-offline', 'connecting': 'status-connecting' }; return `${status.charAt(0).toUpperCase() + status.slice(1)}`; } // Export functions for use in other modules window.CloudDesk = { devices, getDeviceIcon, formatStatus };