Compare commits
No files matched your search
@@ -110,8 +110,11 @@ no separate remembered playback intent for source changes or reconnects.
|
||||
Adding, replacing or removing audio on the same video binding updates only its
|
||||
audio consumer; it preserves current-frame proof and Viewer-local playback.
|
||||
|
||||
The bar spans the screen's lower edge. Narrow screens separate audio controls
|
||||
from window actions into two rows and retain 44px action targets. Playing video hides the bar
|
||||
The bar spans the screen's lower edge, preferring one row. Narrow screens shorten
|
||||
the volume slider and compact horizontal spacing and button widths, retaining
|
||||
44px control height and all actions; the percentage readout hides on narrow
|
||||
screens. If the control groups cannot fit, they wrap without overlapping.
|
||||
Playing video hides the bar
|
||||
after two idle seconds, following [Media Chrome's default](https://github.com/muxinc/media-chrome/blob/main/docs/src/pages/docs/en/components/media-controller.md#autohide).
|
||||
Pause or unavailable playback keeps it visible. Control hover, keyboard focus,
|
||||
dragging and an open tooltip hold it open; mouse movement reveals it, and a
|
||||
|
||||
@@ -382,13 +382,12 @@ func (model consoleModel) content(styled bool) string {
|
||||
continue
|
||||
}
|
||||
address := consoleAddress(item[1])
|
||||
if item[0] == "entry" {
|
||||
address = launchURL(address)
|
||||
}
|
||||
style := link
|
||||
if styled {
|
||||
target := address
|
||||
if item[0] == "entry" {
|
||||
target = launchURL(address)
|
||||
}
|
||||
style = style.Hyperlink(target)
|
||||
style = style.Hyperlink(address)
|
||||
}
|
||||
if compactDebug {
|
||||
fmt.Fprintf(&out, "\n%s\n", style.Render(address))
|
||||
|
||||
@@ -190,6 +190,38 @@ func TestBrowserOpenFeedbackBelongsToTheCurrentEntry(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestConsoleEntryKeepsAppActivationWithoutExposingCredentials(t *testing.T) {
|
||||
model := consoleModel{width: 80, language: "en", view: consoleView{
|
||||
mode: "link", state: "ready",
|
||||
entry: "http://user:private-secret@localhost:8787/?token=private-secret#client-access=private-secret&piik-client=1",
|
||||
invite: "https://room.example/?token=private-secret#v=private-secret",
|
||||
}}
|
||||
want := []string{"http://localhost:8787/#piik-client=1", "https://room.example/"}
|
||||
for _, styled := range []bool{false, true} {
|
||||
content := model.content(styled)
|
||||
var addresses []string
|
||||
for _, field := range strings.Fields(ansi.Strip(content)) {
|
||||
if strings.HasPrefix(field, "http") {
|
||||
addresses = append(addresses, field)
|
||||
}
|
||||
}
|
||||
if len(addresses) != len(want) {
|
||||
t.Fatalf("styled=%v: copyable addresses = %q", styled, addresses)
|
||||
}
|
||||
for i, address := range want {
|
||||
if addresses[i] != address {
|
||||
t.Fatalf("styled=%v: copyable address = %q, want %q", styled, addresses[i], address)
|
||||
}
|
||||
if styled && !strings.Contains(content, ansi.SetHyperlink(address)) {
|
||||
t.Fatalf("terminal hyperlink differs from copyable address %q", address)
|
||||
}
|
||||
}
|
||||
if strings.Contains(content, "private-secret") || strings.Contains(content, "client-access") {
|
||||
t.Fatal("console exposed an entry or invitation credential")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestConsolePresentationAndShutdown(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
inset: auto 0 0;
|
||||
z-index: 4;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 12px max(6px, env(safe-area-inset-bottom));
|
||||
@@ -27,21 +28,21 @@
|
||||
.lr-playback .lr-btn:is(:hover, :focus-visible):not(:disabled):not([aria-disabled="true"]) { transform: translateY(-2px); background: var(--wall-2); }
|
||||
.lr-playback .lr-btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(2px) scale(.95); transition-duration: 80ms; }
|
||||
.lr-playback .lr-btn[aria-pressed="true"] { background: var(--wall-2); }
|
||||
.lr-playback-audio { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
||||
.lr-playback-separator { width: 1px; height: 20px; background: currentColor; opacity: .22; }
|
||||
.lr-playback-volume { min-width: 0; }
|
||||
.lr-playback-volume input { width: clamp(64px, 14vw, 144px); min-width: 0; height: 44px; padding: 0; margin: 0; accent-color: var(--action); cursor: pointer; }
|
||||
.lr-playback-level { width: 4ch; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
|
||||
.lr-playback-audio { display: flex; align-items: center; flex: 1; gap: 8px; min-width: min-content; }
|
||||
.lr-playback-separator { flex: none; width: 1px; height: 20px; background: currentColor; opacity: .22; }
|
||||
.lr-playback-volume { flex: 0 1 144px; min-width: 32px; }
|
||||
.lr-playback-volume input { width: 100%; min-width: 0; height: 44px; padding: 0; margin: 0; accent-color: var(--action); cursor: pointer; }
|
||||
.lr-playback-level { flex: none; width: 4ch; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
|
||||
.lr-playback-level.is-boosted { color: var(--action); }
|
||||
.lr-playback-view { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; border-left: 1px solid var(--wall-2); padding-left: 8px; }
|
||||
.lr-playback-view { display: inline-flex; align-items: center; flex: none; gap: 4px; margin-left: auto; border-left: 1px solid var(--wall-2); padding-left: 8px; }
|
||||
.lr-tv-screen:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; }
|
||||
.lr-tv-screen:has(> .lr-playback) { container-type: inline-size; }
|
||||
@container (max-width: 440px) {
|
||||
.lr-playback { flex-wrap: wrap; gap: 2px 6px; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); }
|
||||
.lr-playback-audio { flex-basis: 100%; gap: 6px; }
|
||||
.lr-playback-separator { display: none; }
|
||||
.lr-playback { gap: 6px; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); }
|
||||
.lr-playback .lr-btn { width: clamp(32px, 11cqw, 44px); }
|
||||
.lr-playback-audio { gap: 4px; }
|
||||
.lr-playback-separator, .lr-playback-level { display: none; }
|
||||
.lr-playback-volume { flex: 1; }
|
||||
.lr-playback-volume input { width: 100%; }
|
||||
.lr-playback-view { gap: 2px; border: 0; padding: 0; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
|
||||
Reference in new issue
Block a user