Initial release — Re-Commander v1.0
Local web-based control interface for the Jibo social robot via the ROM WebSocket API (port 8160) and on-device ASR (port 8088). Features head navigation via click-to-look and arrow keys, speech/listen/Voice-AI loop, display control, camera/photo capture, and entity tracking — no cloud dependency required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
376
public/style.css
Normal file
376
public/style.css
Normal file
@@ -0,0 +1,376 @@
|
||||
:root {
|
||||
--bg: #0e0e0e;
|
||||
--surface: #1a1a1a;
|
||||
--surface2: #242424;
|
||||
--border: #333;
|
||||
--accent: #00d4ff;
|
||||
--accent2: #0099bb;
|
||||
--text: #e8e8e8;
|
||||
--muted: #888;
|
||||
--danger: #ff4444;
|
||||
--success: #44dd88;
|
||||
--warn: #ffaa00;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: 'Segoe UI', system-ui, sans-serif;
|
||||
font-size: 14px;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 8px 16px;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
header h1 { font-size: 16px; font-weight: 600; letter-spacing: 0.05em; }
|
||||
header h1 span { color: var(--accent); }
|
||||
|
||||
#status-dot {
|
||||
width: 10px; height: 10px;
|
||||
border-radius: 50%;
|
||||
background: var(--danger);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
#status-dot.ok { background: var(--success); }
|
||||
#status-label { font-size: 12px; color: var(--muted); }
|
||||
#angle-display { margin-left: auto; font-size: 12px; color: var(--muted); font-family: monospace; }
|
||||
|
||||
#hotword-indicator {
|
||||
font-size: 12px; color: var(--muted); font-style: italic;
|
||||
opacity: 0; transition: opacity 0.2s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#hotword-indicator.active { opacity: 1; color: var(--accent); }
|
||||
|
||||
.main {
|
||||
display: grid;
|
||||
grid-template-columns: 340px 1fr 300px;
|
||||
gap: 0;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ── Left panel ── */
|
||||
.left-panel {
|
||||
background: var(--surface);
|
||||
border-right: 1px solid var(--border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* ── Center panel ── */
|
||||
.center-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12px;
|
||||
gap: 10px;
|
||||
background: var(--bg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ── Right panel ── */
|
||||
.right-panel {
|
||||
background: var(--surface);
|
||||
border-left: 1px solid var(--border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ── Sections ── */
|
||||
.section {
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--muted);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* ── Camera feed ── */
|
||||
#camera-wrap {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 640px;
|
||||
aspect-ratio: 640 / 480;
|
||||
background: #000;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
cursor: crosshair;
|
||||
border: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#camera-feed {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
#camera-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#click-dot {
|
||||
position: absolute;
|
||||
width: 16px; height: 16px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--accent);
|
||||
transform: translate(-50%, -50%);
|
||||
display: none;
|
||||
pointer-events: none;
|
||||
box-shadow: 0 0 8px var(--accent);
|
||||
}
|
||||
|
||||
#camera-no-feed {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#camera-no-feed canvas { display: none; }
|
||||
|
||||
/* ── Arrow pad ── */
|
||||
.arrow-pad {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 40px);
|
||||
grid-template-rows: repeat(3, 40px);
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.arrow-pad button {
|
||||
width: 40px; height: 40px;
|
||||
background: var(--surface2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
color: var(--text);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background 0.1s;
|
||||
user-select: none;
|
||||
}
|
||||
.arrow-pad button:hover { background: var(--accent2); border-color: var(--accent); }
|
||||
.arrow-pad button:active { background: var(--accent); }
|
||||
|
||||
/* ── Controls row ── */
|
||||
.controls-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* ── Buttons ── */
|
||||
button, .btn {
|
||||
background: var(--surface2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 5px;
|
||||
color: var(--text);
|
||||
padding: 5px 10px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
transition: background 0.1s, border-color 0.1s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
button:hover, .btn:hover { background: var(--accent2); border-color: var(--accent); }
|
||||
button.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }
|
||||
button.danger { border-color: var(--danger); }
|
||||
button.danger:hover { background: var(--danger); }
|
||||
|
||||
/* ── Inputs ── */
|
||||
input[type="text"], input[type="number"], select, textarea {
|
||||
background: var(--surface2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 5px;
|
||||
color: var(--text);
|
||||
padding: 5px 8px;
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
}
|
||||
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
|
||||
|
||||
input[type="range"] {
|
||||
width: 100%;
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; }
|
||||
|
||||
.row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
|
||||
.row label { margin: 0; flex-shrink: 0; }
|
||||
.row input, .row select { flex: 1; }
|
||||
|
||||
.field { margin-bottom: 8px; }
|
||||
|
||||
/* ── Photo strip ── */
|
||||
#photo-strip {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#photo-strip img {
|
||||
width: 80px; height: 60px;
|
||||
object-fit: cover;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
cursor: pointer;
|
||||
transition: border-color 0.1s;
|
||||
}
|
||||
#photo-strip img:hover { border-color: var(--accent); }
|
||||
|
||||
/* ── Event log ── */
|
||||
#event-log {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
font-family: monospace;
|
||||
font-size: 11px;
|
||||
padding: 8px;
|
||||
}
|
||||
.log-entry {
|
||||
padding: 2px 0;
|
||||
border-bottom: 1px solid var(--border);
|
||||
word-break: break-all;
|
||||
}
|
||||
.log-entry .ts { color: var(--muted); }
|
||||
.log-entry .evt { color: var(--accent); }
|
||||
.log-entry .evt-error { color: var(--danger); }
|
||||
.log-entry .evt-motion { color: var(--warn); }
|
||||
.log-entry .evt-entity { color: var(--success); }
|
||||
|
||||
/* ── Tabs ── */
|
||||
.tabs {
|
||||
display: flex;
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.tab-btn {
|
||||
flex: 1;
|
||||
padding: 7px 4px;
|
||||
background: none;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
border-radius: 0;
|
||||
}
|
||||
.tab-btn:hover { color: var(--text); background: none; border-color: transparent; }
|
||||
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: none; font-weight: 600; }
|
||||
|
||||
.tab-panel { display: none; padding: 10px 12px; overflow-y: auto; flex: 1; }
|
||||
.tab-panel.active { display: block; }
|
||||
|
||||
/* ── Attention grid ── */
|
||||
.attention-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* ── Listen result ── */
|
||||
#listen-result {
|
||||
background: var(--surface2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 5px;
|
||||
padding: 6px 8px;
|
||||
min-height: 40px;
|
||||
font-style: italic;
|
||||
color: var(--accent);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* ── Entity list ── */
|
||||
#entity-list { font-size: 12px; }
|
||||
.entity-item {
|
||||
padding: 4px 6px;
|
||||
background: var(--surface2);
|
||||
border-radius: 4px;
|
||||
margin-bottom: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.entity-item:hover { border-color: var(--accent); }
|
||||
.entity-item .track-btn { font-size: 11px; padding: 2px 6px; }
|
||||
|
||||
/* ── Scrollbars ── */
|
||||
::-webkit-scrollbar { width: 6px; height: 6px; }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
||||
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
|
||||
|
||||
/* ── Photo modal ── */
|
||||
#photo-modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.85);
|
||||
z-index: 100;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
#photo-modal.open { display: flex; }
|
||||
#photo-modal img {
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
#photo-modal-close {
|
||||
position: absolute;
|
||||
top: 16px; right: 16px;
|
||||
font-size: 28px;
|
||||
cursor: pointer;
|
||||
color: var(--text);
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 50%;
|
||||
width: 36px; height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* ── Video area ── */
|
||||
.video-controls { display: flex; gap: 6px; align-items: center; }
|
||||
#video-status { font-size: 12px; color: var(--muted); }
|
||||
Reference in New Issue
Block a user