Skip to content

Commit 46eb2d0

Browse files
committed
Fix fallback behavior
1 parent b960ea1 commit 46eb2d0

2 files changed

Lines changed: 25 additions & 16 deletions

File tree

src/app/app.component.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
isolation: isolate;
3131
}
3232

33+
/* No stream / embed unavailable — keep full-screen black behind the timer UI */
34+
.focus-stream-layer__blank {
35+
position: absolute;
36+
inset: 0;
37+
z-index: 0;
38+
background: #000;
39+
}
40+
3341
/* Pomodoro card + Exit button stacked, centered over the video */
3442
.focus-stream-layer__column {
3543
position: absolute;

src/app/app.component.html

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,13 @@ <h1 class="site-title">lucent.earth</h1>
6464
</button>
6565
}
6666

67-
@if (!focusMode || !focusStreamEmbedUrl) {
67+
@if (!focusMode) {
6868
<button
6969
type="button"
7070
class="focus-mode-launch"
71-
[class.focus-mode-launch--exit]="focusMode"
7271
(click)="toggleFocusMode()"
73-
[attr.aria-label]="focusMode ? 'Exit Focus mode' : 'Enter Focus mode'"
74-
[attr.title]="focusMode ? 'Exit Focus mode' : 'Focus mode — fullscreen stream with corner globe'"
72+
aria-label="Enter Focus mode"
73+
title="Focus mode — corner globe and focus timer"
7574
>
7675
<span class="focus-mode-launch__face">
7776
<svg
@@ -84,24 +83,26 @@ <h1 class="site-title">lucent.earth</h1>
8483
d="M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66.19-.34.05-.08.07-.12C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.5c.49 0 .56.33.47.51l-.07.15C12.96 17.55 11 21 11 21z"
8584
/>
8685
</svg>
87-
<span class="focus-mode-launch__label">{{
88-
focusMode ? 'Exit focus' : 'Focus Mode'
89-
}}</span>
86+
<span class="focus-mode-launch__label">Focus Mode</span>
9087
</span>
9188
</button>
9289
}
9390

94-
@if (focusMode && focusStreamEmbedUrl) {
91+
@if (focusMode) {
9592
<div class="focus-stream-layer">
9693
<div class="focus-stream-layer__cover" inert aria-hidden="true">
97-
<iframe
98-
class="focus-stream-layer__iframe"
99-
[src]="focusStreamEmbedUrl"
100-
[title]="focusStreamIframeTitle"
101-
tabindex="-1"
102-
allowfullscreen
103-
allow="autoplay; fullscreen; picture-in-picture"
104-
></iframe>
94+
@if (focusStreamEmbedUrl) {
95+
<iframe
96+
class="focus-stream-layer__iframe"
97+
[src]="focusStreamEmbedUrl"
98+
[title]="focusStreamIframeTitle"
99+
tabindex="-1"
100+
allowfullscreen
101+
allow="autoplay; fullscreen; picture-in-picture"
102+
></iframe>
103+
} @else {
104+
<div class="focus-stream-layer__blank" aria-hidden="true"></div>
105+
}
105106
</div>
106107
<div class="focus-stream-layer__column">
107108
<div class="focus-stream-layer__stack">

0 commit comments

Comments
 (0)