Complete browser-based remote desktop client built from protocol analysis: - Protobuf message definitions (75+ message types, 10 enums) - NaCl encryption (Ed25519 + Curve25519 ECDH + XSalsa20-Poly1305) - WebSocket signaling (hbbs) + relay (hbbr) connection lifecycle - VP8/VP9/AV1 video decoding via ogvjs WASM + yuv-canvas WebGL - Opus audio decoding via libopus WASM + Web Audio API - Full mouse/keyboard input forwarding to protobuf events - Connection dialog, status bar, toolbar, log panel UI Also tracked web_deps (codec libraries) in rustdesk-as-ref/
469 lines
8.1 KiB
CSS
469 lines
8.1 KiB
CSS
/* RustDesk Standalone Web Client - Styles */
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--bg-primary: #0a0a0f;
|
|
--bg-secondary: #12121a;
|
|
--bg-tertiary: #1a1a2e;
|
|
--text-primary: #e0e0e0;
|
|
--text-secondary: #888;
|
|
--accent: #4a9eff;
|
|
--accent-hover: #3a8eef;
|
|
--danger: #ff4444;
|
|
--success: #44cc44;
|
|
--warning: #ffaa00;
|
|
--border: #2a2a3e;
|
|
--shadow: rgba(0, 0, 0, 0.4);
|
|
--radius: 8px;
|
|
}
|
|
|
|
html, body {
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* ===== Connection Dialog ===== */
|
|
|
|
#connection-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: var(--bg-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 100;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
#connection-overlay.hidden {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.connection-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 16px;
|
|
padding: 40px;
|
|
width: 420px;
|
|
max-width: 90%;
|
|
box-shadow: 0 20px 60px var(--shadow);
|
|
}
|
|
|
|
.connection-card h1 {
|
|
text-align: center;
|
|
font-size: 24px;
|
|
margin-bottom: 8px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.connection-card .subtitle {
|
|
text-align: center;
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 6px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.form-group input {
|
|
width: 100%;
|
|
padding: 10px 14px;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.form-group input:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.form-group input::placeholder {
|
|
color: #555;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
.form-row .form-group {
|
|
flex: 1;
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: none;
|
|
border-radius: var(--radius);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--accent-hover);
|
|
}
|
|
|
|
.btn-primary:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: var(--danger);
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: #cc3333;
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 6px 12px;
|
|
font-size: 12px;
|
|
width: auto;
|
|
}
|
|
|
|
.btn-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
padding: 0;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 6px;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-icon:hover {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.btn-icon.active {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
/* ===== Password Dialog ===== */
|
|
|
|
#password-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 200;
|
|
}
|
|
|
|
#password-overlay.visible {
|
|
display: flex;
|
|
}
|
|
|
|
.password-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 16px;
|
|
padding: 30px;
|
|
width: 380px;
|
|
max-width: 90%;
|
|
box-shadow: 0 20px 60px var(--shadow);
|
|
}
|
|
|
|
.password-card h2 {
|
|
font-size: 18px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
/* ===== Status Bar ===== */
|
|
|
|
#status-bar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 32px;
|
|
background: var(--bg-secondary);
|
|
border-bottom: 1px solid var(--border);
|
|
display: none;
|
|
align-items: center;
|
|
padding: 0 12px;
|
|
font-size: 12px;
|
|
z-index: 50;
|
|
gap: 16px;
|
|
}
|
|
|
|
#status-bar.visible {
|
|
display: flex;
|
|
}
|
|
|
|
.status-indicator {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--danger);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.status-indicator.connected {
|
|
background: var(--success);
|
|
box-shadow: 0 0 6px var(--success);
|
|
}
|
|
|
|
.status-text {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.status-text strong {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.status-right {
|
|
margin-left: auto;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.fps-display {
|
|
color: var(--text-secondary);
|
|
font-family: monospace;
|
|
}
|
|
|
|
/* ===== Toolbar ===== */
|
|
|
|
#toolbar {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 6px;
|
|
display: none;
|
|
align-items: center;
|
|
gap: 4px;
|
|
box-shadow: 0 10px 40px var(--shadow);
|
|
z-index: 50;
|
|
}
|
|
|
|
#toolbar.visible {
|
|
display: flex;
|
|
}
|
|
|
|
.toolbar-divider {
|
|
width: 1px;
|
|
height: 24px;
|
|
background: var(--border);
|
|
margin: 0 4px;
|
|
}
|
|
|
|
/* ===== Remote Canvas ===== */
|
|
|
|
#remote-canvas-wrapper {
|
|
position: fixed;
|
|
top: 32px;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: #000;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#remote-canvas-wrapper.visible {
|
|
display: flex;
|
|
}
|
|
|
|
#remote-canvas {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
image-rendering: auto;
|
|
background: #111;
|
|
}
|
|
|
|
/* ===== Log Panel ===== */
|
|
|
|
#log-panel {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 200px;
|
|
background: var(--bg-secondary);
|
|
border-top: 1px solid var(--border);
|
|
display: none;
|
|
flex-direction: column;
|
|
z-index: 60;
|
|
}
|
|
|
|
#log-panel.visible {
|
|
display: flex;
|
|
}
|
|
|
|
#log-panel .log-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
#log-panel .log-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 8px 12px;
|
|
font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
|
|
font-size: 11px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.log-entry {
|
|
color: var(--text-secondary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.log-entry.error {
|
|
color: var(--danger);
|
|
}
|
|
|
|
.log-entry.warn {
|
|
color: var(--warning);
|
|
}
|
|
|
|
.log-entry.info {
|
|
color: var(--accent);
|
|
}
|
|
|
|
/* ===== Toast Notifications ===== */
|
|
|
|
#toast-container {
|
|
position: fixed;
|
|
top: 44px;
|
|
right: 16px;
|
|
z-index: 300;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.toast {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 12px 16px;
|
|
font-size: 13px;
|
|
box-shadow: 0 10px 30px var(--shadow);
|
|
animation: toastIn 0.3s ease;
|
|
max-width: 320px;
|
|
}
|
|
|
|
.toast.error {
|
|
border-color: var(--danger);
|
|
}
|
|
|
|
.toast.success {
|
|
border-color: var(--success);
|
|
}
|
|
|
|
@keyframes toastIn {
|
|
from { opacity: 0; transform: translateX(20px); }
|
|
to { opacity: 1; transform: translateX(0); }
|
|
}
|
|
|
|
/* ===== Loading Spinner ===== */
|
|
|
|
.spinner {
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 2px solid var(--border);
|
|
border-top-color: var(--accent);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ===== Responsive ===== */
|
|
|
|
@media (max-width: 600px) {
|
|
.connection-card {
|
|
padding: 24px;
|
|
width: 95%;
|
|
}
|
|
|
|
.form-row {
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
#toolbar {
|
|
bottom: 10px;
|
|
padding: 4px;
|
|
gap: 2px;
|
|
}
|
|
|
|
.btn-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
font-size: 14px;
|
|
}
|
|
}
|