/** * CyberSim OS - Inlook Email Application */ export class InlookApp { constructor({ windowManager, eventBus, notifications, scenario, onNavigateUrl, onOpenDoc, onFileDownloaded }) { this.wm = windowManager; this.eventBus = eventBus; this.notifications = notifications; this.scenario = scenario; this.onNavigateUrl = onNavigateUrl; this.onOpenDoc = onOpenDoc; this.onFileDownloaded = onFileDownloaded; this.currentFolder = 'inbox'; this.activeEmailId = null; this.emails = JSON.parse(JSON.stringify(scenario.emails)); } getIconSvg() { return ``; } launch() { const win = this.wm.createWindow({ id: 'inlook', title: 'Inlook Mail - NexaCore Workplace', iconSvg: this.getIconSvg(), width: 860, height: 560, bodyContent: this.renderShell() }); this.bindEvents(win.bodyElement); this.selectFirstEmail(); this.eventBus.emit('APP_OPENED', { target: 'inlook' }); } renderShell() { return `
You are about to report the following email to the NexaCore Security Operations Center: