desktop: keep drag/resize working over embedded iframes + add embed loading spinner

This commit is contained in:
Martin Dvořák 2026-09-25 14:00:56 +00:00
commit bc738541cf
5 changed files with 65 additions and 3 deletions

View file

@ -686,6 +686,7 @@ a.win-icon {
/* Live service sites rendered inside the window. The site fills the window
body edge-to-edge, so the iframe owns all the scrolling. */
.website-embed {
position: relative;
width: 100%;
height: 100%;
min-height: 0;
@ -698,6 +699,39 @@ a.win-icon {
border: 0;
background: #ffffff;
}
/* While the window is dragged/resized, disown the iframe's pointer so the
gesture isn't swallowed when the cursor passes over the embedded site. */
.win-window.interacting .website-embed-frame {
pointer-events: none;
}
/* Navidrome/Forgejo are full SPAs, so the frame is blank for a moment while
they boot — cover it with a spinner until the iframe reports load. */
.website-embed-loading {
position: absolute;
inset: 0;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
background: #232629;
color: #9fd0f5;
font-size: 0.9rem;
}
.website-embed-spinner {
width: 26px;
height: 26px;
border-radius: 50%;
border: 3px solid rgba(159, 208, 245, 0.25);
border-top-color: #3daee9;
animation: website-embed-spin 0.8s linear infinite;
}
@keyframes website-embed-spin {
to {
transform: rotate(360deg);
}
}
/* ============================================================
MINECRAFT SMP JOIN MENU (opened from the SMP service shortcut)