Skip to content

Commit 0f043ec

Browse files
committed
Improve blocking UI
- Use css to block UI - Remove background color to prevent blinking
1 parent 5f69e04 commit 0f043ec

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

ui/arduino/components/blocking.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
function Blocking(state, emit) {
2-
let blocking = null
2+
let blocking = html`<div id="blocking"></div>`
33
if (state.blocking) {
4-
blocking = html`
5-
<div id="blocking"></div>
6-
`
4+
blocking.classList.add('active')
75
}
86
return blocking
97
}

ui/arduino/theme.css

+9-2
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,13 @@ img {
350350
bottom: 0;
351351
left: 0;
352352
right: 0;
353-
background: var(--white-faded);
354-
z-index: 100;
353+
pointer-events: none;
354+
transition-property: all;
355+
transition-duration: 0.2s;
356+
transition-delay: 0.2s;
357+
cursor: wait;
358+
}
359+
#blocking.active {
360+
z-index: 999;
361+
pointer-events: all;
355362
}

0 commit comments

Comments
 (0)