mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-10 17:45:42 +00:00
497dc2752b
Implement RustDesk-desktop-style display switching and virtual display management in the web remote client. - client.js: rewrite switchMonitor to send SwitchDisplay + CaptureDisplays messages with keyframe refresh; getMonitors marks primary (origin 0,0) and current display; add getCurrentDisplay, _processPeerInfo, _parseVirtualDisplaySupport, getVirtualDisplaySupport, toggleVirtualDisplay; switchDisplay receive handler tracks current display. - remote.js: add i18n helper, peer_info/display_switched/virtual_display_toggled listeners, refreshMonitorButton; rewrite updateMonitorMenu with monitor list plus rustdesk_idd (4 checkboxes) and amyuni_idd (+/- counter) virtual display controls and plug-out-all. - remote.css: styles for divider, active monitor/virtual items, counter controls. - i18n: add virtual_displays, virtual_display, plug_out_all keys to en/pl/zh. This commit was made possible thanks to Insolve.
1279 lines
26 KiB
CSS
1279 lines
26 KiB
CSS
/**
|
|
* BetterDesk Console - Remote Desktop Viewer Styles
|
|
* Fullscreen viewer with auto-hiding toolbar, connection overlay, and dark theme
|
|
*/
|
|
|
|
/* ---- Toast Notifications ---- */
|
|
.rd-toast {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(20px);
|
|
padding: 10px 20px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
color: #fff;
|
|
z-index: 100000;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: opacity 0.3s, transform 0.3s;
|
|
max-width: 420px;
|
|
text-align: center;
|
|
}
|
|
.rd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
.rd-toast-info { background: rgba(56, 132, 255, 0.92); }
|
|
.rd-toast-warning { background: rgba(210, 153, 34, 0.92); }
|
|
.rd-toast-error { background: rgba(218, 54, 51, 0.92); }
|
|
.rd-toast-success { background: rgba(46, 164, 79, 0.92); }
|
|
|
|
/* ---- Viewer Body (no sidebar, no scroll) ---- */
|
|
.viewer-body {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
background-color: #000;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
color: var(--text-primary, #e6edf3);
|
|
height: 100vh;
|
|
width: 100vw;
|
|
}
|
|
|
|
/* ---- Main Viewer Container ---- */
|
|
.viewer-container {
|
|
position: absolute;
|
|
top: 36px;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
overflow: hidden;
|
|
background-color: #000;
|
|
}
|
|
|
|
/* ---- Canvas ---- */
|
|
.session-canvas {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
outline: none;
|
|
cursor: default;
|
|
}
|
|
|
|
/* During streaming: show crosshair as fallback (remote cursor drawn on canvas overlay) */
|
|
.session-panel.streaming .session-canvas {
|
|
cursor: crosshair;
|
|
}
|
|
|
|
/* When remote cursor overlay is active, hide local cursor to avoid double cursor */
|
|
.session-panel.streaming.has-remote-cursor .session-canvas {
|
|
cursor: none;
|
|
}
|
|
|
|
/* ---- Connection Overlay ---- */
|
|
.viewer-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: rgba(13, 17, 23, 0.95);
|
|
z-index: 100;
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
|
|
.overlay-card {
|
|
background: var(--bg-secondary, #161b22);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 12px;
|
|
padding: 40px;
|
|
max-width: 400px;
|
|
width: 90%;
|
|
text-align: center;
|
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.overlay-icon {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.overlay-icon .material-icons {
|
|
font-size: 48px;
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.overlay-title {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: var(--text-primary, #e6edf3);
|
|
margin: 0 0 8px 0;
|
|
}
|
|
|
|
.overlay-device-id {
|
|
font-size: 16px;
|
|
color: var(--text-secondary, #8b949e);
|
|
margin: 0 0 4px 0;
|
|
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
}
|
|
|
|
.overlay-device-name {
|
|
font-size: 14px;
|
|
color: var(--text-secondary, #8b949e);
|
|
margin: 0 0 24px 0;
|
|
}
|
|
|
|
.overlay-hint {
|
|
font-size: 14px;
|
|
color: var(--text-secondary, #8b949e);
|
|
margin: 0 0 24px 0;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.autoplay-overlay {
|
|
z-index: 150;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.autoplay-card .overlay-icon .material-icons {
|
|
font-size: 64px;
|
|
color: var(--accent-green, #3fb950);
|
|
}
|
|
|
|
.overlay-status {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 12px;
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
background: var(--bg-tertiary, #21262d);
|
|
margin-bottom: 16px;
|
|
font-size: 14px;
|
|
color: var(--text-secondary, #8b949e);
|
|
}
|
|
|
|
.overlay-status.error {
|
|
color: var(--accent-red, #f85149);
|
|
background: rgba(248, 81, 73, 0.1);
|
|
}
|
|
|
|
.overlay-status.info {
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
/* Spinner */
|
|
.spinner {
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 2px solid var(--border-primary, #30363d);
|
|
border-top-color: var(--accent-blue, #58a6ff);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Overlay actions */
|
|
.overlay-actions {
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: center;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
/* ---- Buttons ---- */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 20px;
|
|
border-radius: 8px;
|
|
border: 1px solid transparent;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
transition: background-color 0.15s, border-color 0.15s;
|
|
}
|
|
|
|
.btn .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--accent-green, #2ea44f);
|
|
color: #fff;
|
|
border-color: var(--accent-green, #2ea44f);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #3fb950;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
border-color: var(--border-primary, #30363d);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background-color: var(--bg-elevated, #30363d);
|
|
}
|
|
|
|
.btn-full {
|
|
width: 100%;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* ---- Password Form ---- */
|
|
.password-form {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 16px;
|
|
text-align: left;
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
background: var(--bg-tertiary, #21262d);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 8px;
|
|
color: var(--text-primary, #e6edf3);
|
|
font-size: 14px;
|
|
outline: none;
|
|
box-sizing: border-box;
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
.form-input:focus {
|
|
border-color: var(--accent-blue, #58a6ff);
|
|
box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
|
|
}
|
|
|
|
.form-input::placeholder {
|
|
color: var(--text-secondary, #8b949e);
|
|
}
|
|
|
|
.login-error {
|
|
color: var(--accent-red, #f85149);
|
|
font-size: 13px;
|
|
margin: 0 0 12px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
/* ---- Toolbar (floating RustDesk-style collapsible pill) ---- */
|
|
.viewer-toolbar {
|
|
position: fixed;
|
|
top: 44px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 0;
|
|
background: transparent;
|
|
border: none;
|
|
z-index: 50;
|
|
}
|
|
|
|
/* Expanded action pill — only visible when the toolbar is expanded */
|
|
.toolbar-expanded {
|
|
display: none;
|
|
position: relative;
|
|
/* Sit above the compact handle so dropdown menus (which extend downward
|
|
into the handle's region) are not covered by it. */
|
|
z-index: 2;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
max-width: calc(100vw - 24px);
|
|
padding: 6px 10px;
|
|
background: linear-gradient(180deg, rgba(22, 27, 34, 0.97) 0%, rgba(22, 27, 34, 0.92) 100%);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 12px;
|
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
|
|
/* overflow must stay visible so dropdown menus (top:100%) can escape the pill */
|
|
overflow: visible;
|
|
}
|
|
|
|
.viewer-toolbar.expanded .toolbar-expanded {
|
|
display: flex;
|
|
animation: toolbar-pop 0.18s ease;
|
|
}
|
|
|
|
@keyframes toolbar-pop {
|
|
from { opacity: 0; transform: translateY(-6px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Compact handle — always visible */
|
|
.toolbar-handle {
|
|
display: flex;
|
|
position: relative;
|
|
z-index: 1;
|
|
align-items: center;
|
|
gap: 2px;
|
|
padding: 3px 5px;
|
|
background: linear-gradient(180deg, rgba(22, 27, 34, 0.95) 0%, rgba(22, 27, 34, 0.88) 100%);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 999px;
|
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
|
|
opacity: 0.6;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.toolbar-handle:hover,
|
|
.viewer-toolbar.expanded .toolbar-handle,
|
|
.viewer-toolbar.dragging .toolbar-handle {
|
|
opacity: 1;
|
|
}
|
|
|
|
.handle-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 30px;
|
|
height: 28px;
|
|
border: none;
|
|
border-radius: 999px;
|
|
background: transparent;
|
|
color: var(--text-secondary, #8b949e);
|
|
cursor: pointer;
|
|
transition: background-color 0.15s, color 0.15s;
|
|
}
|
|
|
|
.handle-btn:hover {
|
|
background: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.handle-btn .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.handle-drag {
|
|
cursor: grab;
|
|
}
|
|
|
|
.viewer-toolbar.dragging .handle-drag {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.handle-expand.active {
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.toolbar-left,
|
|
.toolbar-center,
|
|
.toolbar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.toolbar-center {
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Toolbar button */
|
|
.toolbar-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 6px;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--text-secondary, #8b949e);
|
|
cursor: pointer;
|
|
transition: background-color 0.15s, color 0.15s;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.toolbar-btn:hover {
|
|
background: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.toolbar-btn .material-icons {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.toolbar-btn-danger:hover {
|
|
background: rgba(248, 81, 73, 0.15);
|
|
color: var(--accent-red, #f85149);
|
|
}
|
|
|
|
/* Device info in toolbar */
|
|
.toolbar-device-info {
|
|
font-size: 13px;
|
|
color: var(--text-secondary, #8b949e);
|
|
margin-left: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.toolbar-device-id {
|
|
color: var(--text-primary, #e6edf3);
|
|
font-weight: 600;
|
|
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
}
|
|
|
|
.toolbar-separator {
|
|
color: var(--border-primary, #30363d);
|
|
}
|
|
|
|
.toolbar-status {
|
|
color: var(--text-secondary, #8b949e);
|
|
}
|
|
|
|
/* Stats in toolbar center */
|
|
.toolbar-stats {
|
|
font-size: 12px;
|
|
color: var(--text-secondary, #8b949e);
|
|
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
}
|
|
|
|
/* ---- Toolbar Dropdowns ---- */
|
|
.toolbar-dropdown {
|
|
position: relative;
|
|
}
|
|
|
|
.toolbar-dropdown-menu {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
margin-top: 4px;
|
|
background: var(--bg-secondary, #161b22);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 8px;
|
|
padding: 4px;
|
|
min-width: 180px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
|
z-index: 60;
|
|
}
|
|
|
|
.toolbar-dropdown-menu.open {
|
|
display: block;
|
|
}
|
|
|
|
.dropdown-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
background: transparent;
|
|
color: var(--text-secondary, #8b949e);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
text-align: left;
|
|
transition: background-color 0.15s, color 0.15s;
|
|
}
|
|
|
|
.dropdown-item:hover {
|
|
background: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.dropdown-item.active {
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.dropdown-item .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* ---- Dropdown Extras ---- */
|
|
.dropdown-separator {
|
|
height: 1px;
|
|
background: var(--border-primary, #30363d);
|
|
margin: 4px 8px;
|
|
}
|
|
|
|
.dropdown-label {
|
|
padding: 4px 12px 2px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-secondary, #8b949e);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.toolbar-dropdown-wide {
|
|
min-width: 220px;
|
|
}
|
|
|
|
/* ---- Monitors & Virtual Displays ---- */
|
|
.dropdown-divider {
|
|
height: 1px;
|
|
background: var(--border-primary, #30363d);
|
|
margin: 6px 8px;
|
|
}
|
|
|
|
.monitor-item.active,
|
|
.virtual-display-item.active {
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.monitor-item.active::after,
|
|
.virtual-display-item.active::after {
|
|
content: '✓';
|
|
margin-left: auto;
|
|
font-size: 14px;
|
|
color: var(--accent-green, #2ea44f);
|
|
}
|
|
|
|
.virtual-display-counter {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
|
|
.vd-count-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 28px;
|
|
height: 28px;
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 6px;
|
|
background: transparent;
|
|
color: var(--text-primary, #e6edf3);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.vd-count-btn:hover:not(:disabled) {
|
|
background: rgba(88, 166, 255, 0.15);
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.vd-count-btn:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.vd-count-btn .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.vd-count-value {
|
|
min-width: 24px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Toggle items in dropdown */
|
|
.toggle-item[data-active="true"] {
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.toggle-item[data-active="true"]::after {
|
|
content: '✓';
|
|
margin-left: auto;
|
|
font-size: 14px;
|
|
color: var(--accent-green, #2ea44f);
|
|
}
|
|
|
|
/* Active toolbar buttons */
|
|
.toolbar-btn.active {
|
|
background: rgba(88, 166, 255, 0.15);
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.toolbar-btn.recording {
|
|
background: rgba(248, 81, 73, 0.15);
|
|
color: var(--accent-red, #f85149);
|
|
animation: recording-pulse 1.5s infinite;
|
|
}
|
|
|
|
@keyframes recording-pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
|
|
/* Pinned toolbar — keeps the expanded pill open (no auto-collapse) */
|
|
.viewer-toolbar.pinned .toolbar-expanded {
|
|
display: flex;
|
|
}
|
|
|
|
/* ---- Chat Panel ---- */
|
|
.chat-panel {
|
|
position: absolute;
|
|
bottom: 16px;
|
|
right: 16px;
|
|
width: 320px;
|
|
height: 400px;
|
|
background: var(--bg-secondary, #161b22);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
z-index: 55;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.chat-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border-primary, #30363d);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.chat-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-secondary, #8b949e);
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.chat-close:hover {
|
|
color: var(--text-primary, #e6edf3);
|
|
background: var(--bg-tertiary, #21262d);
|
|
}
|
|
|
|
.chat-close .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.chat-messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 12px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.chat-msg {
|
|
margin-bottom: 8px;
|
|
padding: 6px 10px;
|
|
border-radius: 8px;
|
|
max-width: 85%;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
.chat-msg.sent {
|
|
background: var(--accent-blue, #58a6ff);
|
|
color: #fff;
|
|
margin-left: auto;
|
|
text-align: right;
|
|
}
|
|
|
|
.chat-msg.received {
|
|
background: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.chat-input-area {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 12px;
|
|
border-top: 1px solid var(--border-primary, #30363d);
|
|
}
|
|
|
|
.chat-input {
|
|
flex: 1;
|
|
padding: 8px 12px;
|
|
background: var(--bg-tertiary, #21262d);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 8px;
|
|
color: var(--text-primary, #e6edf3);
|
|
font-size: 13px;
|
|
outline: none;
|
|
}
|
|
|
|
.chat-input:focus {
|
|
border-color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.chat-send {
|
|
background: var(--accent-blue, #58a6ff);
|
|
border: none;
|
|
color: #fff;
|
|
padding: 8px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.chat-send:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.chat-send .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* ---- HTTP Warning Banner ---- */
|
|
.http-warning-banner {
|
|
position: fixed;
|
|
bottom: 16px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 200;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 16px;
|
|
background: rgba(210, 153, 34, 0.92);
|
|
backdrop-filter: blur(8px);
|
|
color: #fff;
|
|
border-radius: 10px;
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
max-width: 540px;
|
|
box-shadow: 0 4px 16px rgba(0,0,0,.4);
|
|
animation: bannerSlideUp .3s ease;
|
|
}
|
|
|
|
@keyframes bannerSlideUp {
|
|
from { opacity: 0; transform: translateX(-50%) translateY(20px); }
|
|
to { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
}
|
|
|
|
.http-warning-banner .material-icons {
|
|
font-size: 22px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.http-warning-dismiss {
|
|
background: none;
|
|
border: none;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
padding: 2px;
|
|
margin-left: 4px;
|
|
opacity: .7;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.http-warning-dismiss:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ---- Security Warning Banner ---- */
|
|
.security-warning-banner {
|
|
position: absolute;
|
|
top: 8px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 200;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 14px;
|
|
color: #fff;
|
|
border-radius: 8px;
|
|
font-size: 12px;
|
|
line-height: 1.4;
|
|
max-width: 480px;
|
|
box-shadow: 0 4px 14px rgba(0,0,0,.4);
|
|
animation: bannerSlideUp .3s ease;
|
|
}
|
|
.security-warning-banner.security-warning {
|
|
background: rgba(210, 153, 34, 0.92);
|
|
}
|
|
.security-warning-banner.security-error {
|
|
background: rgba(200, 40, 40, 0.92);
|
|
}
|
|
.security-warning-banner .material-icons {
|
|
font-size: 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
.security-warning-dismiss {
|
|
background: none;
|
|
border: none;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
padding: 2px;
|
|
margin-left: 4px;
|
|
opacity: .7;
|
|
flex-shrink: 0;
|
|
}
|
|
.security-warning-dismiss:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ---- Session Tab Bar ---- */
|
|
.session-tab-bar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
background: var(--bg-secondary, #161b22);
|
|
border-bottom: 1px solid var(--border-primary, #30363d);
|
|
z-index: 60;
|
|
user-select: none;
|
|
-webkit-app-region: drag;
|
|
}
|
|
|
|
.session-tabs {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
gap: 1px;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
.session-tabs::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.session-tab {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 0 12px;
|
|
height: 36px;
|
|
min-width: 0;
|
|
max-width: 180px;
|
|
cursor: pointer;
|
|
color: var(--text-secondary, #8b949e);
|
|
font-size: 12px;
|
|
white-space: nowrap;
|
|
border-bottom: 2px solid transparent;
|
|
transition: background-color 0.15s, color 0.15s, border-color 0.15s;
|
|
-webkit-app-region: no-drag;
|
|
}
|
|
|
|
.session-tab:hover {
|
|
background: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.session-tab.active {
|
|
color: var(--text-primary, #e6edf3);
|
|
border-bottom-color: var(--accent-blue, #58a6ff);
|
|
background: var(--bg-tertiary, #21262d);
|
|
}
|
|
|
|
.session-tab-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
background: var(--text-secondary, #8b949e);
|
|
}
|
|
|
|
.session-tab-dot.dot-online {
|
|
background: var(--accent-green, #3fb950);
|
|
}
|
|
|
|
.session-tab-dot.dot-connecting {
|
|
background: var(--accent-yellow, #d29922);
|
|
animation: dot-pulse 1.2s ease infinite;
|
|
}
|
|
|
|
.session-tab-dot.dot-error {
|
|
background: var(--accent-red, #f85149);
|
|
}
|
|
|
|
.session-tab-dot.dot-offline {
|
|
background: var(--text-secondary, #8b949e);
|
|
}
|
|
|
|
@keyframes dot-pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.4; }
|
|
}
|
|
|
|
.session-tab-label {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.session-tab-close {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 18px;
|
|
height: 18px;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--text-secondary, #8b949e);
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
flex-shrink: 0;
|
|
opacity: 0;
|
|
transition: opacity 0.15s, background-color 0.15s;
|
|
}
|
|
|
|
.session-tab:hover .session-tab-close,
|
|
.session-tab.active .session-tab-close {
|
|
opacity: 1;
|
|
}
|
|
|
|
.session-tab-close:hover {
|
|
background: rgba(248, 81, 73, 0.2);
|
|
color: var(--accent-red, #f85149);
|
|
}
|
|
|
|
.tab-bar-back,
|
|
.tab-bar-add {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--text-secondary, #8b949e);
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
transition: background-color 0.15s, color 0.15s;
|
|
flex-shrink: 0;
|
|
-webkit-app-region: no-drag;
|
|
}
|
|
|
|
.tab-bar-back:hover,
|
|
.tab-bar-add:hover {
|
|
background: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.tab-bar-back .material-icons,
|
|
.tab-bar-add .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* ---- Session Panel ---- */
|
|
.session-panel {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ---- Form Input Error State ---- */
|
|
.form-input.error {
|
|
border-color: var(--accent-red, #f85149);
|
|
animation: input-shake 0.3s ease;
|
|
}
|
|
|
|
@keyframes input-shake {
|
|
0%, 100% { transform: translateX(0); }
|
|
25% { transform: translateX(-4px); }
|
|
75% { transform: translateX(4px); }
|
|
}
|
|
|
|
/* ---- File Transfer Panel ---- */
|
|
|
|
.session-file-panel {
|
|
position: absolute;
|
|
bottom: 16px;
|
|
right: 16px;
|
|
width: 380px;
|
|
height: 480px;
|
|
background: var(--bg-secondary, #161b22);
|
|
border: 1px solid var(--border-primary, #30363d);
|
|
border-radius: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
z-index: 55;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.file-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--border-primary, #30363d);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
gap: 6px;
|
|
}
|
|
|
|
.file-panel-header-title {
|
|
flex: 1;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.file-panel-header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
}
|
|
|
|
.file-btn-icon {
|
|
width: 30px;
|
|
height: 30px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
color: var(--text-secondary, #8b949e);
|
|
cursor: pointer;
|
|
padding: 0;
|
|
transition: background 0.15s, color 0.15s;
|
|
}
|
|
|
|
.file-btn-icon .material-icons { font-size: 18px; }
|
|
|
|
.file-btn-icon:hover {
|
|
background: var(--bg-tertiary, #21262d);
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.file-btn-icon.active {
|
|
color: var(--accent-blue, #58a6ff);
|
|
}
|
|
|
|
.file-panel-path {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 14px;
|
|
gap: 6px;
|
|
border-bottom: 1px solid var(--border-secondary, #21262d);
|
|
background: var(--bg-tertiary, #0d1117);
|
|
}
|
|
|
|
.file-path-text {
|
|
flex: 1;
|
|
font-size: 12px;
|
|
color: var(--text-secondary, #8b949e);
|
|
font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.file-panel-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.file-panel-list::-webkit-scrollbar { width: 6px; }
|
|
.file-panel-list::-webkit-scrollbar-thumb {
|
|
background: var(--border-primary, #30363d);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.file-panel-empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
color: var(--text-tertiary, #484f58);
|
|
font-size: 13px;
|
|
gap: 8px;
|
|
}
|
|
|
|
.file-panel-empty .material-icons { font-size: 40px; opacity: 0.4; }
|
|
|
|
.file-entry {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 14px;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
transition: background 0.1s;
|
|
position: relative;
|
|
}
|
|
|
|
.file-entry:hover {
|
|
background: var(--bg-tertiary, #21262d);
|
|
}
|
|
|
|
.file-entry-icon {
|
|
flex-shrink: 0;
|
|
color: var(--text-secondary, #8b949e);
|
|
}
|
|
|
|
.file-entry-icon .material-icons { font-size: 20px; }
|
|
|
|
.file-entry-dir .file-entry-icon { color: var(--accent-blue, #58a6ff); }
|
|
.file-entry-drive .file-entry-icon { color: var(--accent-yellow, #d29922); }
|
|
|
|
.file-entry-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.file-entry-dir .file-entry-name { font-weight: 600; }
|
|
|
|
.file-entry-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
font-size: 11px;
|
|
color: var(--text-tertiary, #484f58);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.file-entry-actions {
|
|
display: flex;
|
|
gap: 2px;
|
|
opacity: 0;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.file-entry:hover .file-entry-actions { opacity: 1; }
|
|
|
|
.file-entry-actions .file-btn-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
|
|
.file-entry-actions .file-btn-icon .material-icons { font-size: 16px; }
|
|
|
|
/* ---- File Transfers Section ---- */
|
|
|
|
.file-transfers-section {
|
|
border-top: 1px solid var(--border-primary, #30363d);
|
|
max-height: 140px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.file-transfers-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 14px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-secondary, #8b949e);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.file-transfer-entry {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 14px;
|
|
gap: 10px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.file-transfer-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
color: var(--text-primary, #e6edf3);
|
|
}
|
|
|
|
.file-transfer-bar {
|
|
width: 80px;
|
|
height: 4px;
|
|
border-radius: 2px;
|
|
background: var(--bg-tertiary, #21262d);
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.file-transfer-bar-fill {
|
|
height: 100%;
|
|
border-radius: 2px;
|
|
background: var(--accent-blue, #58a6ff);
|
|
transition: width 0.2s ease;
|
|
}
|
|
|
|
.file-transfer-pct {
|
|
font-size: 11px;
|
|
color: var(--text-secondary, #8b949e);
|
|
min-width: 36px;
|
|
text-align: right;
|
|
}
|
|
|
|
.file-transfer-entry.complete .file-transfer-bar-fill {
|
|
background: var(--accent-green, #3fb950);
|
|
}
|
|
|
|
.file-transfer-entry.error .file-transfer-bar-fill {
|
|
background: var(--accent-red, #f85149);
|
|
}
|
|
|
|
.file-transfer-entry.complete .file-transfer-pct,
|
|
.file-transfer-entry.error .file-transfer-pct {
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ---- Responsive ---- */
|
|
@media (max-width: 768px) {
|
|
.toolbar-center {
|
|
display: none;
|
|
}
|
|
|
|
.toolbar-device-info {
|
|
display: none;
|
|
}
|
|
|
|
.viewer-toolbar {
|
|
top: 40px;
|
|
}
|
|
|
|
.toolbar-expanded {
|
|
max-width: calc(100vw - 16px);
|
|
}
|
|
|
|
.overlay-card {
|
|
padding: 24px;
|
|
max-width: 320px;
|
|
}
|
|
|
|
.session-tab {
|
|
max-width: 140px;
|
|
padding: 0 8px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.toolbar-right {
|
|
gap: 0;
|
|
}
|
|
|
|
.toolbar-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
.toolbar-btn .material-icons {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.session-tab {
|
|
max-width: 100px;
|
|
}
|
|
}
|