192 lines
4.3 KiB
HTML
Raw Normal View History

2025-06-13 23:21:32 +02:00
<!DOCTYPE html>
<html>
<head>
<title>OpenDia Browser Bridge</title>
<style>
:root {
--primary-color: #2563eb;
--success-color: #22c55e;
--error-color: #ef4444;
--bg-color: #ffffff;
--text-color: #1f2937;
--border-color: #e5e7eb;
--hover-color: #1d4ed8;
}
body {
width: 380px;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
color: var(--text-color);
background: var(--bg-color);
margin: 0;
}
.header {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.logo {
width: 32px;
height: 32px;
margin-right: 12px;
background: var(--primary-color);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: bold;
}
h2 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
}
.status {
display: flex;
align-items: center;
margin-bottom: 20px;
padding: 12px;
background: #f8fafc;
border-radius: 8px;
border: 1px solid var(--border-color);
}
.status-indicator {
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 12px;
transition: background-color 0.3s ease;
}
.connected {
background-color: var(--success-color);
box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}
.disconnected {
background-color: var(--error-color);
box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
.info {
background-color: #f8fafc;
padding: 16px;
border-radius: 8px;
margin-bottom: 16px;
border: 1px solid var(--border-color);
}
.info-row {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-label {
color: #6b7280;
font-size: 0.875rem;
}
.info-value {
font-weight: 500;
}
.button-group {
display: flex;
gap: 8px;
margin-bottom: 16px;
}
button {
background-color: var(--primary-color);
color: white;
border: none;
padding: 10px 16px;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
font-size: 0.875rem;
transition: background-color 0.2s ease;
flex: 1;
}
button:hover {
background-color: var(--hover-color);
}
.log {
background-color: #f8fafc;
border: 1px solid var(--border-color);
padding: 12px;
border-radius: 8px;
max-height: 200px;
overflow-y: auto;
font-size: 0.75rem;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.log-entry {
margin-bottom: 4px;
padding: 4px 0;
border-bottom: 1px solid var(--border-color);
}
.log-entry:last-child {
border-bottom: none;
}
.log-time {
color: #6b7280;
margin-right: 8px;
}
</style>
</head>
<body>
<div class="header">
<div class="logo">OD</div>
<h2>OpenDia Browser Bridge</h2>
</div>
<div class="status">
<div class="status-indicator" id="statusIndicator"></div>
<span id="statusText">Checking connection...</span>
</div>
<div class="info">
<div class="info-row">
<span class="info-label">Server</span>
<span class="info-value" id="serverUrl">ws://localhost:3000</span>
</div>
<div class="info-row">
<span class="info-label">Available Tools</span>
<span class="info-value" id="toolCount">0</span>
</div>
</div>
<div class="button-group">
<button id="reconnectBtn">Reconnect</button>
<button id="testBtn">Test Connection</button>
</div>
<div class="log" id="log">
<div class="log-entry">
<span class="log-time">[System]</span>
<span>Waiting for activity...</span>
</div>
</div>
<script src="popup.js"></script>
</body>
</html>