Add automatic nearby discovery and simplify device presence UI

This commit is contained in:
2026-10-12 17:53:10 +09:00
parent 7e9bb1ec36
commit 5f431ee153
23 changed files with 1148 additions and 106 deletions

View File

@@ -2604,15 +2604,6 @@ a.button {
.devices-stage {
margin: 34px auto 0;
}
.stage-heading {
text-align: center;
margin-bottom: 32px;
}
.stage-heading h1 {
font-size: 26px;
letter-spacing: -0.04em;
font-weight: 600;
}
.devices-stage .section-heading h2 {
font-size: 13px;
font-weight: 500;
@@ -2725,12 +2716,6 @@ a.button {
.devices-stage {
margin-top: 26px;
}
.stage-heading {
margin-bottom: 26px;
}
.stage-heading h1 {
font-size: 23px;
}
.devices-stage .peer-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
@@ -2780,7 +2765,7 @@ a.button {
}
@media (max-width: 639px) {
.devices-stage .peer-grid.device-count-1 {
grid-template-columns: minmax(0, 190px);
grid-template-columns: minmax(0, 1fr);
}
}
.devices-stage .empty-peers {
@@ -2983,12 +2968,6 @@ a.button {
.devices-stage {
margin-top: 28px;
}
.stage-heading {
margin-bottom: 24px;
}
.stage-heading h1 {
font-size: 21px;
}
.device-footer {
margin-top: 38px;
padding: 20px 0;
@@ -3090,9 +3069,6 @@ a.button {
min-height: 166px;
padding: 18px 12px;
}
.stage-heading h1 {
font-size: 20px;
}
}
.footer-device-summary .footer-device-code {
font-size: 10px;
@@ -3154,3 +3130,103 @@ a.button {
height: 520px;
}
}
/* Presence changes animate once; idle discovery has no running animation. */
.devices-stage .peer-grid {
position: relative;
}
.devices-stage .peer-model {
color: var(--muted);
font-size: 10px;
margin-top: 3px;
overflow-wrap: anywhere;
}
.devices-stage .empty-devices {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
}
.devices-stage .empty-devices h3 {
font-size: 17px;
margin: 0;
}
.devices-stage .empty-devices p {
font-size: 13px;
color: var(--muted);
margin: 0;
}
.initial-device-loading {
padding: 32px 0;
max-width: 360px;
margin: auto;
text-align: center;
color: var(--muted);
font-size: 13px;
}
.peer-skeleton {
min-height: 180px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 18px;
pointer-events: none;
}
.peer-skeleton i,
.peer-skeleton span,
.peer-skeleton small {
display: block;
background: var(--line);
border-radius: 8px;
}
.peer-skeleton i {
width: 42px;
height: 42px;
}
.peer-skeleton span {
width: 65%;
height: 16px;
}
.peer-skeleton small {
width: 42%;
height: 10px;
}
.device-enter-active {
transition:
opacity 180ms ease,
transform 180ms ease;
}
.device-enter-from {
opacity: 0;
transform: translateY(6px) scale(0.96);
}
.device-move {
transition: transform 220ms ease;
}
.device-leave-active {
position: absolute;
pointer-events: none;
animation: device-pop-away 240ms ease-in forwards;
}
@keyframes device-pop-away {
25% {
transform: scale(1.035);
}
100% {
opacity: 0;
transform: translateY(-6px) scale(0.82);
}
}
@media (prefers-reduced-motion: reduce) {
.device-enter-active,
.device-move {
transition: none;
}
.device-leave-active {
animation: none;
opacity: 0;
}
}