Add phone remote control: pair a phone with a 6-digit code or QR to drive a desktop instance's playback, queue, volume, sleep timer and service mode
This commit is contained in:
@@ -3605,3 +3605,113 @@ html[data-layout="bento-hub"] .mini-bar-inner {
|
||||
.lyr-auto { margin-left: auto; }
|
||||
.notes-status { display: none; }
|
||||
}
|
||||
|
||||
/* ============================================================================
|
||||
* Phone remote (Remote in app.js, server/remote.js)
|
||||
* ========================================================================== */
|
||||
.remote-chip {
|
||||
position: fixed; left: 16px; bottom: 18px; z-index: 150;
|
||||
display: inline-flex; align-items: center; gap: 8px;
|
||||
padding: 8px 14px; border-radius: 999px; cursor: pointer;
|
||||
background: var(--bg-3); color: var(--text); border: 1px solid var(--line);
|
||||
box-shadow: var(--shadow); font-size: 12px; font-weight: 600;
|
||||
}
|
||||
.remote-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee0a8; box-shadow: 0 0 0 3px rgba(126,224,168,0.2); }
|
||||
body.service-open .remote-chip { bottom: auto; top: 14px; }
|
||||
|
||||
.remote-host .rh-pair { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
|
||||
.rh-qr { width: 132px; height: 132px; background: #fff; border-radius: 10px; padding: 4px; box-sizing: border-box; }
|
||||
.rh-label { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin: 4px 0; }
|
||||
.rh-code { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: 0.08em; color: var(--text); }
|
||||
.rh-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; max-width: 320px; line-height: 1.45; }
|
||||
.rh-remote { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
|
||||
.rh-name-row { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; font-size: 11px; color: var(--text-dim); }
|
||||
.rh-name { background: var(--bg-1); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 14px; }
|
||||
.rh-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
|
||||
|
||||
.remote-view {
|
||||
position: fixed; inset: 0; z-index: 180;
|
||||
display: flex; flex-direction: column;
|
||||
background: var(--bg);
|
||||
padding: max(12px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
|
||||
overflow-y: auto; overscroll-behavior: contain;
|
||||
}
|
||||
body.remote-open { overflow: hidden; }
|
||||
.rv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
|
||||
.rv-icon {
|
||||
flex: none; width: 38px; height: 38px; border-radius: 50%;
|
||||
background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2);
|
||||
font-size: 15px; cursor: pointer;
|
||||
}
|
||||
.rv-host { flex: 1; min-width: 0; text-align: center; }
|
||||
.rv-host-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.rv-status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-top: 2px; }
|
||||
.rv-status.ok { color: #7ee0a8; }
|
||||
|
||||
.rv-pair { max-width: 420px; margin: 8vh auto 0; width: 100%; display: flex; flex-direction: column; gap: 12px; }
|
||||
.rv-pair-title { font-family: var(--display); font-size: 26px; font-weight: 700; }
|
||||
.rv-pair-help { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
|
||||
.rv-code {
|
||||
font-family: var(--mono); font-size: 34px; letter-spacing: 0.2em; text-align: center;
|
||||
background: var(--bg-1); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
|
||||
padding: 14px 10px; width: 100%; box-sizing: border-box;
|
||||
}
|
||||
.rv-name { background: var(--bg-1); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; font-size: 15px; }
|
||||
.rv-primary {
|
||||
background: var(--accent); color: #fff; border: none; border-radius: var(--radius);
|
||||
padding: 14px; font-size: 16px; font-weight: 700; cursor: pointer;
|
||||
}
|
||||
.rv-pair-msg { min-height: 1.2em; font-size: 13px; color: var(--accent-bright); text-align: center; }
|
||||
|
||||
.rv-control { max-width: 520px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 14px; }
|
||||
.rv-now { display: flex; gap: 14px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
|
||||
.rv-thumb { width: 88px; height: 50px; object-fit: cover; border-radius: 8px; background: var(--bg-3); flex: none; }
|
||||
.rv-now-text { min-width: 0; }
|
||||
.rv-title { font-weight: 700; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
||||
.rv-channel { font-size: 12px; color: var(--text-2); margin-top: 2px; }
|
||||
.rv-seek input, .rv-volume input { width: 100%; accent-color: var(--accent); }
|
||||
.rv-times { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
|
||||
.rv-transport { display: flex; justify-content: center; align-items: center; gap: 22px; }
|
||||
.rv-tbtn {
|
||||
width: 58px; height: 58px; border-radius: 50%; cursor: pointer;
|
||||
background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font-size: 20px;
|
||||
}
|
||||
.rv-tbtn.rv-play { width: 76px; height: 76px; background: var(--accent); border-color: var(--accent); color: #fff; font-size: 26px; }
|
||||
.rv-tbtn:active { transform: scale(0.96); }
|
||||
.rv-volume { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
|
||||
.rv-volume span:last-child { font-family: var(--mono); font-size: 11px; width: 38px; text-align: right; }
|
||||
.rv-queue-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
|
||||
.rv-queue { display: flex; flex-direction: column; gap: 6px; }
|
||||
.rv-row {
|
||||
display: flex; align-items: center; gap: 10px; padding: 10px;
|
||||
background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
|
||||
cursor: pointer; touch-action: pan-y; position: relative;
|
||||
}
|
||||
.rv-row.dragging { z-index: 2; border-color: var(--accent); box-shadow: var(--shadow); cursor: grabbing; }
|
||||
.rv-handle { color: var(--text-dim); font-size: 18px; padding: 4px 2px; cursor: grab; touch-action: none; user-select: none; }
|
||||
.rv-row-text { flex: 1; min-width: 0; }
|
||||
.rv-row-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.rv-row-sub { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.rv-row-dur { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
|
||||
.rv-row-x { background: transparent; border: none; color: var(--text-dim); font-size: 14px; padding: 6px; cursor: pointer; }
|
||||
.rv-empty { font-size: 13px; color: var(--text-dim); padding: 10px 2px; }
|
||||
.rv-queue-hint { font-size: 11px; color: var(--text-dim); text-align: center; }
|
||||
.rv-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
|
||||
.rv-action {
|
||||
background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2);
|
||||
border-radius: var(--radius-sm); padding: 12px 6px; font-size: 13px; cursor: pointer;
|
||||
}
|
||||
.rv-action.on { border-color: var(--accent); color: var(--text); }
|
||||
|
||||
.rv-add-form { display: flex; gap: 8px; margin-bottom: 10px; }
|
||||
.rv-add-q { flex: 1; min-width: 0; background: var(--bg-1); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 10px; font-size: 15px; }
|
||||
.rv-add-results { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
|
||||
.rv-add-item {
|
||||
display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer;
|
||||
background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; color: var(--text);
|
||||
}
|
||||
.rv-add-item img { width: 72px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
|
||||
.rv-add-item span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
|
||||
.rv-add-item b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.rv-add-item small { color: var(--text-dim); font-size: 11px; }
|
||||
.rv-add-item.added { border-color: #7ee0a8; }
|
||||
|
||||
Reference in New Issue
Block a user