Kraft102's picture
fix: sql.js Docker/Alpine compatibility layer for PatternMemory and FailureMemory
5a81b95
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WidgeTDC - Enterprise AI Dashboard</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
overflow: hidden;
}
#app {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
}
.titlebar {
height: 32px;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
padding: 0 16px;
-webkit-app-region: drag;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.titlebar h1 {
font-size: 13px;
font-weight: 500;
opacity: 0.9;
}
.container {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px;
}
.container.hidden {
display: none;
}
.logo {
width: 120px;
height: 120px;
background: rgba(255, 255, 255, 0.1);
border-radius: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 48px;
margin-bottom: 32px;
backdrop-filter: blur(10px);
border: 2px solid rgba(255, 255, 255, 0.2);
}
h1 {
font-size: 48px;
font-weight: 700;
margin-bottom: 16px;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
p {
font-size: 18px;
opacity: 0.9;
margin-bottom: 32px;
text-align: center;
max-width: 600px;
}
.status {
background: rgba(255, 255, 255, 0.1);
padding: 16px 32px;
border-radius: 12px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
margin-bottom: 24px;
}
.status-indicator {
display: flex;
align-items: center;
gap: 12px;
}
.status-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: #4ade80;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.buttons {
display: flex;
gap: 16px;
}
button {
padding: 14px 32px;
font-size: 16px;
font-weight: 600;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s;
background: rgba(255, 255, 255, 0.9);
color: #667eea;
}
button:hover {
background: #fff;
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
button.secondary {
background: rgba(255, 255, 255, 0.1);
color: #fff;
border: 1px solid rgba(255, 255, 255, 0.3);
}
button.secondary:hover {
background: rgba(255, 255, 255, 0.2);
}
.info {
margin-top: 40px;
font-size: 14px;
opacity: 0.7;
}
#iframe-container {
display: none;
width: 100%;
height: calc(100% - 32px);
}
#iframe-container.active {
display: block;
}
#dashboard-frame {
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<div id="app">
<div class="titlebar">
<h1>WidgeTDC - Enterprise AI Dashboard</h1>
</div>
<div class="container" id="welcome-screen">
<div class="logo">🚀</div>
<h1>WidgeTDC</h1>
<p>Enterprise-grade AI-powered dashboard platform with advanced cognitive capabilities</p>
<div class="status">
<div class="status-indicator">
<div class="status-dot"></div>
<span id="status-text">System Ready</span>
</div>
</div>
<div class="buttons">
<button onclick="loadDashboard()">Launch Dashboard</button>
<button class="secondary" onclick="openSettings()">Settings</button>
</div>
<div class="info">
<p>Version 1.0.0 | Platform: <span id="platform"></span></p>
</div>
</div>
<div id="iframe-container">
<iframe id="dashboard-frame" src="http://localhost:5173"></iframe>
</div>
</div>
<script>
// Debug logging
console.log('Renderer process loaded');
console.log('electronAPI available:', !!window.electronAPI);
// Display platform info
if (window.electronAPI) {
document.getElementById('platform').textContent = window.electronAPI.platform;
console.log('Platform:', window.electronAPI.platform);
} else {
document.getElementById('platform').textContent = 'unknown';
console.warn('electronAPI not available - running in browser mode');
}
function loadDashboard() {
console.log('loadDashboard called');
const welcomeScreen = document.getElementById('welcome-screen');
const iframeContainer = document.getElementById('iframe-container');
if (welcomeScreen) {
welcomeScreen.classList.add('hidden');
}
if (iframeContainer) iframeContainer.classList.add('active');
}
function openSettings() {
alert('Settings panel coming soon!\n\nFor now, you can configure:\n- Backend URL\n- Theme\n- Notifications');
}
// Ensure welcome screen is visible on load
window.addEventListener('DOMContentLoaded', () => {
console.log('DOM Content Loaded');
const welcomeScreen = document.getElementById('welcome-screen');
if (welcomeScreen) {
welcomeScreen.classList.remove('hidden');
}
});
// Auto-load dashboard after 3 seconds (can be disabled)
setTimeout(() => {
console.log('Auto-load timer complete');
// Uncomment to auto-load:
// loadDashboard();
}, 3000);
</script>
</body>
</html>